Why a $20$ digit number starting with eleven $1$'s cannot be a perfect square?
I haven't been able to figure out which properties of perfect squares disallows such a number from being a perfect square.
Why a $20$ digit number starting with eleven $1$'s cannot be a perfect square?
I haven't been able to figure out which properties of perfect squares disallows such a number from being a perfect square.
That's because\begin{align*}3\,333\,333\,333^2&<11\,111\,111\,111\,000\,000\,000\\&<11\,111\,111\,111\,999\,999\,999\\&<3\,333\,333\,334^2.\end{align*}
Adding onto the answer by José Carlos Santos, here's a way to compute the approximate square root by hand efficiently:
$$\sqrt{11111111111000000000} < \sqrt{11111111111111111111 + \frac{1}{9}} < \sqrt{11111111111999999999}$$ $$\sqrt{11111111111111111111 + \frac{1}{9}} = \sqrt{\frac{10^{20}}{9}} = \frac{10^{10}}{3} = 3333333333 + \frac{1}{3}$$
Then, how to check that the neighboring squares fall outside the desired range, by hand:
\begin{align*} \left\lfloor\frac{10^{10}}{3}\right\rfloor^2 &= \left(\frac{10^{10}}{3} - \frac{1}{3}\right)^2 \\ &= \left(\frac{10^{10}}{3}\right)^2 - 2\left(\frac{10^{10}}{3}\right)\left(\frac{1}{3}\right) + \left(\frac{1}{3}\right)^2 \\ &= \frac{10^{20}}{9} - \frac{2\times10^{10} - 1}{9} \\ &< \frac{10^{20}}{9} - \frac{10^9}{9} \\ &= 11111111111000000000 \end{align*}
\begin{align*} \left\lceil\frac{10^{10}}{3}\right\rceil^2 &= \left(\frac{10^{10}}{3} + \frac{2}{3}\right)^2 \\ &= \left(\frac{10^{10}}{3}\right)^2 + 2\left(\frac{10^{10}}{3}\right)\left(\frac{2}{3}\right) + \left(\frac{2}{3}\right)^2 \\ &> \frac{10^{20}}{9} + \frac{4\times10^{10}}{9} \\ &> \frac{10^{20}}{9} + \frac{8\times10^9}{9} \\ &= \frac{10^{20}}{9} - \frac{10^9}{9} + 10^{9}\\ &= 11111111111000000000 + 10^{9} \\ &> 11111111111999999999 \end{align*}
Let's show more generally that a $2n$-digit square cannot begin with $n+1$ $1$'s.
Note that the smallest $2n$-digit number beginning with $n+1$ $1$'s is
$$11{\ldots}110{\ldots}0={10^{2n}-10^{n-1}\over9}$$
and the largest is
$$11{\ldots}119{\ldots}9={10^{2n}-10^{n-1}\over9}+10^{n-1}-1={10^{2n}+8\cdot10^{n-1}-9\over9}$$
Since $10^{n-1}\lt2\cdot10^n-1$ while $8\cdot10^{n-1}-9\lt2\cdot10^n+1$, we obtain
$$\left(10^n-1\over3 \right)^2={10^{2n}-2\cdot10^n+1\over9}\lt{10^{2n}-10^{n-1}\over9}=11{\ldots}110{\ldots}0$$
while
$$11{\ldots}119{\ldots}9={10^{2n}+8\cdot10^{n-1}-9\over9}\lt{10^{2n}+2\cdot10^n+1\over9}=\left(10^n+1\over3\right)^2$$
Thus if $11{\ldots}110{\ldots}0\le N\le11{\ldots}119{\ldots}9$, then
$${10^n-1\over3}\lt\sqrt N\lt{10^n+1\over3}\lt{10^n+2\over3}$$
But $(10^n-1)/3$ and $(10^n+2)/3$ are consecutive integers (their difference is $1$). So $\sqrt N$ cannot be an integer.
Remark 1: This answer owes much of its logic to a now-deleted answer by achille hui.
Remark 2: This answer was motivated by JollyJoker's first comment beneath the OP. JJ's follow-up comment there makes it clear that squares with $2n+1$ digits can begin with more than $n+1$ $1$'s.
If $|a|<1$ then $1-\frac {|a|}{2+|a|}\leq \sqrt {1+a}\;\leq 1+\frac {|a|}{2}.$
If $n$ is a $20$-digit number beginning with $11$ ones then $n=(1+a)10^{20}/9$ with $|a|<10^{-10},$ so $$\left(1-\frac {|a|}{2+|a|}\right)10^{10}/3 \leq\sqrt n\;\leq \left(1+\frac {|a|}{2}\right)10^{10}/3$$ which immediately implies $3 333 333 333<\sqrt n\;<3 333 333 334.$
There is no integer between $\sqrt{11111111111000000000}$ and $\sqrt{ 11111111112000000000}$
Let me explain how I would approach this manually (without excessive calculations or calculators); the conclusion will be the same as in the answer by José Carlos Santos. Some amount of computation is inevitable since the numbers are large. In fact, even more is true than your problem asserts; there is no 20-digit number with ten leading ones which is a perfect square.
First, observe that $$ (0.333\dots)^2=(1/3)^2=1/9=0.111\dots $$ A 20-digit number with many leading ones will be close to $10^{20}\times0.111\dots$, so its square root will be close to $10^{10}\times0.333\dots\approx3\,333\,333\,333$.
This means that we have an approximate square root $a=3\,333\,333\,333$. So far, we don't know how good this approximation is. Now, computing the square of this $a$ is a bit laborious. First, you can hopefully convince yourself that $$ (1\,111\,111\,111)^2=1\,234\,567\,900\,987\,654\,321. $$ To see this, multiply the number $1\dots1$ with $1$, $10$, $100$ and so forth, and sum these up — a pattern will emerge. To get the square of $a$, multiply by $3^2=10-1$. This is fairly simple, given the structure of the number above, so that $$ a^2=11\,111\,111\,108\,888\,888\,889. $$ An alternative method for squaring $a$ was suggested in a comment by James Waldby: Since $a=\frac13(10^{10}-1)$, we have $a^2=\frac19(10^{20}-2\cdot10^{10}+1)$.
The next integer square is $$ (a+1)^2=a^2+2a+1=11\,111\,111\,155\,555\,555\,556, $$ which again is pretty easy to calculate mentally since the numbers are so nice.
Since the two numbers $$ 11\,111\,111\,108\,888\,888\,889\text{ and}\\ 11\,111\,111\,155\,555\,555\,556\phantom{\text{ and}} $$ are consecutive integer squares, no integer square of 20 digits starts with a run of more than nine ones.
If instead of precise calculations you used crude approximations, you would still get the desired result for eleven ones.
Let $x$ be a positive integer with $2n$ digits when written in base $b>1$, where the $n+1$ first digits are 1's, and where we will assume that $b-1=d^2$ is a perfect square. Note that this holds in the decimal system ($b=10$), as $10-1=9=3^2$. It also holds in the binary system ($b=2$), and with respect to several other bases.
Assume that $x$ is a perfect square, $x=c^2$. Then $$b^{2n-1}+\dots+b^{n-1}\leq c^2\leq b^{2n-1}+\dots +b^{n-1}+(b-1)\Bigl(b^{n-2}+\dots+1\Bigr)$$ Summing the geometric series, we get $$b^{n-1}{b^{n+1}-1\over b-1}\leq c^2\leq b^{n-1}{b^{n+1}-1\over b-1}+(b^{n-1}-1)$$ Multiply by $b-1=d^2$ and subtract $b^{2n}$. This gives $$-b^{n-1}\leq c^2d^2-b^{2n}\leq -b^{n-1}+(b-1)(b^{n-1}-1)$$ It follows that $$-b^{n-1}\leq (cd+b^n)(cd-b^n)<b^{n}$$ Now $d$ divides $b-1$, and hence $d$ cannot divide $b^n$. So $cd-b^n$ is a nonzero integer, but then one of the inequalities above must be violated. It follows that the assumption that $x$ was a perfect square cannot hold.
Edit: An example to show that the result is not true in all bases. Let $b=n=3$, and observe that $(111101)_3=1\cdot 3^5+1\cdot 3^4+1\cdot 3^3+1\cdot 3^2+1\cdot 3^0=361=19^2$ is a perfect square with $n+1=4$ initial 1's. But then $b-1=2$ is not a perfect square, as was required in the argument above.