Let's determine the prime numbers $p$, for which the squares of numbers not divisible by $p$, when divided by $p$, leave a remainder of 1!
Let $a$ represent some number. According to the problem, either $a$ or $a^{2}-1$ is divisible by $p$ for all values of $a$, hence

$$
a\left(a^{2}-1\right)=(a-1) a(a+1)
$$

is always divisible by $p$. Since $p$ is a prime number, at least one of the three factors must be a multiple of $p$. The number by which any of three consecutive numbers is divisible cannot be greater than 3. Therefore, $p=2$ or 3. The theorem holds for these values.

Kovács Ervin (Kegyesrendi g. VI. o. Bp.)