Maths Olympiad Prep

Library / /51 of 87

Number theory Difficulty 6.5 National Olympiad Prove it Serbia

Problem:

A natural number nn, n>1n>1, is given. We call an integer xx beautiful if the remainder of x2x^{2} upon division by nn is odd. Prove that there do not exist more than 1+3n1+\lfloor\sqrt{3 n}\rfloor consecutive beautiful natural numbers.

Solution

Solution:

If nn 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 nn is odd.

Since numbers divisible by nn are not beautiful, we may restrict ourselves to numbers x{1,,n1}x \in \{1, \ldots, n-1\}. Suppose that the numbers xx and x+1x+1 are beautiful. The remainders of x2x^{2} and (x+1)2(x+1)^{2} upon division by nn, which are odd, are equal to x2n[x2n]x^{2}-n\left[\frac{x^{2}}{n}\right] and (x+1)2n[(x+1)2n](x+1)^{2}-n\left[\frac{(x+1)^{2}}{n}\right] respectively, so [x2n]\left[\frac{x^{2}}{n}\right] and [(x+1)2n]\left[\frac{(x+1)^{2}}{n}\right] have different parities. Since 0<(x+1)2x2<2n0<(x+1)^{2}-x^{2}<2 n implies 0[(x+1)2n][x2n]20 \leqslant\left[\frac{(x+1)^{2}}{n}\right]-\left[\frac{x^{2}}{n}\right] \leqslant 2, it follows that [(x+1)2n]=[x2n]+1\left[\frac{(x+1)^{2}}{n}\right]=\left[\frac{x^{2}}{n}\right]+1.

Therefore, if the numbers x,x+1,,x+kx, x+1, \ldots, x+k are beautiful, then
m=y[y2n]is constant for ally=x,x+1,,x+k m=y-\left[\frac{y^{2}}{n}\right] \quad \text{is constant for all} \quad y=x, x+1, \ldots, x+k
Since the equality y[y2n]=my-\left[\frac{y^{2}}{n}\right]=m is equivalent to ymy2n<ym+1y-m \leqslant \frac{y^{2}}{n}<y-m+1, i.e. to n(n4m)(yn2)2<n(n4m+1)n\left(\frac{n}{4}-m\right) \leqslant\left(y-\frac{n}{2}\right)^{2}<n\left(\frac{n}{4}-m+1\right), the number of consecutive numbers yy with this property is not greater than [n(n4m+1)n(n4m)]+1[n]+1\left[\sqrt{n\left(\frac{n}{4}-m+1\right)}-\sqrt{n\left(\frac{n}{4}-m\right)}\right]+1 \leqslant[\sqrt{n}]+1 if m[n4]m \leqslant\left[\frac{n}{4}\right], and is not greater than 2[n{n4}+12][3n]+12\left[\sqrt{n\left\{\frac{n}{4}\right\}}+\frac{1}{2}\right] \leqslant[\sqrt{3 n}]+1 for m=[n4]+1m=\left[\frac{n}{4}\right]+1.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from sr; metadata (topic, difficulty) added by this project.