<s>[INST] Throwing dice: Probability Total is Divisible by 3 
Suppose I throw a fair die $1995$ times. What is the probability that
  the total is divisible by 3?

I tried to attack this problem inductively, storing the total in a variable $t \mod 6$, and then showing that for any total $t$ there is a $1/3$ probability of the next throw of the dice creating a total $t+n$ divisible by three. However, I've had difficulty formalizing the proof and I'm wondering if there isn't a better way to do this.
 [/INST] Here is a solution using generating functions. Suppose we roll the die $n$ times, then the generating function of the totals is
$$f(z) = (z+z^2+z^3+z^4+z^5+z^6)^n.$$
Now put $$w = e^{2\pi i/3}$$
then it is not difficult to see that the generating function of those terms whose exponents are divisible by three is given by
$$g(z) = \frac{1}{3} (f(wz)+f(w^2z)+f(w^3z)).$$
The count that we are interested in is given by $g(1),$ which is
$$\frac{1}{3}
\left(
(w+w^2+w^3+w+w^2+w^3)^n \\+
(w^2+w+w^3+w^2+w+w^3)^n \\+
(w^3+w^3+w^3+w^3+w^3+w^3)^n
\right).$$
Now observe that $w^3=1$ and
$$w+w^2+w^3 = w (1+w+w^2) = w \frac{w^3-1}{w-1} = 0,$$
and therefore
$$g(1) = \frac{1}{3} 6^n.$$
The desired probability is thus
$$\frac{g(1)}{f(1)} = \frac{1}{3} \frac{6^n}{6^n} = \frac{1}{3}.$$
</s>