CEMC Banner

Problem of the Week
Problem D and Solution
Just Like Kayak 2

Problem

A palindrome is a word, phrase, or positive integer that reads the same forwards and backwards. For example, "kayak" is a palindrome. The integers \(292\), \(11\), and \(6\,357\,536\) are also palindromes.

Determine the number of six-digit palindromic integers that are divisible by \(15\).

Note: An integer is divisible by \(3\) exactly when the sum of its digits is divisible by \(3\). For example, \(15\,972\) is divisible by \(3\) since \(1+5+9+7+2=24\) and \(24\) is divisible by \(3\). But \(14\,923\) is not divisible by \(3\) since \(1+4+9+2+3=19\) and \(19\) is not divisible by \(3\).

Solution

We are looking for six-digit integers of the form \(abccba\) that are divisible by \(15\). For an integer to be divisible by \(15\), it must be divisible by both \(3\) and \(5\).

To be divisible by \(5\), an integer must end in \(0\) or \(5\). If a palindrome ends in \(0\), it must also begin with \(0\). However, the integer \(0bccb0\) is not a six-digit integer since the leading digit is \(0\). Therefore, the palindromes cannot end with a \(0\) and hence must start and end with a \(5\). It follows that any six-digit palindrome divisible by \(5\) must be of the form \(5bccb5\).

For an integer to be divisible by \(3\), the sum of its digits must be divisible by \(3\). Therefore, \(5+b+c+c+b+5=10 + 2b + 2c\) must be divisible by \(3\). Since \(b\) and \(c\) are digits, we note that \(0 \leq b,c \leq 9\), where \(b\) and \(c\) are integers. This leads to \(10 \leq 10 + 2b + 2c \leq 46\).

The integers between \(10\) and \(46\) that are divisible by \(3\) are \(12\), \(15\), \(18\), \(21\), \(24\), \(27\), \(30\), \(33\), \(36\), \(39\), \(42\), and \(45\). If we choose \(12\) to be the sum of the digits, then \[\begin{aligned} 10+2b+2c &=12\\\ 2(b+c) &= 2\\ b+c &= 1 \end{aligned}\] This equation has solutions \(b=1,~c=0\) or \(b=0,~c=1\).

If we choose \(15\) to be the sum of the digits, then \[\begin{aligned} 10+2b+2c &=15\\ 2b+2c &= 5\\ 2(b+c) &= 2.5 \end{aligned}\] This equation has no solution, since \(b\) and \(c\) are integers. Similarly, there will be no solutions for any of the odd sums.

Therefore, we only need to solve the equations with even sums. The results are summarized in the following table.

Original Equation Simplified Equation Solutions in the form \((b,c)\) Number of Solutions
\(10+2b+2c=12\) \(b+c=1\) \((0,1)\), \((1,0)\) \(2\)
\(10+2b+2c=18\) \(b+c=4\) \((0,4)\), \((1,3)\), \((2,2)\), \((3,1)\), \((4,0)\) \(5\)
\(10+2b+2c=24\) \(b+c=7\) \((0,7)\), \((1,6)\), \((2,5)\), \((3,4)\), \((4,3)\), \((5,2)\), \((6,1)\), \((7,0)\) \(8\)
\(10+2b+2c=30\) \(b+c=10\) \((1,9)\), \((2,8)\), \((3,7)\), \((4,6)\), \((5,5)\), \((6,4)\), \((7,3)\), \((8,2)\), \((9,1)\) \(9\)
\(10+2b+2c=36\) \(b+c=13\) \((4,9)\), \((5,8)\), \((6,7)\), \((7,6)\), \((8,5)\), \((9,4)\) \(6\)
\(10+2b+2c=42\) \(b+c=16\) \((7,9)\), \((8,8)\), \((9,7)\) \(3\)

Therefore, the total number of six-digit palindromic integers divisible by \(15\) is \(2+5+8+9+6+3=33\).