For odd integers $n$, can you prove that $10^n+1$ is **not** a perfect square?
['https://math.stackexchange.com/questions/1167669', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/-1/']
Since $10\equiv1\pmod3$, it suffices to note that $1^n+1=2$ is not a quadratic residue modulo $3$. (We don't even need the assumption that $n$ is odd.)
> 
> In general, let $a\in\mathbb{P}$ (prime numbers) and suppose $a^n+1$ is a perfect square for some $n\in\mathbb{N}\setminus\{1\}.$ 
> 
> 
> 

Then there is $x\in\mathbb{N}$ such that $x^2=a^n+1$ and therefore $a^n=(x+1)(x-1).$ Then we can write $a^p=x+1$ and $a^q=x-1$ for some integers $p,q\in\mathbb{N}\cup\{0\}$ such that $p+q=n$ and $p>q.$ This clearly implies $a^p-a^q=2.$

* If $q=0,$ we get $a=3$ and $p=1$ which implies $$3^1+1=2^2.$$
* If $q\neq 0,$ we get $a=2$ and $p=2, q=1$ which implies $$2^3+1=3^2.$$