CEMC Banner

Problem of the Week
Problem D and Solution
Favourite Number 2

Problem

The digit sum of a positive integer is the sum of all its digits. For example, the digit sum of the integer \(2345\) is \(2+3+4+5=14\).

Ayumi announced that her favourite number is a three-digit positive integer with a digit sum of \(9\). Vinnie then wrote down a three-digit positive integer with a digit sum of \(9\). What is the probability that the number Vinnie wrote was Ayumi’s favourite number?

Solution

There are twelve triples of digits that sum to \(9\). These are: \((9,0,0)\), \((8,1,0)\), \((7,2,0)\), \((7,1,1)\), \((6,3,0)\), \((6,2,1)\), \((5,4,0)\), \((5,3,1)\), \((5,2,2)\), \((4,4,1)\), \((4,3,2)\), and \((3,3,3)\).

We will count the number of three-digit positive integers whose digit sum is \(9\) by counting the number of positive integers formed by the digits in each triple above. We will consider cases based on the number of zeroes in each triple, since a three-digit integer cannot have a leading digit of \(0\).

Therefore, the total number of three-digit positive integers that have a digit sum of \(9\) is \(1+ 16 + 28 = 45\). Since Vinnie wrote down only one of these integers, the probability that this integer was Ayumi’s favourite number is \(\frac{1}{45}\).

Note: It is a known fact that an integer is divisible by \(9\) exactly when its digit sum is divisible by \(9\). For example, \(32\,814\) has a digit sum of \(3+2+8+1+4=18\). Since \(18\) is divisible by \(9\), then \(32\,814\) is divisible by \(9\). On the other hand, \(32\,810\) has a digit sum of \(3+2+8+1+0=14\). Since \(14\) is not divisible by \(9\), then \(32\,810\) is not divisible by \(9\).

As a consequence of this fact, Ayumi’s favourite number must be divisible by \(9\).