# How to prove that $11…111$ is not the sum of two perfect squares

I'm stuck with this problem:

Show that $a=11...111$ is not the sum of two perfect squares. That is to say, there are no pair of integers ($b$ , $c$) so that $b^2+c^2=a$. I think I am supposed to use equivalence classes in some way, but I do not know how to approach it.

• No number congruent to $3\pmod 4$ can be the sum of two squares. every square is either a multiple of $4$ or $1$ more than a multiple of $4$. – lulu Feb 15 '17 at 20:29

Since $a$ is odd, $b$ and $c$ have different parity: $b$ is even and $c$ is odd, say.

Then $b^2+c^2\equiv 1\pmod 4$, but $a\equiv 3\pmod 4$.

In fact, no sum of two squares ends with $11$.

It's easy to prove that every perfect square numbers, when is divided by 4, the remainder must be 0 or 1. And now the solution is clear.

$$a = \underbrace{1111\dots11}_{n} = \sum^{n-1}_{k=0}10^k= \frac{10^{n}-1}{9}$$

$$\frac{10^{n}-2}{9} +\frac{1}{9} =$$

$$\underbrace{\left(\frac{\sqrt{10^{n} - 2}}{3}\right)^2}_{b^2}+\underbrace{\left(\frac{1}{3}\right)^2}_{c^2}= a$$ $$b, c \notin \mathbb{Z}$$

Also $a$ is not the sum of two perfect squares. $\Box$

• This is just an example of two non-integer $b$ and $c$. It doesn't mean all such pairs can't be integer. – Babak Feb 25 '17 at 17:34

$a$ is also not the sum of three perfect squares once it ends in at least three digits (all $1$). As $1000$ is divisible by $8,$ we then have $$a = bcdefgh111 = 1000 w + 111 \equiv 7 \pmod 8$$

• $3332^2 + 0^2 + 0^2 = 11102224$. – Starfall Feb 16 '17 at 6:35
• @Starfall see edit – Will Jagy Feb 16 '17 at 17:54