# Find all positive integers $n$ such that $\sqrt{1996\cdot1997^n+1997 }$ is a perfect square.

Find all positive integers $n$ such that $\sqrt{1996\cdot1997^n+1997 }$ is a perfect square.

So, I've attempted looking at modulo 4, as a perfect square is congruent to 0 or 1 (mod 4), but that was useless. I tried looking at modulo 3 and got that n is odd, but I don't know what to do further.

• Do you mean such that the full number is a perfect square, or so that the number under the $\sqrt{}$ sign is a perfect square (so that the result is an integer)? – Mees de Vries May 28 '18 at 14:24

## 2 Answers

Hint

$$1996\cdot 1997^n+1997=(1997-1)1997^n+1997=$$ $$1997^{n+1}-1997^n+1997=1997(1997^n-1997^{n-1}+1)=k^2$$

but $1997$ is a prime number and $n>0$, so $1997|(1997^n-1997^{n-1}+1)\to 1997|(1997^{n-1}-1)$.

So, what is the only one solution? Can you finish?

Note that $x=1997$ is prime and that $x(x^n-x^{n-1}+1)=a^2$, so if $n>2$ then $x^n-x^{n-1}+1-x(x^{n-1}-x^{n-2})=1$ thus $gcd(x^n-x^{n-1}+1,x)=1$ iff $x>2$ and so we have $x=c^2$ which cannot be true since $1997$ is prime. So we are only left with the $n=2$ case...