# Problem of the Week Problem D and Solution Favourite Numbers

## Problem

Dandan likes numbers that remind her of her name. That is, she likes six-digit numbers formed by repeating a three-digit number, such as $$305\,305$$, $$417\,417$$, and $$832\,832$$.

What is the greatest common factor of all such numbers?

## Solution

To get started, we look at the prime factorization of each of the given numbers. \begin{aligned} 305\,305&=5\times 7\times 11\times 13\times 61\\ 417\,417&=3\times 7\times 11\times 13\times 139\\ 832\,832&=2\times 2\times 2\times 2\times 2\times 2\times 7\times 11\times 13\times 13\end{aligned} We notice that all of these numbers are divisible by $$7\times 11\times 13=1001$$. These are the only factors common to all three numbers. We can pick another six-digit number formed by repeating a three-digit number and test to see if it is also divisible by $$1001$$. The number $$246\,246$$, for example, is $$1001\times 246$$. It would appear $$1001$$ could be the greatest common factor of all such numbers, but we have not proven this.

Let $$abc\,abc$$ be any six-digit number formed by repeating the three-digit number $$abc$$. \begin{aligned} abc\,abc&=abc000+abc\\ &=1000\times abc + abc\\ &=1000\times abc + 1\times abc\\ &=1001 \times abc\end{aligned} Since $$abc\,abc=1001\times abc$$, it is divisible by $$1001$$. A specific number $$abc\,abc$$ may also have other factors, but $$1001$$ is the largest factor common to all such numbers. In the first example $$305\,305=1001\times 5\times 61$$ and in the second example $$417\,417=1001\times 3\times 139$$. Both numbers have other factors but no other common factors greater than $$1$$. In some cases there will be other common factors greater than $$1$$, but not in general.

Thus, we have proven that $$1001$$ is the greatest common factor of all six-digit numbers formed by repeating a three-digit number.

This problem is not hard if you initially "get it". The solution presented shows an approach that can be taken when you may not be certain where to begin. Try some specific examples and then attempt to generalize based on what you observe from the specific examples. Also note that discovering that $$1001$$ worked for the three given examples and the test example is not sufficient to make a general conclusion that $$1001$$ is the greatest common factor of all such numbers.