Maths Olympiad Prep

Library / /17 of 27

Number theory Difficulty 5.8 AIME, harder Prove it Austria

Suppose that pp is an odd prime number and MM a set of p2+12\frac{p^2+1}{2} integer squares.
Investigate if one can choose pp elements of this set so that the arithmetic mean of these pp elements is an integer.
(Walther Janous)

Solution

The idea is to choose from the p2+12\frac{p^2+1}{2} square numbers pp numbers that are in the same residue class modulo pp. Obviously, the sum of these pp numbers is then divisible by pp and thus the arithmetic mean is an integer.
It is known that the square numbers do not run through all residue classes modulo pp, but only through 1+p12=p+121 + \frac{p-1}{2} = \frac{p+1}{2} ones. (On the one hand, this is the residue class 00 if one squares a number divisible by pp. Because of a2(pa)2(modp)a^2 \equiv (p-a)^2 \pmod p, the squares of numbers aa that are not divided by pp run through a maximum of half of the p1p-1 nonzero residue classes. On the other hand, x2y2(modp)x^2 \equiv y^2 \pmod p gives the relation p(xy)(x+y)p \mid (x-y)(x+y) and so xy(modp)x \equiv y \pmod p or xy(modp)x \equiv -y \pmod p. Therefore, the squares of numbers aa, which are not divisible by pp, run through exactly half of the p1p-1 residue classes different from zero.)
We now divide the p2+12\frac{p^2+1}{2} square numbers into the p+12\frac{p+1}{2} residue classes that correspond to square numbers. Because of the pigeon hole principle, there is therefore a residue class, that contains at least
(p2+1)/2(p+1)/2 \left\lfloor \frac{(p^2 + 1)/2}{(p + 1)/2} \right\rfloor
numbers.
Because of
(p2+1)/2(p+1)/2=p2+1p+1=p2+pp+1p1p+1=pp1p+1 \frac{(p^2 + 1)/2}{(p + 1)/2} = \frac{p^2 + 1}{p + 1} = \frac{p^2 + p}{p + 1} - \frac{p - 1}{p + 1} = p - \frac{p - 1}{p + 1}
and 0<p1p+1<10 < \frac{p-1}{p+1} < 1 it follows that
(p2+1)/2(p+1)/2=p, \left\lfloor \frac{(p^2 + 1)/2}{(p + 1)/2} \right\rfloor = p,
what was to be shown.

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 and solution reproduced as published; topic and difficulty added by this site.