Ask Uncle Colin: A Six-Digit Square

Dear Uncle Colin,

I’m told a six-digit number, ABC,DEF1, is a perfect square such that DEF is 8 times ABC. How do I find this number?

- Very Interesting, Except That Eight

Hello, VIETE, and thanks for your message! This is as much of a typographical challenge as it is a mathematical one.

So, there are a couple of ways into this that I can see.

Bounds on the numbers

We know that ABC is at least 100 (or else the big number wouldn’t really be a six-digit number.)

Similarly, we know that DEF is at most 999, or else it wouldn’t be a three-digit number.

Because DEF is eight times as large as ABC, that means ABC must be smaller than 125.

If we wanted to, we could then check all of the possibilities for ABC between 100 and 124 (inclusive) to see which one(s) work. (In fact, we could exclude all of the possibilities for ABC that end in 1, 4, 6 or 9 since those would make DEF end in 2 or 8, and no square numbers do. The fives won’t work, either, so we’d only need to check about a dozen numbers.


We can do better than that, though! We can note that ABC,DEF must be $1,008 \times$ ABC. (Why?)

For that to be square, each of the prime factors of the big number must be raised to an even power. And we know some of the factors already: $1008 = 2^4 \times 3^2 \times 7$.

That means ABC must be a multiple of 7; because we’ve put tight bounds on the number, we can say it must be 105, 112, or 119. However, neither 105,840 nor 119,952 is a square (since squares don’t end with 40 or with 2) - so 112,896 is the only candidate for ABC,DEF - it’s $336^2$.

(We could also assert that ABC must be 7 multiplied by a square, and $7 \times 16 = 112$ is the only possibility).

Hope that helps!

- Uncle Colin


Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.

  1. I’m using bold to represent concatenation of digits []


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.

On twitter