When is $ 999\cdots$ a perfect square

algebra-precalculusdiscrete mathematicselementary-number-theorysquare-numbers

I'm interesting to look more about property of this number $ 999\cdots$ , for even digits which form that number it's clear that's not a perfect square for example :$ 99=10^2-1,9999=10^4-1,\cdots$ , Now my question is: what about if the numbers of digits of $ 999\cdots$ is odd ? how i proof or disproof that is a perfect square or nor ?

Note: The trivial case is for $n=1$ which is $9$

Best Answer

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$.

Related Question