# Show that if $2+2\sqrt{28n^2+1}$ is an integer then it must be perfect square.

As written in title, I want to prove that

If $n$ is an integer, show that if $2+2\sqrt{28n^2+1}$ is an integer than it must be perfect square.

• Start from the end: How would show that some integer is a perfect square? Jan 9, 2017 at 18:21
• math.stackexchange.com/questions/668155 Jan 9, 2017 at 18:33
• There is another solution based on Pell equation theory.
– S. Y
Jan 10, 2017 at 15:43
• What must be a perfect square? $n$? or $2 + 2\sqrt{28n^2 + 1}$? May 18, 2018 at 17:21

With suggestions of @barak manos and @ Alqatrkapa I Noted that I can improve my post.

Notice that $2+2\sqrt{28n^2+1}$ is an even integer. Also, $28n^2+1$ is a perfect square of an odd integer say $m$ (Because $28n^2+1$ is odd itself).

Now, $$28n^2=m^2-1=(m+1)(m-1)\implies 7n^2=(\frac{m+1}{2})(\frac{m-1}{2})$$

Hence, $(\frac{m+1}{2})=7a^2$,$(\frac{m-1}{2})=b^2$ or $(\frac{m+1}{2})=b^2$, $(\frac{m-1}{2})=7a^2$. This is because $7n^2$ is $7$ times of a square and thus the right side is also $7$ times a perfect square. This is only possible when one of them is $7$ times of a square and other is simply a square as $(Square * Square=Square)$, you can say that there is possibility that they both are not squares but the product is (like $2*8=16=4^2$), but notice that $(\frac{m+1}{2})$ and $(\frac{m-1}{2})$ are consecutive integers and hence coprime

If $\frac{m+1}{2}=7a^2$ and $\frac{m-1}{2}=b^2$ then $b^2\equiv-1\mod (7)$, a contradiction.

Hence, $\frac{m-1}{2}=7a^2$ and $\frac{m+1}{2}=b^2$. Hence, $2+2m=4b^2$ a perfect square.

• "$28n^2+1$ is a perfect square of an odd integer"??? I've searched up to $n=1000000$, and it holds only for $n=24$ and $n=6096$, both cases give a perfect square of an even integer (not that we need more than one counterexample to the statement, but just FYI). Jan 9, 2017 at 18:23
• Sorry, I meant that the result is even. Still, I don't see how you prove that the entire expression is a perfect square. Jan 9, 2017 at 18:26
• @Alqatrkapa, this is not the way I took the answer, I am doing it in a way that 7n^2 is 7 times of a square and thus the right side is also 7 times a perfect square. This is only possible when one of them is 7 times of a square and other is simply a square.. (Square * Square=square), you can say that there is possiblity that they both are not squares but the product is (like 2*8=16=4^2), but notice that (m+1/2) and (m-1/2) are consecutive integers and hence coprime. Jan 9, 2017 at 20:20
• @THELONEWOLF. The argument that they are consecutive, hence coprime, hence must be both squares should be included in your answer. Jan 9, 2017 at 20:22
• I thought when we are dealing with so much complex things in an answer, this can be left, but now i think I should add that info.. just wait. @Alqatrkapa Jan 9, 2017 at 20:24

Here's another answer which uses the Pell equation.

As mentioned above, in order for $2 + 2\sqrt{28y^2+1}$ to be an integer, it is necessary and sufficient that $28y^2 + 1$ is a perfect square.

Hence we must look at the solutions to Pell's equation $x^2 - 28y^2 = 1$.

All solutions to this equation are of the form $x_n+y_n\sqrt{28} = \pm\left(127+24\sqrt{28}\right)^n, n \in \mathbb{Z}$.

This means $x_n = \pm\frac{1}{2}\left[\left(127+24\sqrt{28}\right)^n+\left(127-24\sqrt{28}\right)^n\right]$.

Also note that $2 + 2\sqrt{28y_n^2 + 1} = 2+2\sqrt{x_n^2} = 2+2|x_n| = 2 + \left(127+24\sqrt{28}\right)^n + \left(127-24\sqrt{28}\right)^n$.

But $127 + 24\sqrt{28} = \left(8+3\sqrt{7}\right)^2$ and $\left(8+3\sqrt{7}\right)\left(8-3\sqrt{7}\right) = 1$ so we finally obtain: $$2+2\sqrt{28y_n^2+1} = \left(8+3\sqrt{7}\right)^{2n} + 2\left(8+3\sqrt{7}\right)^n\left(8-3\sqrt{7}\right)^n+\left(8-3\sqrt{7}\right)^{2n} = \left[\left(8+3\sqrt{7}\right)^n+\left(8-3\sqrt{7}\right)^n\right]^2$$

which is the square of an integer (you can check with the binomial theorem).

• good answer via pell equations May 20, 2018 at 13:23

This stuff comes from a Pell equation.

It seems likely that https://en.wikipedia.org/wiki/John_Pell was in France on many occasions, in which case he may well have said

Au fait, je m'appelle Pell.



For the curious, the values of $n$ that work are $$0, \; \; 24, \; \; 6096, \; \; 1548360, \; \; 393277344, \; \; \cdots$$ satisfying $$n_{j+2} = 254 n_{j+1} - n_j$$ and $w = \sqrt{2 + 2 \sqrt{28 n^2 + 1}}$ $$2, \; \; 16, \; \; 254, \; \; 4048, \; \; 64514, \; \; \cdots$$ satisfying $$w_{j+2} = 16 w_{j+1} - w_j$$