[Math] Probability that $a^2+b^2+c^2$ divisible by $7$

probability

Three numbers $a,b,c\in\mathbb{N}$ are choosen randomly from the set of natural numbers. The probability that $a^2+b^2+c^2$ is divisible by $7$ is

Try:any natural number when divided by $7$ gives femainder $0,1,2,3,4,5,6$

So it is in the form of $7k,7k+1,7k+2\cdots ,7k+6,$ where $k\in \mathbb{W}$

Could some help me to how to solve it, thanks

Best Answer

What remainders do the squares of numbers give when divided by 7 these are $$(7k)^2 \rightarrow 0 \\ (7k+1)^2 \rightarrow 1 \\ (7k+2)^2 \rightarrow 4 \\ (7k+3)^2 \rightarrow 2 \\ (7k+4)^2 \rightarrow 2 \\ (7k+5)^2 \rightarrow 4 \\(7k+6)^2 \rightarrow 1 \\$$

Now the sum of remainders must add upto a multiple of 7, this can happen if remainders are $(0,0,0), (1,2,4)$

The first case of remainders can be chosen in $\frac{1}{7^3}$

Edit

Doing corrections by mike and almagest The second case can be written in $3!$ ways, and probability of each being $\frac8{343}$, the probability of second case is $3!\cdot\frac8{343}=\frac{48}{343}$

And total probability comes to be $\frac17$