23. Given four different non-zero digits, it is possible to form 24 different four-digit numbers containing each of these four digits.
What is the largest prime factor of the sum of the 24 numbers?
A 23
B 93
C 97
D 101
E 113
Solution
D

Let the four different non-zero digits be $a, b, c$ and $d$. If we use them to make 24 different four-digit numbers, then each of $a, b, c$ and $d$ occurs 6 times in the units position, 6 times in the tens position, 6 times in the hundreds position, and 6 times in the thousands position.
It follows that the digits in the units position contribute $6(a+b+c+d)$ to the sum of all 24 numbers, and the digits in the tens position contribute $6(a+b+c+d) \times 10=60(a+b+c+d)$ to this sum. Similarly, the digits in the hundreds position contribute $600(a+b+c+d)$ and those in the thousands column contribute $6000(a+b+c+d)$.
Therefore the total sum of all 24 numbers is
$$
6000(a+b+c+d)+600(a+b+c+d)+60(a+b+c+d)+6(a+b+c+d)=6666(a+b+c+d) \text {. }
$$

We can factorize 6666 into primes, as follows,
$$
6666=6 \times 1111=2 \times 3 \times 11 \times 101 .
$$

Since $a, b, c, d$ are four different digits, their sum is at most $9+8+7+6=30$ and so this sum cannot have a prime factor as large as 101 . We deduce that the largest prime factor of the sum, $6666(a+b+c+d)$, of all the 24 numbers is 101 .

For inVESTIGATION
23.1 Given five different non-zero digits, it is possible to form 120 different five-digit numbers containing each of these five digits.
What is the largest prime factor of the sum of the 120 numbers?
23.2 Given six different non-zero digits, how many different six-digit numbers are there which contain each of the given six digits?
What is the largest prime factor of the sum of all these six-digit numbers?