Find all integers $x \in \mathbb{N}$ such that $2^n+15=x^2$.
This is a problem from the IMO, held in South Africa in 2009.
Do I need the Lagrange's four-square theorem to solve the problem, because in the task it was written that $x$ can be represented as the sum of four integer squares.
How could this help me to solve the problem?
$n=0$ is a solution but there are no solutions with $n>0$.
First remark that if $n$ is odd then $$2^{2k+1}+15\equiv -1\pmod 3$$ and is therefore not a square.
Now assume that $n=2k$ is even. But then $2^n$ is clearly a square so we are looking for two squares with $a^2-15=b^2$. Since $(k+1)^2-k^2=2k+1$ we see that $2^n$ would have to be very small ($(1^2,4^2)$ and $(7^2,8^2)$ are the only examples of two squares a distance $15$ apart) so a quick search rules out all the possibilities with $n>0$.
As an alternative approach (to avoid the search) note that: $$a^2-b^2=15\implies (a+b)(a-b)=15$$ so $(a+b,a-b)=(15,1)\; \text {or} \;(5,3)$ and we get the same two solutions as before.