Consider the sequence : $\langle 3,7,11,15,\cdots\rangle$. Is it possible that an element of this sequence is sum of two squares?
My approach:
General term of the sequence if $4n-1$. Consider the canonical homomorphism $\phi \colon \mathbb{Z} \to \mathbb{Z}_4$. If $a^2+b^2=4n-1$ has a solution in $\mathbb{Z}$, then it has a solution in $\mathbb{Z}_4$. That is, $$a^2+b^2=(4n-1) \ \text{mod}\ 4=3 $$
Clearly, this has no solution in $\mathbb{Z}_4$ and hence neither does the original.
What I would like to know is if there are any other methods to solve this question using maybe some other areas of mathematics?
Are you fine with algebraic number theory? The ring of gaussian integers $\mathbb{Z}[i]$ is a euclidean domain, hence a unique factorization domain. $n=a^2+b^2$ is equivalent to $n= z\cdot\overline{z}$ with $z=(a+ib)\in\mathbb{Z}[i]$, hence the problem of understanding which positive integers can be represented as a sum of two squares boils down to understanding which integer primes can be represented as a sum of two squares. Lagrange's identity $$(a^2+b^2)(c^2+d^2) = (ad-bc)^2 + (ac+bd)^2 $$ is a consequence of $(a-ib)(c+id) = (ac+bd)+i(ad-bc)$ and grants that the set of integers that can be represented as a sum of two squares is a semigroup.
If $p\in\mathbb{Z}^+$ is an odd prime and $a^2+b^2=p$, we have that both $a$ and $b$ are invertible elements in $\mathbb{Z}/(p\mathbb{Z})$ and the square of $a^{-1} b$ equals $-1$. In particular, if $p$ is an odd prime that can be represented as a sum of two squares, $-1$ is a quadratic residue in $\mathbb{Z}/(p\mathbb{Z})^*$. By Legendre's symbol $$ 1 = \left(\frac{-1}{p}\right) \equiv (-1)^{\frac{p-1}{2}} \pmod{p}$$ we get that $-1$ is a quadratic residue in $\mathbb{Z}/(p\mathbb{Z})^*$ iff $\frac{p-1}{2}$ is even, i.e. iff $p=4k+1$.
Isn't this the most epic twist on a trivial argument you have ever seen? :D