What is the probability that the sum of six rolls of a fair die is divisible by $7$? $$P(E)=\frac{\text{Favourable outcomes}}{\text{Total outcomes}}$$
Total outcomes $=6^6$
Favourable outcomes means the sum must be $7$, $14$, $21,28$ or $35$
Assume $a_1$, $a_2$, $a_3$, $a_4$, $a_5$, $a_6$ to be the numbers on the top faces of the dice
In case of $7$ and $35$ the number of cases should be $6$ as $0<a_i<7$.
When the sum is $14$, favourable outcomes are: $${14 \choose 6}-6\left({7 \choose5}+{6 \choose 5}+1\right).$$ I tried this by a variation of beggars method. Let's assume there are $14$ coins, and $6$ beggars. There are $14$ places for the beggars to choose, such that there are $13$ places between two coins and one to the left of the first coin. Each beggar gets all the coins between himself and the beggar just to the right of him. This way we ensure that each beggar at least gets one coin. After this I subtracted the number of cases where one beggar gets more than one coin.
Now this is solvable up to this point, but I'm getting a very large equation when I do this for $21$ and $28$. Is there a better method, since I will most probably only have $5$ min in the upcoming exam on $3^d$ October.
 A: For a second way , you can use generating functions. Lets say that the numbers appears in throwing represented by $x_1,x_2,x_3,x_4,x_5,x_6$. So , we are looking for $7,14,21,28,35$ as the summation.
Then ,we can say that we are looking for the coefficents for $[x^n]$ where $n$ is $7,14,21,28,35$ , respectively.
It can be seen that the generating function of $x_1,...,x_6$ are the same and it is equal to $$\bigg(x\times \frac{1-x^6}{1-x}=\frac{x -x^7}{1-x}\bigg)$$
Then , as all of the generating functions are equal

*

*Find   $$[x^7] \bigg(\frac{x -x^7}{1-x}\bigg)^6$$


*Find   $$[x^{14}] \bigg(\frac{x -x^7}{1-x}\bigg)^6$$


*Find   $$[x^{21}] \bigg(\frac{x -x^7}{1-x}\bigg)^6$$


*Find   $$[x^{28}] \bigg(\frac{x -x^7}{1-x}\bigg)^6$$


*Find   $$[x^{35}] \bigg(\frac{x -x^7}{1-x}\bigg)^6$$
We stoped at $35$ because it is the maximum value of summation that divided by $7$
CALCULATION VIA WOLFRAM-ALPHA
Then , $$\frac{[x^7]+[x^{14}]+[x^{21}]+[x^{28}] +[x^{35}]}{6^6}=\frac{6+1161+4332+1161+6}{6^6}= \frac{6666}{46656}=0,1428755...$$
A: You can encapsulate the stars-and-bars cum inclusion-exclusion for a desired sum $s$ rolling a six-sided die six times, using the formula
$$\text{Number of ways}\;W(s) = \sum_{i=0}^{\lfloor\frac{s-6}{6}\rfloor}(-1)^i\binom{6}{i}\binom{s-1-6i}5$$
