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.
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.
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$.
k
using: $$k^2=n^2+204n+10404=(n+102)^2$$ ... ?
– KM.
Jun 03 '14 at 18:33
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
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$.
Given that $n$ and $ \sqrt {n^{2} + 204n}$ both are integers.
So, $n^2 + 204n $ is a perfect square.
$n^2 + 204 n = (n + x)^2$
$n^2 + 204 n = n^2 + 2xn + x^2$
$204 n = 2xn + x^2 $
$204n - 2xn = x^2$
$2n(102 -x) = x^2$
So, $n = \frac{x^2}{2( 102 - x)} $
To have maximum value of $n$, $x$ should be maximum. $x$ is an even number and less than $102$.
Taking $x$ as 100 we get $n$ as $2500$. So, maximum value of $n = 2500$.
$n^2+204n$ is a perfect square. Hence, it must be of the form $4k$ or $4k+1$
Now, try to solve for $n^2+204n \equiv 1 \mod 4 $ and $n^2+204n \equiv 0 \mod 4 $ or $n^2+204n-1 \equiv 0 \mod 4 $ and $n(n+204) \equiv 0 \mod 4 $
– MathMan Jun 03 '14 at 16:34