Skip to main content
OlympiadHQ

Browse · MathNet

Print

Croatian Mathematical Olympiad

Croatia number theory

Problem

Determine all positive integers which satisfy the following condition: For all integers such that their sum is not divisible by , there exists an integer such that none of the numbers

is divisible by , where we define for the case .
Solution
All such numbers are primes.

Let be a composite number, i.e. , where and are positive integers. Observe the sequence in which the number is appearing times. The sum of all numbers in that sequence is , which is not divisible by . However, notice that, no matter on the initial index of the sequence, the sum of (or , if we pass through element 0 of the sequence) consecutive numbers in the sequence will be equal to , and therefore divisible by .

Let be a prime number. Let us assume the opposite: there exist positive integers which all add up to a number not divisible by , but for all there exists such that the number is divisible by . Reminder: all operations on indices are made using convention for .

Let us now make a graph consisted of vertices (indicating numbers ). The two vertices and are joined with directed edge if the sum is divisible by . Due to the assumption, from any vertex there is at least one edge incident to that vertex. Since there are only finitely many vertices in the graph, we conclude that the graph has a cycle.

Consider that cycle and let us sum up all sums which correspond to edges of that cycle. Notice that all numbers appear equally many times in those sums, and let us denote that number of occurrence by . Moreover, in that cycle we have at most edges, and for each edge the corresponding sum consists of at most addends, since the sum of all numbers in the original sequence is not divisible by . Hence, . However, each of those sums along the edges of the cycle is divisible by , so the sum of all those sums in the cycle is as well, and we have This gives contradiction, since , i.e. and .
Final answer
All prime numbers

Techniques

Prime numbersFactorization techniquesCounting two ways