Let $\displaystyle n = 17, 51, 37, 407, 629, 40885.$

(a) Decide whether $\displaystyle n \in S_2$.

(b) If $\displaystyle n \in S_2$ find $\displaystyle a,b \in \mathbb{Z}$ with $\displaystyle n=a^2+b^2.$

(c) If $\displaystyle n \notin S_2$ find $\displaystyle a,b,c,d \in \mathbb{Z}$ with $\displaystyle n=a^2+b^2+c^2+d^2.$

Thank you all for checking this out, and any ideas/suggestions are very welcome. Thanks!