Problem

Source: Austrian MO 2024, Final Round P6

Tags: number theory, number theory proposed, modular arithmetic, modulo, Sum of Squares



For each prime number $p$, determine the number of residue classes modulo $p$ which can be represented as $a^2+b^2$ modulo $p$, where $a$ and $b$ are arbitrary integers. (Daniel Holmes)