Skip to main content
OlympiadHQ

Browse · MathNet

Print

55th IMO Team Selection Test

Bulgaria number theory

Problem

Let and be two primes such that . Prove that the decimal representation of the number contains every digit from 0 to 9.
Solution
Let and be the remainder of upon division by . It suffices to show that the last digits of the numbers cover all digits from 0 to 9. Indeed, since and are coprime, that would mean that all digits from 0 to 9 occur among the last digits of the numbers – and those are the same as the digits in the decimal representation of .

Let be the set of all nonzero biquadratic residues modulo , i.e., the set of all such that the congruence has a solution modulo . Then has exactly elements. Indeed, since is a quadratic residue modulo , the nonzero quadratic residues modulo can be grouped in pairs of the kind , and among their squares – which are precisely the biquadratic residues – there are precisely distinct ones.

We will show that every element of has the form for some . Indeed, let be the index of modulo . Since , we have , , or .

Consider the case first. Let ; then there is a such that is a multiple of and, therefore, the number is a biquadratic residue. Since the numbers for are pairwise distinct and all of them are biquadratic residues, they must coincide with the elements of , as needed.

The cases and are treated analogously.

Let, then, be an arbitrary digit. Let be such that ends in , , , or . Since , we have . It follows that the interval contains at least six fourth powers. Therefore, it contains at least one fourth power that ends in the same digit as . Let ; then and , i.e., ends in , as needed.

Techniques

Quadratic residuesMultiplicative orderFermat / Euler / Wilson theoremsTechniques: modulo, size analysis, order analysis, inequalities