## 11, 111, 1111, … Not a Square.

### December 18, 2011

I just saw this problem in a book of algebra problems, and I thought it was nice given one of the previous posts I had up here.

**Problem. **Show that 11, 111, 1111, 11111, … are not squares.

You ought to think about this for a bit. I started by supposing they were squares and attempting to work it out like that; unfortunately, there are some strange things that happen when we get bigger numbers. But. You should see a nice pattern with the last two digits. Click below for the solution, but only after you’ve tried it!

**Solution.** Here’s a funky way to do it. Note that any odd square modulo 4 is equal to 1. Here’s how to see that:

Now we have some nice tool to use: specifically, we can just show that none of these 11…111’s are 1 modulo 4. Sounds intimidating, but it’s actually not so bad.

Let’s write these 11…111’s as a sum. This is

and note that 4 divides all but (this is also how we show the trick for divisibility by 4). Note last that we have that 11 is 3 modulo 4. Hence, we cannot have any of these numbers be a square.

**Better Problem.** Show that ANY integer ending in 11 is not a square.

**Solution.** Exact same process.

Perhaps this is not breath-taking to some of you (especially those of you who have taken number theory) but it is an interesting way to use modular arithmetic to prove things in the integers. If anyone has any other proofs of this (that are fundamentally different than the one above), leave them in the comments: I’d be interested to know!

(… + 10a + b)^2 = … + 20(ab)+b^2

digits in square are

… | a | 2ab | b^2

ending in 11 implies b = 1.

must have 2ab = 1 as well. not possible.

game over.

I like this way, but we note that at the end if this ends in 1 it doesn’t necessarily mean that b = 1. It could be the case that b = 9, since that’s 81. Then we have a crappy carry which will give us 8 + 18a and this needs to be 1. Of course, this cannot end in 1 as it’s always even. So, yeah, it’s not bad to do directly.

Ah snap… good catch. That’s a nice little problem.

Another way is:

Squares ending in 1 are of the form ( 10 EVEN + – 1)^2. So that is 100 EVEN^2 + – 20 EVEN + 1 . Second digit must always be even.

Sorry not quite right

(2n +- 1)^2 = 4n^2 +- 4n +1