Problem 2 of the Canadian Mathematical Olympiad 1987

The number 1987 can be written as a three digit number xyz in some base b. If x + y + z = 1 + 9 + 8 + 7, determine all possible values of x, y, z, b.

Solution by Steve Dinh, a.k.a. Vo Duc Dien

Converting number xyz in base b to base 10, we have

xbē + yb + z = 1987 but

x + y + z = 1 + 9 + 8 + 7 = 25.

Taking the different of the two equations, we have

(b – 1) [x(b + 1) + y] = 1987 – 25 = 1962 = 2 × 3 × 3 × 109 where all the factors are prime.

Obviously, b - 1 < x(b + 1) + y. Therefore, b - 1 can only equal one of 2, 3, 2×3 = 6, 3×3 = 9, or 2×3×3 = 18. As obvious is the fact that b - 1 could not be 2, 3, or 6 because then each of x, y, z would be less than 7 and their sum less than 25. With b - 1 = 9, i.e., b = 10, xyz would be a 3-digit decimal number and thus less then 1987.

The only remaining possibility is then b – 1 = 19 - 1, b = 19 and x(b + 1) + y = 20x + y = 109, which has a single solution in positive integers: x = 5, y = 9. From here, z = 25 – 5 – 9 = 11 (or z = B in base 19).

Answer: c = 5, y = 9, z = B, b = 19.