IMC 1999, Day 2, Problem 2
We throw a dice (which selects one of the numbers with equal probability) times. What is the probability that the sum of the values is divisible by ?
Original from the official PDF

This transcription was compared symbol by symbol with the original, but not yet by a person.
Work for at least 45 minutes before opening the solution.
Official solution
Solution 1. For all nonnegative integers and modulo 5 residue class , denote by the probability that after throwing the sum of values is congruent to modulo . It is obvious that and .
Moreover, for any we have
Solution 2. Let be the set of all sequences consisting of digits of length . We create collections of these sequences.
Let a collection contain sequences of the form
Except for the sequence , each sequence is the element of one collection. This means that the number of the sequences, which have a sum of digits divisible by 5, is if is divisible by 5, otherwise .
Thus, the probability is if is divisible by 5, otherwise it is .
Solution 3. For arbitrary positive integer denote by the probability that the sum of values is . Define the generating function
Our goal is to compute the sum . Let be the first 5th root of unity. Then
Obviously , and for . This implies that is if is divisible by 5, otherwise it is . Thus, is if is divisible by 5, otherwise it is .
Transcribed from the official solutions, pages 1–2. This transcription has not been checked a second time; if in doubt, look at the original.
Archive problem: the statement is the official text (transcribed, with the original above). Subject classification and difficulty were estimated automatically; hints and a worked solution are added over time.
How did it go?
Moves you mark come back sooner in triage.