can a number of the form $x^2 + 1$ be a square number?

I have been trying to prove that $x^2 + 1$ is not a perfect square (other than $0^2 +1^2=1^2$). I'm stuck and can't move forward.

The thing I have tried so is to relate the problem to a hyperbola and find an integer solution for both $x$ and $y$ when $a=b=1$. The pell's equation came up in my search, but I don't understand it fully.

Note: I was in a confused state and @CoolHandLouis' visual answer cleared my muddled mind, so I selected that answer. In that way, his answer was very helpful to me. @Alessandro's proof is clear to me now and if I could accept two answers, I would accepted that one too. Thanks to everyone for helping!

• If $x^2 + 1 = y^2$ then $1 = (y-x)(y+x)$ and both factors are integers... Commented Jan 15, 2015 at 6:44
• $0^2 + 1 = 1$ is a perfect square Commented Jan 15, 2015 at 6:48
• As @Arthur points out, what is $x$? Can $x$ be zero? Is $x$ a positive integer?
– JRN
Commented Jan 15, 2015 at 6:52
• @Winther I was trying that but couldn't follow through ..I know there is some obvious thing I'm missing .can you please elaborate Commented Jan 15, 2015 at 6:57
• @GaryB - It's not supposed to be $x^2+ 1 = x^2$. It's supposed to be $x^2 + 1 = y^2$, which isn't too farfetched. Although it is provably impossible.
– Alec
Commented Jan 15, 2015 at 7:26

$(n+1)^2-n^2=2n+1$, that is, the difference of consecutive squares is the $n$-th odd number.

Since 1 is the first odd number it is the difference of the second and the first square: $0^2+1=1^2$

• sorry I was not looking for the first trivial solution. Commented Jan 15, 2015 at 7:02
• My argument shows that it's the only one, subtracting bigger consecutive squares you obtain bigger odd numbers Commented Jan 15, 2015 at 7:03
• For a formal proof, you would have to consider the possibility of two squares of numbers more than $1$ apart. Commented Jan 15, 2015 at 10:24
• If $x^2$ and $x^2+1$ are both squares they must be consecutive squares, since they are consecutive numbers and for nonnegative distinct integers $a^2<b^2<c^2$ iff $a<b<c$ Commented Jan 15, 2015 at 13:39
• @Prism: If $x^2$ and $x^2+1$ are both squares than they must be consecutive squares, so we only need to show that they can't be consecutive squares and not that they can't both be squares. The difference between $(x+1)^2$ and $x^2$ is $2x+1$. In our case we want this difference to be $1$, solving $2x+1=1$ we find that $x=0$ is the only solution, so the only 2 consecutive squares with difference $1$ are $0^2$ and $(0+1)^2$. Commented Jan 17, 2015 at 9:58

If $x>1$, then $x^2+1$ cannot be a perfect square because $x^2<x^2+1<(x+1)^2$.

In other words, $x^2+1$ lies between the two consecutive perfect squares $x^2$ and $(x+1)^2$.

If $x,y$ are integers with $x^2+1=y^2$, then $1=y^2-x^2=(y+x)(y-x)$. The only integer factorizations of $1$ are $1=1\cdot 1=(-1)\cdot (-1)$, hence $x=0$ and $y=\pm1$.

We want to prove $x^2 + 1$ can never be a perfect square.

Let

• $f(x) = x^2$

Then,

$f(x)$     $<$     $f(x) + 1$     $<$     $f(x+1)$

$x^2$         $<$        $x^2 + 1$     $<$      $x^2 + 2x + 1$        (for all $x > 0$).

Therefore, $x^2 + 1$ cannot be a perfect square (except $x = 0$) because it will always be greater than the prior perfect square and less than the next perfect square.

The following table illustrates this. Note that $f(x)$ is the set of all perfect squares:

x    f(x)=x^2       x^2+1       f(x+1)
0        0            1            1
1        1            2            4
2        4            5            9
3        9           10           16
4       16           17           25

• Thanks @CoolHandLouis but I wanted to know why ? why can't we have a perfect square for g(x).I was looking for a way to either prove or disprove it. Commented Jan 15, 2015 at 7:14
• I just added a clarification: because f(x) < g(x) < f(x+1). The series of f(x) is the series of all perfect squares, and other than f(0), f(x) < g(x) < f(x+1). Commented Jan 15, 2015 at 7:17
• yeah you are right .please edit you answer to include the $f(x) < g(x) < f(x+1)$ equates to $x^2< x^2 +1 <X^2+2X+2$ in you answer and i'll select yours Commented Jan 15, 2015 at 7:43
• I thought it made sense to me but when I was trying your proof .you assumption that $g(x) < f(x+1)$ came up and I was quickly doing the expansion of the $g(x) ,f(x+1)$ terms and thought that the underlying proof is still the same as Alessandro's Commented Jan 15, 2015 at 7:54
• I don't know, if I were you, I'd strip it down to "the answer proper" (I was tempted to during my edit). I may be old and ignorant about the latest social media trends, but I do know one thing: some people on the Internet are going to be petty and downvote your answer for reasons that have nothing to do with your answer's intrinsic merits. Commented Jan 15, 2015 at 22:47

There's a more general result called Catalan's conjecture (now proved).

$$x^y+1$$ is never a perfect power for any natural $x,y>1$ (except for $(x,y)=(2,3)$).

Given an integer $n$, $n^2 = n \times n$. That's obvious enough.

But what's $n^2 - (n - 1)^2$? As it turns out, it's $2n - 1$ (let me know if you want me to elaborate on that).

Then we're looking for solutions to $n^2 = x^2 + 1$ where $x$ is also an integer. Since both $n$ and $x$ are integers, $n^2$ and $x^2$ must be consecutive perfect squares. This leads to $$n^2 - x^2 = 2n - 1 = 1.$$ The only possible solution with $n$ positive is $n = 1$, so that $2n = 2$ and $2 - 1 = 1$.

What if we allow negative integers? There is one other solution: $n = 0$, $x = -1$.

There is also something called imaginary numbers. There might be a solution among them, but I only barely understand that concept, so I wouldn't even be able to begin looking for a solution among those.