CEMC Banner

Problem of the Week
Problem D and Solution
The Broken Screen PIN

Problem

Jordan dropped their phone, and now the touchscreen is badly damaged. The left and centre columns of the number pad are completely unresponsive. Only the right-hand column, containing the digits \(3\), \(6\), and \(9\), is still functioning. Jordan wants to set a new \(4\)-digit lock screen PIN using only the working numbers. Jordan sets two rules for the PIN:

How many different \(4\)-digit PINs can Jordan create?

Did You Know?

If the sum of the digits of a number is divisible by \(9\), then the number is divisible by \(9\). If the sum of the digits of a number is not divisible by \(9\), then the number is not divisible by \(9\).

For example, the number \(10\,278\) is divisible by \(9\) since the sum of the digits is \(1+0+2+7+8= 18\), which is divisible by \(9\). However, since the sum of the digits of the number \(12\,345\) is \(15\) and \(15\) is not divisible by \(9\), then the number \(12\,345\) is not divisible by \(9\).

Solution

Solution 1

In this solution we consider the possible sums that the digits of the PIN can add to.

The minimum digit sum would be created using three \(3\)s and one \(6\), yielding a sum of \(15\). The maximum digit sum would be created using three \(9\)s and one \(6\), yielding a sum of \(33\). Neither of these sums are divisible by \(9\). However, between \(15\) and \(33\), there are two numbers, namely \(18\) and \(27\), which are divisible by \(9\). We are therefore looking for four digits whose sum is either \(18\) or \(27\). The following table summarizes the possible digit combinations and the resulting sums.

Number of \(\boldsymbol{3}\)s Number of \(\boldsymbol{6}\)s Number of \(\boldsymbol{9}\)s Digit Sum Divisible by \(\boldsymbol{9}\)?
\(3\) \(1\) \(0\) \(3+3+3+6=15\) No
\(3\) \(0\) \(1\) \(3+3+3+9=18\) Yes
\(1\) \(3\) \(0\) \(3+6+6+6=21\) No
\(0\) \(3\) \(1\) \(6+6+6+9=27\) Yes
\(1\) \(0\) \(3\) \(3+9+9+9=30\) No
\(0\) \(1\) \(3\) \(6+9+9+9=33\) No
\(2\) \(2\) \(0\) \(3+3+6+6=18\) Yes
\(2\) \(0\) \(2\) \(3+3+9+9=24\) No
\(0\) \(2\) \(2\) \(6+6+9+9=30\) No
\(2\) \(1\) \(1\) \(3+3+6+9=21\) No
\(1\) \(2\) \(1\) \(3+6+6+9=24\) No
\(1\) \(1\) \(2\) \(3+6+9+9=27\) Yes

Now, we can create the numbers using the information in the rows of the table in which the sum of the digits is divisible by \(9\).

Combining the results, there are \(4+4+6+12= 26\) possible PINs.

Solution 2

In this solution, we consider cases based on the number of \(9\)s in the PIN.

Combining the results from the four cases, there are \(0+12+8+6= 26\) possible PINs that Jordan can create.