# Prove that $6(10^{n_1}+10^{n_2}+\cdots+10^{n_k})$ cannot be a perfect square.

Let $m$ be a natural number with digits consisting entirely of $6$’s and $0$’s. Prove that m is not the square of a natural number.

I started by noting that $m=6(10^{n_1}+10^{n_2}+\cdots+10^{n_k})$ for some natural numbers, $n_1,n_2,\cdots,n_k$

Clearly $m$ has factors of $2,3,5$. I asserted that since $10^a$ is not divisible by $3$, the sums wont be divisible either, so $m$ has one factor of $3$ and cannot be a perfect square. But I realized that this needn't be valid, since $111$ is divisible by $3$, so my argument fails.

• In the formulation with the n's, you need to emphasize that the $n_j$ are distinct. Mar 25 '14 at 21:24

We may assume without loss of generality that the last two digits are not both $0$ (divide by $100=10^2$). Now notice that the last two digits of a square, i.e. the remainder upon division modulo $100$, can never be $06$, $60$ or $66$. You can check that simply by looking at the first 100 squares.

• (+1).. you don't mean literally checking the first 100 squares do you? What am I missing then? Okay I suppose I could do it, arithmetic isn't that hard.
– Guy
Mar 26 '14 at 5:16
• You need only check the squares of the $20$ numbers ending in $4$ or $6$. May 2 '14 at 19:05
• Thanks to both commenters. By "looking" I didn't mean to blindly write down the 100 first squares, but to discard obvious ones. @Sabyasachi, Lubin
– J.R.
May 6 '14 at 17:24

Note that the $n_1,\dots,n_k$ are necessarily different (otherwise $36 = 6(10^0+...+10^0)$ would be a counterexample). Let's assume $n_1<...<n_k$. Then $$m=6(10^{n_1}+...+10^{n_k})=3\cdot 2^{n_1+1}\cdot 5^{n_1}(1+10^{n_2-n_1}+...+10^{n_k-n_1}).$$

and the last factor is coprime to $2,5$. Now if $n_1$ is odd, then the power of $5$ in the prime factorization of $m$ is odd. Iff $n_1$ is even, the power of $2$ in $m$ is odd.

Either way, this is a contradiction to $m$ being a square.

The nonzero remainders of squares $\pmod {100}$ are $$1, 4, 9, 16, 21, 24, 25, 29, 36, 41, 44, 49, 56, 61, 64, 69, 76, 81, 84, 89, 96,$$ As already pointed out in the quicker answers, you may divide out by 100 until the number is not divisible by 100. Then we find that 06 and 60 are not the final two digits of a square.

Decided to post my own answer that I recently figured out since the accepted one involves computing 50 squares.

$$x=(\cdots\cdots6) \text{ or } x=(\cdots\cdots00)$$

In the first case, clearly $x$ is even so, $$4n^2=10k+6=100k_1+6 \quad\text{or } 100k_1+66$$

Both of which are absurd.

In the second case, we divide by $100$ and we are back to either case $2$ or case $1$.

Q.E.D.