Let $n \in \mathbb{N}$ and $p$ a prime number then I would like to find all $(a_1, ..., a_n) \in \mathbb{N}^n$ such that : $$\sum a_i^2 = p$$
Using a computer program It seems that the only solutions are $(1,...,1)$.
I don't see how to prove this result. An idea could be to look at the whole expression mod $4$, but it doesn't seem to help... :(