Dear Uncle Colin,

I’m told a six-digit number, ABC,DEF ((I’m using bold to represent concatenation of digits)), 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.

Factors

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