Number theory: square numbers of a given form

elementary-number-theorynumber theorysquare-numbers

I made a proof in an undergraduate number theory class which uses this assumption to make a crucial step in the proof. Could someone tell me if it is correct and maybe explain why or why not?

If I have a square number $2^m(r2^m+s)+1=r2^{2m}+s2^m+1$, where $r,s>0$ and $m, r, s \in\Bbb{N}$ does this imply that the square root of this number must be $n2^m+1$, where $n\in\Bbb{N}$ is such that $n^2=r$ and $2n=s$? The important thing is to show that $s$ is even.

Best Answer

No it does not; consider the case where $m=1$, $r=5$, $s=2$. Then $$2^m(r2^m+s)+1=2^1\times(5\times2^1+2)+1=25=5^2,$$ but $r$ is not a perfect square, so such an $n$ does not exist.

Moreover, it does not even imply that $s$ is even, as the values $m=3$, $r=s=5$ give $$2^3\times(5\times2^3+5)+1=361=19^2,$$ which is a perfect square. There are many examples, the values $m=3$, $r=2$, $s=5$ give $$2^3\times(2\times2^3+5)+1=169=13^2,$$ in some sense a 'smaller' example. And $m=3$, $r=1$, $s=7$ gives the smallest counterexample; $$2^3\times(1\times2^3+7)+1=121=11^2.$$

Related Question