[SOLVED]Square number challenge

anemone

MHB POTW Director
Staff member
Let $n$ be a positive integer. Show that if $2+2\sqrt{28n^2+1}$ is an integer, then it is a square.

Opalg

MHB Oldtimer
Staff member
Let $k = 2 + 2\sqrt{28n^2 + 1}$. Then $(k-2)^2 = 4(28n^2+1)$ and so $k(k-4) = 112n^2 = 7(4n)^2.$

Since $28n^2 + 1$ is odd, so is its square root. Thus $2\sqrt{28n^2 + 1}$ is an odd multiple of $2$. So $k$ is an even multiple of $2$, in other words a multiple of $4$, as also is $k-4$. If $2$ occurs to the power $\alpha$ in the prime factorisation of $n$ then it occurs to the power $2\alpha+4$ in the product $k(k-4)$. But either $k$ or $k-4$ must be an odd multiple of $4$ and therefore contains $2$ to the power $2$. So the other element of that product contains $2$ to the power $2\alpha+2$. Thus the prime $2$ occurs to an even power in the prime factorisations of both $k$ and $k-4$.

If $p$ is an odd prime factor of $k$ then it is not a factor of $k-4$. If in addition $p\ne7$ then $p$ occurs to an even power in the prime factorisation of $112n^2$. So it must occur to an even power in the prime factorisation of $k$. Similarly, each prime factor of $k-4$ apart from $7$ must occur to an even power.

Finally, $7$ must be a factor of $k$ or $k-4$, but not both. So one of the numbers $k$ and $k-4$ is a square, and the other one is a multiple of $7$. If $k$ is a multiple of $7$ then $k\equiv0\pmod7$ and so $k-4\equiv3\pmod7$. But a square cannot be congruent to $3$ mod $7$. So $k$ cannot be a multiple of $7$ and is therefore a square.

It seems quite hard to find examples of positive integers $n$ such that $\sqrt{28n^2 + 1}$ is an integer. These are the only ones I could find (using the method from this thread and working with the continued fraction convergents for $\sqrt7$): $$\begin{array}{c|c|c|c} n&m = \sqrt{28n^2+1}&k = 2+2\sqrt m & \sqrt k \\ \hline 24 & 127 & 256 & 16 \\ 6096 & 32257 & 64516 & 254 \\ 1548360 & 8193151 & 16386304 & 4048. \end{array}$$

Well-known member
Because $2\sqrt{28n^2+1} + 2$ is integer so is $\sqrt{28n^2+1}$
$\sqrt{28n^2+1}$ As it is odd let it be $2m + 1$
So $28n^2 + 1 = (2m+1)^2$
Or $28n^2 = 4m^2 + 4m$
Or $7n^2= m^2 + m = m(m+1)$
Now m and m+1 are co-primes so there exist some co-primes s and t such that $n= st$ , $m= 7s^2$ and $m+1 = t^2$ or or $m+1 = 7 s^2$ and $m = t^2$
Now $m + 1 = 7s^2$ and $m = t^2$ => $t^2 + 1 = 7s^2$
Or $t^2 = 6 \pmod 7$
Above is not possible as $t^2 = 0/1/2/ 4 \pmod 7$
So $m + 1 = t^2$
Or $28n^2 + 1 = (2t^2-1)^2$
Or $2\sqrt{28n^2+1} + 2= 2(2t^2-1) + 2 = 4t^2 = (2t)^2$ which is a perfect square

Proved

Last edited: