if $n^2 + 2016n$ is equal to a square number, how would i find the largest value of n? Q: $n^2 + 2016n$ is equal to a square number. What is the largest value of n for which this is true, giving the answer as a remainder when divided by 1000.The answer is a whole number and is a number from 1-999.
I'm not sure if my answer is correct. I factorised n out giving $n(n+2016)$ and then I said that $(n+2016)=na^2$ where a is a number.
Then $n(1-a^2)=2^5.3^2.7$
$n(1-a)(1+a)=2^5.3^2.7$
So then wouldn't the largest number for n be when $(1-a)(1+a)=2^0.3$
then the answer = $2^5.3.7$ Is that correct?

Here's a start:
$n^2 + 2016n = M^2$
$n^2 + 2016n + 1008^2 - M^2 = 1008^2 = 2^8*3^4*7^2$
$(n-M + 1008)(n+M + 1008) = 2^8*3^4*7^2$
Let $(n-M + 1008) = 2^a3^b7^c$ and $(n+M + 1008) = 2^{8-a}3^{4-b}7^{2-c}$
So $2n + 2016 = 2^a3^b7^c + 2^{8-a}3^{4-b}7^{2-c}$
So we need to maximize $n = \frac{2^a3^b7^c + 2^{8-a}3^{4-b}7^{2-c}}2 - 1008 \le 999$
Or $2^a3^b7^c + 2^{8-a}3^{4-b}7^{2-c} \le 4014$
Not entirely sure how to maximize to such a range.  Picking values at random I get $16*81*7 + 16*7 = 16*7(82)=9184$
So $n = 3584$
And $(3584)^2 + 2016(3584) = 4480^2$.
But that's too big.  
I'm not sure why they are restricting to $n < 1000$.  The true largest would be  $n = (2^7*3^4*7^2 + 2)/2 - 1008 =  253009$
With $(253009) + 2016(253009) = 254015^2$.
