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.
contest-math
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.
Best Answer
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$.