Number theoryDifficulty 6.5Prove itSerbian Mathematical Olympiad · Serbia
A natural number n, n>1, is given. We call an integer x beautiful if the remainder of x2 upon division by n is odd. Prove that there do not exist more than 1+⌊3n⌋ consecutive beautiful natural numbers.
This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.
If n is an even number, the claim is trivial: in that case there do not even exist two consecutive beautiful numbers, since even numbers are not beautiful. From now on we assume that n is odd.
Since numbers divisible by n are not beautiful, we may restrict ourselves to numbers x∈{1,…,n−1}. Suppose that the numbers x and x+1 are beautiful. The remainders of x2 and (x+1)2 upon division by n, which are odd, are equal to x2−n[nx2] and (x+1)2−n[n(x+1)2] respectively, so [nx2] and [n(x+1)2] have different parities. Since 0<(x+1)2−x2<2n implies 0⩽[n(x+1)2]−[nx2]⩽2, it follows that [n(x+1)2]=[nx2]+1.
Therefore, if the numbers x,x+1,…,x+k are beautiful, then m=y−[ny2]is constant for ally=x,x+1,…,x+k Since the equality y−[ny2]=m is equivalent to y−m⩽ny2<y−m+1, i.e. to n(4n−m)⩽(y−2n)2<n(4n−m+1), the number of consecutive numbers y with this property is not greater than [n(4n−m+1)−n(4n−m)]+1⩽[n]+1 if m⩽[4n], and is not greater than 2[n{4n}+21]⩽[3n]+1 for m=[4n]+1.
Source: MathNet,
licensed CC-BY-4.0.
Statement translated into English from sr; metadata (topic, difficulty, ordering) added by this project.