Maths Olympiad Prep

Library / /11 of 27

Number theory Difficulty 5.3 AIME, harder Prove it Austria

For each prime number pp, determine the number of residue classes modulo pp which can be represented as a2+b2a^2 + b^2 modulo pp, where aa and bb are arbitrary integers.

Solution

All pp residue classes.

With a2+02a^2 + 0^2 we first obtain all quadratic residue classes.
Since not all residue classes are quadratic residues, there is a quadratic residue class a2a^2 that is followed by a quadratic non-residue class, so that n=a2+1n = a^2 + 1 is not a quadratic residue and therefore of course n0(modp)n \neq 0 \pmod p.
However, since the product of two quadratic non-residue classes is a quadratic residue class, it follows for each quadratic non-residue class mm that m=nmn/n2=(a2+1)c2/n2(acn1)2+(cn1)2(modp)m = nmn/n^2 = (a^2+1)c^2/n^2 \equiv (acn^{-1})^2 + (cn^{-1})^2 \pmod p and therefore all quadratic residue classes can also be represented as the sum of two squares.

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.