Skip to main content
OlympiadHQ

Browse · MathNet

Print

Iranian Mathematical Olympiad

Iran number theory

Problem

Let be a fixed positive integer. Prove that there is no positive integer such that the sequence is eventually periodic modulo . Where is the sum of digits of in base 10.

(We say a sequence is eventually periodic mod if there are positive integers such that for all ).
Solution
We shall prove a more general statement. That is, we prove that is a-periodic modulo , for each . In doing so, we need the following lemmas.

Lemma 1. Let be an integer which is not a power of 2. Let be a fixed positive integer and be a sequence of positive integers such that , . If the sequence is eventually periodic mod then there are positive integers where such that is periodic mod .

Proof. Since is not a power of two it would have an odd prime divisor, say . Since the sequence is eventually periodic it follows that is also eventually periodic. Hence, for all large , is divisible by . Fix , large enough such that and . Since , such a exists because each followed by which is followed by . Clearly for each . Notice that divides . Hence, is divisible by the order of mod , namely . That is, is periodic. As desired.

Now, we shall prove a nice fact about the periodicity of ,

Lemma 2. Let be positive integers, if the sequence , is constant mod then divides and .

Proof. Letting for some large enough it follows that . Whence, . We can also assume indeed, if , then, by a suitable choice of we can make power of 10.

Then, there are such that

and Further, by a suitable choice of we can ensure that . It follows that Since divides , , it follows that divides 9. That is, . And since it follows that , Hence, divides . This completes our proof.

Back to our problem. We shall firstly prove that has no odd prime divisor. Assume the sequence is periodic with the minimal period of . Since there are infinitely many such that is divisible by if divides then . If doesn't divide then . Hence, is among the residues of modulo . Take in the first lemma. It follows that the sequence is constant modulo the order of 2 modulo , namely . Hence, divides 9. That is, divides . If then for we have and since the order of 3 mod 7 is 6 we reached to a contradiction. The same holds for the case . Finally, for we have and since the order of 5 modulo 7 is 6 we again reached to a contradiction.

If the numbers with orders that dividing 9 are surprisingly powers of 2. If is divisible by 9 then and while the order of 3 modulo 73 doesn't divide 9. If is not divisible by 9 then is not congruent to a power of 2 mod 73. Hence, its order modulo 73 doesn't divide 9.

Finally, for powers of 2 we prove that the only solutions are . Let we claim that the period is of the form . Indeed if is odd then since the order of modulo is a power of two and for sake of periodicity it must divide 9 we would obtain that . Hence, and by the same argument yielding for all . Thus, . Whence, . ■

Techniques

Prime numbersInverses mod nFermat / Euler / Wilson theoremsMultiplicative orderRecurrence relations