Suppose that $n \in \mathbb{Z}$. Prove that if $n^2 + 1$ is a perfect square, then $n$ is even.

801 Views Asked by At

This is a homework problem that I cannot figure out. I have figured out that if $n^2 + 1$ is a perfect square it can be written as such:

$n^2 + 1 = k^2$.

and if $n$ is even it can be written as such:

$n = 2m$

I believe I'm supposed to use the fact that if $n \pmod{4} \equiv 0$ or $1$ then it's a perfect square (maybe that's wrong).

I cannot figure this out.

3

There are 3 best solutions below

0
On

You have the useful fact backwards. It’s not true that if $n$ is congruent to $0$ or $1$ mod $4$, then $n$ is a perfect square: $5\equiv1\pmod4$, and $8\equiv0\pmod4$, but neither $5$ nor $8$ is a perfect square. What is true is that if $n$ is a perfect square, then $n\equiv0\pmod 4$ or $n\equiv1\pmod 4$. To prove this, just show that the square of an even number is always congruent to $0$ mod $4$, and the square of an odd number is always congruent to $1$ mod $4$.

Thus, if $n^2+1$ is a perfect square, it must be congruent to $0$ or $1$ mod $4$. So must $n^2$. The only possibility, then, is that $n^2\equiv0\pmod4$ and $n^2+1\equiv1\pmod4$. But then $n^2$ is even, so ... ?

0
On

If $n^2+1$ is a perfect square then $n=0$, and $0$ is even. You can prove this by factoring the equation as $(k-n) \cdot (k+n) = 1$.

0
On

Suppose n is odd, write $n=2m+1$. Then $n^2+1=(2m+1)^2+1=4m^2+4m+2$, which is even. Therefore if this is a perfect square, it must be divisible by $4$. But clearly $n^2+1\equiv 2\pmod 4$, a contradiction.