Problem 1. Fix a positive integer $n$. For every integer $S \geq n$, let $N_{n,S}$ denote the number of possible ways in which a sum of $S$ can be obtained when $n$ dice are rolled. For example, for $n = 3$ dice and a sum $S = 5$, we have $N_{3,5} = 6$, counting the following possible triples: \begin{align} \left(3,1,1\right), \quad \left(1,3,1\right), \quad \left(1,1,3\right), \quad \left(2,2,1\right), \quad \left(1,2,2\right), \quad \left(2,1,2\right) . \end{align}
(a) Consider the sets \begin{align} A = \left\{ \left(a_1, a_2, \ldots, a_n\right) \in \mathbb{Z}^n ; \ a_i \geq 1 \text{ for all } i, \text{ and } \sum_{i=1}^{n} a_i = S \right\} \end{align} and \begin{align} A_j = \left\{ \left(a_1, a_2, \ldots, a_n\right) \in \mathbb{Z}^n ; \ a_i \geq 1 \text{ for all } i, \ a_j \geq 7 \text{ and } \sum_{i=1}^{n} a_i = S \right\} \end{align} for a fixed $j \in \left\{1, 2, \ldots, n\right\}$.
(i) Write formulas for the numbers of elements in $A$ and $A_j$, respectively. Justify your answers.
(ii) State the Inclusion-Exclusion Formula and use it to prove: \begin{align} N_{n,s} = \sum_{k=0}^n \left(-1\right)^k C^n_k C^{S-1-6k}_{n-1} \end{align} (where $C^a_b$ stands for the binomial coefficient $\dbinom{a}{b}$).
This is the problem I am having difficulty with. For $A$, I think the formula is $$\left|A\right| = {S-1 \choose S-n}.$$
I can't seem to figure a formula for $A_j$, and I don't understand where the variable "x" came from. I have a good understanding of the Inclusion Exclusion formula and think I could complete the proof if I had $A_j$.