# 2-Digit Numbers divisible by both Product and Sum of Digits

## Theorem

The $2$-digit positive integers which are divisible by both the sum and product of their digits are:

- $12, 24, 36$

## Proof

We have:

\(\displaystyle 12\) | \(=\) | \(\displaystyle 4 \times \paren {1 + 2}\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle 6 \times \paren {1 \times 2}\) |

\(\displaystyle 24\) | \(=\) | \(\displaystyle 4 \times \paren {2 + 4}\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle 3 \times \paren {2 \times 4}\) |

\(\displaystyle 36\) | \(=\) | \(\displaystyle 4 \times \paren {3 + 6}\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle 2 \times \paren {3 \times 6}\) |

It remains to be demonstrated that these are the only ones.

Let $z$ be any 2-digit positive integer which is divisible by both the sum and product of its digits.

Neither of its digits may be zero as the product of the digits is a positive integer. So, for $ a \in \{ 1, ..., 9 \}$, $ b \in \{ 1, ..., 9 \} $, $ m \in \N $, $ n \in \N $ we have:

\((1):\quad\) | \(\displaystyle z\) | \(=\) | \(\displaystyle 10a + b\) | 2-digit positive integer | |||||||||

\((2):\quad\) | \(\displaystyle z\) | \(=\) | \(\displaystyle \paren { a + b } m\) | divisible by the sum of its digits | |||||||||

\((3):\quad\) | \(\displaystyle z\) | \(=\) | \(\displaystyle abn\) | divisible by the product of its digits |

Consider $(1) = (2)$

\(\displaystyle 10a + b\) | \(=\) | \(\displaystyle \paren { a + b } m\) | Note: if $m = 1$ then $a = 0$; hence $m > 1$ | ||||||||||

\(\displaystyle 10a - am\) | \(=\) | \(\displaystyle bm - b\) | rearranging | ||||||||||

\(\displaystyle a \paren { 10 - m }\) | \(=\) | \(\displaystyle b \paren { m - 1 }\) | factorizing | ||||||||||

\((4):\quad\) | \(\displaystyle \frac b a\) | \(=\) | \(\displaystyle \frac { 10 - m } { m - 1 }\) | rearranging; $a > 0$ and $m > 1$ so both denominators are never zero |

In $(4)$ $a$, $b$, and $m - 1$ are all positive; hence $10 - m$ must also be positive, i.e. $1 < m < 10$

Consider $(1) = (3)$

\(\displaystyle 10a + b\) | \(=\) | \(\displaystyle abn\) | |||||||||||

\(\displaystyle n\) | \(=\) | \(\displaystyle \frac { 10a + b } { ab }\) | rearranging | ||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \frac { 10 + \frac b a } b\) | dividing numerator and denominator by $a$, which is > 0 | ||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \frac { 10 + \frac { 10 - m } { m - 1 } } b\) | from $(4)$ | ||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \frac { 10 \paren { m - 1 } + 10 - m } { b \paren { m - 1 } }\) | multiplying numerator and denominator by $m - 1$, which is > 0 | ||||||||||

\((5):\quad\) | \(\displaystyle n\) | \(=\) | \(\displaystyle \frac { 9 m } { b \paren { m - 1 } }\) | simplifying |

In $(5)$ for $ n \in \N $ we must have all three divisibility requirements met:

- $ b \paren { m - 1 } \mid 9m $
- $ b \mid 9m $
- $ \paren { m - 1 } \mid 9m $

The last of the above three requirements only depends upon the value of $m$ and is therefore simpler to use to determine potential values of $m$ that may allow $ n \in \N $:

- The only value of $m$ where $ \paren { m - 1 } \mid m$ is $m = 2$; hence $m = 2$ or $ \paren { m - 1 } \mid 9m$
- If $m$ is odd then $ \paren { m - 1 } $ is even. Both $9$ and $m$ are odd, so $9m$ is also odd. Clearly, an even number cannot divide $9m$; therefore $m$ cannot be odd.
- If $m$ is even then $ \paren { m - 1 } $ is odd and must divide $9m$. We know that the only value of $m$ where $ \paren { m - 1 } \mid m$ is $m = 2$, so any other cases where $ \paren { m - 1 } $ is odd must divide $9$. Hence $ \paren { m - 1 } \in \{ 1, 3 \} $
- The potential values are therefore $ m \in \{ 2, 4 \} $

Consider the case $m = 2$:

- From $(4) \frac b a = 8 $; hence the only potential value for $b$ is $8$.

- From $(5) n = \frac { 18 } 8 \notin \N $; hence there are no potential candidates for $z$ for the case $m = 2$

Consider the case $m = 4$:

- From $(4) \frac b a = 2 $; hence the only potential values are $ b \in \{ 2, 4, 6, 8 \} $

- From $(5) n = \frac { 12 } b$; however, 8 does not divide 12 and therefore this leaves $ b \in \{ 2, 4, 6 \} $

- By virtue of $\frac b a = 2 $ we therefore have for the case $m = 4$ that $ z \in \{ 12, 24, 36 \} $

We have now considered all the potential values of $m$ and can therefore conclude that the only 2-digit positive integers which are divisible by both the sum and product of their digits are 12, 24, and 36.

$\blacksquare$

## Sources

- 1986: David Wells:
*Curious and Interesting Numbers*... (previous) ... (next): $36$ - 1997: David Wells:
*Curious and Interesting Numbers*(2nd ed.) ... (previous) ... (next): $36$