<s>[INST] Prove that none of $\{11, 111, 1111,\dots \}$ is the perfect square of an integer Please help me with solving this :
prove that none of $\{11, 111, 1111 \ldots \}$ is the square of any $x\in\mathbb{Z}$ (that is, there is no $x\in\mathbb{Z}$ such that $x^2\in\{11, 111, 1111, \ldots\}$).
 [/INST] Every integer is of one of the forms $\color{green}4k$, $\color{green}4k+\color{red}1$, $\color{green}4k+\color{red}2$ or $\color{green}4k+\color{red}3$ with $k$ integer. The square of an integer has therefore one of the forms


*

*$(\color{green}4k)^2 = 16k^2 = \color{green}4(4k^2) = \color{green}4k_0$,

*$(\color{green}4k+\color{red}1)^2 = 16k^2+8k+1 = \color{green}4(4k^2+2k)+\color{red}1 = \color{green}4k_1+\color{red}{1}$,

*$(\color{green}4k+\color{red}2)^2 = 16k^2+16k+4 = \color{green}4(4k^2+4k+1)=\color{green}4k_2$ or

*$(\color{green}4k+\color{red}3)^2 = 16k^2+24k+9 = \color{green}4(4k^2+6k+2)+\color{red}1 = \color{green}4k_3+\color{red}1$.


That is, a perfect square is equivalent either to $\color{red}0$ or to $\color{red}1$ modulo $\color{green}4$.
On the other hand, $R_n=\underbrace{1\ldots1}_n=(10^n-1)/9$ for $n>1$ has the form


*

*$R_n=100R_{n-2}+11 = \color{green}4(25R_{n-2}+2)+\color{red}3 = \color{green}4k_r+\color{red}3$.


That is, for $n>1$, $R_n$ is equivalent to $\color{red}3$ modulo $\color{green}4$, which as shown above does not happen for perfect squares.
</s>