Problem 5 · Six-digit numbers with conditions
Counting digit pairs whose sum is a two-digit number.
Integer answer, at most 4 digitsHow many 6-digit numbers satisfy the following three conditions?
- The digit 0 does not appear.
- The sum of the first two digits equals the number formed by the last two digits.
- The number formed by the two middle digits is the sum of the first two digits plus 1.
For example, the number 651211 ($6+5=11$; $6+5+1=12$).
Copa Cangur · SCM
Easy
Closed answer
Reasoned solution
Key idea: the whole number is determined by its first two digits; we only need to count how many initial pairs are valid.
Let $s = d_1 + d_2$. The last two digits form the number $s$, which must be two-digit and zero-free: $11 \le s \le 18$ (none of these contains the digit 0). The middle digits form $s+1 \in \{12,\dots,19\}$, which never contains a 0 either. So the conditions only restrict $s$.
For each $s$, the pairs $(d_1, d_2)$ with $d_1, d_2 \in \{1,\dots,9\}$ and $d_1+d_2 = s$ number $19-s$:
$$\sum_{s=11}^{18}(19-s) = 8+7+6+5+4+3+2+1 = 36.$$
Answer: 36