<s>[INST] Show $a^2+b^2+c^2 \equiv 0 \pmod {3}$ if $a, b, c$ are *not* multiples of $3$. I was given the following problem:

 Show $a^2+b^2+c^2 \equiv 0 \pmod {3}$ if $a, b, c$ are not multiples of $3$.

I would like a. verification of my proof (I self-study); b. alternative proofs, to enrich my appreciation of the problem. Here's what I did.


$\text{Lemma (demonstration skipped)} :$ $\forall j \in \mathbb{N}| a \equiv b \pmod{m} \implies a^j \equiv b^j \pmod{m}$.


$\text{Consideration :}$ I will use the $\binom{a}{b}$ notation to refer to the number of multisets of size $b$ that can be drawn out of $a$ elements; i.e., the number of collections with repetition but without order. This is due to the lack of a proper "\multiset" format in LaTex as provided in the site.

$\text{Solution}$. It is trivial to say
$$\begin{align}
a &\equiv r_1 \pmod{3}\\
b &\equiv r_2\pmod{3}\\
c &\equiv r_3\pmod{3}
\end{align}$$
where $r_1, r_2, r_3$ are the remainders of $a, b, c$ respectively in the division by $3$.
$I$. Let $S$ be the set of possible values of $r_i$. Because $3\nmid a, \space 3\nmid b, \space 3\nmid c$ we have $S=\{1, 2\}$.
$II.$ There are $2^3=8$ ways to draw $3$ elements of $S$. Since addition is conmutative, their ordering is irrelevant and therefore we have $\binom{2}{3}=\frac{4!}{3!}=4$ possible sums of the form $r_1+r_2+r_3$, with the same principle applying to $r_1^2+r_2^2+r_3^2$.
$III$. Let $S'$ be the set of the possible results of the sum $r_1^2+r_2^2+r_3^2$. These possible sums, as is easy to manually compute, are $S'= \{3, 6, 9, 12\}$, where $\forall s \in S' | s=3m, m\in\mathbb{Z}.$ It then follows
$$a^2+b^2+c^2 \equiv r_1^2+r_2^2+r_3^2 \equiv0 \pmod{3}$$

Thanks in advance.
 [/INST] You're not wrong but simply observe that for any $a$ such that $a \not \equiv 0$ mod $3$, then we have that $a^2 \equiv 1$ mod $3$. This is easy enough to prove and follows from your lemma for instance.
Then $x^2, y^2, z^2 \equiv 1$ mod $3$ each, and so $x^2 + y^2 + z^2 \equiv 0 $ mod $3$.
</s>