Solve this equation for the largest value of $n : n^2 + 2016n = x^2$
My attempt:
$n^2 + 2016n = x^2$
Completing the square
$n^2 + 2016n + 1008^2 = x^2 + 1008^2$
$(n + 1008)^2 = x^2 + 1008^2 $
Difference of two squares
$(n+1008)^2-x^2=1008^2$
$(n+1008-x)(n+1008+x)=1008^2$
I always get stuck on this part! I have a hard time finding the prime factorization of a big number!
Is there a special way of tackling these problems? Or do you have to use a different set of techniques each time?
Hint Since you are looking for the largest value of $n$, from the given equation it follows that you also need $x$ to be as large as possible.
Therefore, you are looking for the factorisation $$(n+1008-x)(n+1008+x)=1008^2$$ for which the difference $$(n+1008+x)-(n+1008-x)=2x$$ is the largest possible.
Also, since $(n+1008+x)+(n+1008-x)$ is even, you need both of them to have the same parity, thus be even. Therefore, the factorisation you need is $$(n+1008+x)(n+1008-x)=\frac{1008^2}{2}\cdot 2$$