Problem

Source: 17th Durer Competition 2024 Finals E+ P5

Tags: number theory, Quadratic Residues



Let $p{}$ be a fixed prime number. Determine the number of ordered $k$-tuples $(a_1,\ldots,a_k)$ of non-negative integers smaller than $p{}$ for which $p\mid a_1^2+\cdots+a_k^2$ where a) $k=3$ and b) $k$ is an arbitrary odd positive integer.