BMO1 2011 Problem 1: Find $n$ such that $n^2+20n+11$ is a perfect square 
*

*Find all (positive or negative) integers
$n$ for which


$$n^2+20n+11$$
is a perfect square. Remember that you must justify that you have found
them all.
For the first part I did so:
$$n^2+20n+11=M^2 $$ where M is an integer.
That factors down to:
$$ (n+10)^2-M^2=89$$
$$ (n+10-M)(n+10+M)=89$$
From there it is easy to find solutions as 89 is prime and it is a diophantine equation.
So the first part of the question is quite simple, however I am completely stumped on how to do the second part, how might we show that those are the only solutions?
 A: Note that
$$n^2+20n+11=(n+10)^2-89$$
so we have to find all the pairs of squares $a^2$, $b^2$ such that $a^2-b^2=89$. Of course, $a$ and $b$ are integers. We see that $|a|>|b|$.
Since $a^2-b^2=(a+b)(a-b)$ and $89$ is a prime number, then we have these possibilities: 


*

*$a+b=89$ and $a-b=1$, that is, $a=45$, $b=44$.

*$a+b=1$ and $a-b=89$, that is, $a=45$, $b=-44$.

*$a+b=-89$ and $a-b=-1$, that is, $a=-45$, $b=-44$.

*$a+b=-1$ and $a-b=-89$, that is, $a=-45$, $b=44$.


So clearly, $a^2=2025$ and $b^2=1936$.
Then $n+10=\pm45$ which gives two values for $n$, namely $n=35$ and $n=-55$.
EDIT: How can be proved that there are no more solutions?
Indeed, this is already done. Our reasoning is like this:


*

*Proposition $A$: "$n$ is such that $n^2-20n+11$ is a perfect square".

*Proposition $B$: "$n$ is $35$ or $-55$".


We have shown, assuming that $n$ is integer, that $A$ implies $B$. So if $n$ is another integer number, $B$ is false. Hence, $A$ is false. That is, if $n$ is not $35$ or $-55$ then $n^2+20n+11$ is not a perfect square.
A: We have $n^2+20n+11=(n+10)^2-89$. So our number is $89$ away from some perfect square. What do you know about the difference between consecutive squares? What does that say about the possibility of (not necessarily consecutive) squares that are $89$ away from one another?
A: Let $n^2+20n+11=(n+m)^2$
$\iff n=\dfrac{m^2-11}{2(10-m)}$
So, $m$ must be odd $=2r+1$(say)
$\implies n=\dfrac{2r^2+2r-5}{9-2r}$
Now if integer $d(>0)$ divides both $2r^2+2r-5,9-2r$
$d$ must divide $r(9-2r)+(2r^2+2r-5)=11r-5$
$d$ must divide $11(9-2r)+2(11r-5)=89$
As $n$ is an integer,  $9-2r$ must divide $89$ whose factors are $\pm1,\pm89$
