About sum of three squares I am trying to find those $k$ for which the expression $1+(10k+4)^2 +(10m+8)^2$ is never a square number for any $m$.
Thank you!

You are trying to solve $J + (10m+8)^2 = n^2$ or show that no solution exists, where $J=1+(10k+4)^2$. For any $J$, you can solve $J = n^2 - p^2$ by writing it as $J = (n-p)(n+p)$ and then finding all factorizations of $J$ into two factors of equal parity (both even or both odd). This gives you all possible choices for $n$ and $p$, and then you can check whether any of the choices has $p\equiv8\pmod{10}$ (so that you can write $p=10m+8$).
This gives you an algorithm for deciding the answer for any given $k$. I don't know of any theoretical way you could determine the answer for large sets of $k$.
