When is $ 999\cdots$ a perfect square?

Write: $$10^{2n+1}-1 = a^2$$

so $a=2k+1$ and now we have $$2^{2n+1}5^{2n+1}= 2\underbrace{(2k^2+ 2k+1)}_{\rm odd}$$

so $2^{2n+1}=2$ and thus $n=0$. Finally we have $9 = a^2$ so $a=3$.


The only number consisting entirely of nines that's a perfect square is $9$ itself.

Suppose $999$ were a perfect square. It would have the form $(2n+1)^2$ with$n$ a whole number. Therefore

$(2n+1)^2=4n^2+4n+1=999$

$4n(n+1)=998$

So $998$ has to be a multiple of $4$, but that doesn't work because the last two digits $98$ would have to be a multiple of $4$ and they aren't really so. So, the second equation above has no whole number solutions, the first equation can't have any such solutions either and $999$ fails to be a perfect square.

The same thing happens with any number ending with $99$, since the last two digits are what ultimately decides what can be a multiple of $4$. Once we have two nines at the end, therefore, there can never be a perfect square.


Any odd perfect square is of form $4k+1$ for some $k$. Now let $$a^2=10^{n}-1$$if $n\ge 2$ we have $$a^2=10^2\cdot10^{n-2}-1=4k-1$$which can't be a perfect square. So the only perfect square may be among those numbers with $$0\le n<2$$or $$0,9$$which are the only solutions.