Advent calendar 2024
19 December
There are 9 integers below 100 whose digits are all non-zero and add up to 9:
9, 18, 27, 36, 45, 54, 63, 72, and 81.
How many positive integers are there whose digits are all non-zero and add up to 9?
Show answer & extension
Hide answer & extension
All the integers whose digits are all non-zero and add up to 9 can be made by taking a list of 9 ones, and between each pair deciding whether to move on a digit or not. For example,
1111|111|11 (where | means move on) would represent the number 432; and 1|1|1111111 would represent the number 117.
There are 8 gaps between 9s, so there are 28 = 256 numbers that can be made.
Extension
Why are there not 512 positive integers whose digits are all non-zero and add up to 10?