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\}$).


Hint: Perfect squares are not of the form $4k+3$, where $k$ is an integer.


Hint: For an even integer, $n=2j$, then $n^2 = (2j)^2 = ??$ For an odd integer, $n=2j+1$, then $n^2 = (2j+1)^2 = ??$.


A square number can never end with two odd digits

If it did it would have to be the square of an odd number $x = 10a+b$ where $b$ is odd.

$x^2 = 100a^2 + 20ab + b^2$ so you just have to check for $x = 1,3,5,7$ or $9$ that the 10s digit is even and the rest follow.


Let suppose that there exists a number that squared gives $11 \cdots111$. Let $ba$ be its last two digits. Then either $a=1$ or $a=9$.

But if $a=1$, then the tens digit is $b + b \pmod{10}$ , which is even.

If $a=9$, , then the tens digit is $9 b + 8 + 9 b \pmod{10} = 18 b + 8 \pmod{10}$; which is also even.

Then, the tens digit cannot be $1$.

By the same reasoning, you can get the stronger result (see Philip Gibbs' answer) that a square cannot end with two odd digits.


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.


If $n\equiv11\pmod{100}$, then $$ \begin{align} n &=100k+11\\ &=4(25k+2)+3\\ &\equiv3\pmod{4} \end{align} $$ If $n$ is even, $n=2k$ and $n^2=4k^2$. Thus, $n^2\equiv0\pmod{4}$.
If $n$ is odd, $n=2k+1$ and $n^2=4(k^2+k)+1$. Thus, $n^2\equiv1\pmod{4}$

Therefore, whether $n$ is even or odd, $n^2\not\equiv3\pmod{4}$, and consequently, $$ n^2\not\equiv11\pmod{100} $$