Math Olympiad Algebraic Question 
If both $n$ and $ \sqrt{n^2+204n} $ are positive integers, find the maximum value of $n$.

I came across this question during a Math Olympiad Competition. I need help with solving the question. Thanks.
 A: there must be some natural $k$ s.t. $n^2 + 204n = (n+k)^2$. easy to see the bigger the $k$ the bigger the $n$ because it's equivalent to $$ (204-2k)n = k^2$$ then again there's an easy bound on $k$ since
$$n^2 + 204n < (n+102)^2$$  hence we can just try a couple of possibilities. if you write
$$n^2 + 204n = (n+101)^2$$ then it won't give any solutions, since it boils down to $2n = 101^2$
on the other hand trying $$n^2 +204n = (n+100)^2$$ gives a solution $n=2500$ and we're done
A: So for some positive integer $m$, you must have $n^2+204n=m^2$.  Considering this a quadratic in $n$, you need the discriminant $204^2+4m^2$ to be an even perfect square, say $4a^2$.  So we have $a^2-m^2=10404 \implies (a+m)(a-m)=10404 \implies a+m = 5202, a-m=2$ as we want the largest $m$ (so as to get the largest $n$).  Solving gives $m=2600 \implies n = 2500$.
A: Let
$$m^2=n^2+204n$$
$$k^2=n^2+204n+10404=(n+102)^2$$
Then
$$(k-m)(k+m)=2^2\cdot 3^2\cdot 17^2$$
Since $k-m$ and $k+m$ have the same parity, they must be even. Write:
$$\frac{k-m}2\frac{k+m}2=3^2\cdot17^2$$
Since $k>m$ there are only two options: $k-m=2$ and $k-m=18$. The former gives $m=2600$ and the latter $m=280$. Thus we are interested in the former, which gives $n=2500$.
