Problem 10 · Multiples of 4 with digit sum 4
Classify by the ending: 00, 12 or 20.
Integer answer, at most 4 digitsHow many $5$-digit numbers are multiples of $4$ and have digit sum $4$?
Copa Cangur · SCM
Hard
Closed answer
Reasoned solution
Key idea: a number is a multiple of $4$ according to its last two digits, and those must use up little of the sum.
The two-digit endings that are multiples of $4$, have digit sum $\le 4$ and leave room for the leading digit ($\ge 1$) are $00$ (sum $0$), $20$ (sum $2$) and $12$ (sum $3$). (With $04$ or $40$ the remaining digits would sum $0$ and the leading digit couldn't be $\ge 1$.)
Ending $00$: the first three digits sum to $4$ with the first $\ge 1$: $\binom{5}{2} = 10$ ways. Ending $20$: the first three sum to $2$: $110$, $101$, $200$, i.e. $3$ ways. Ending $12$: the first three sum to $1$: only $100$, $1$ way.
$$10 + 3 + 1 = 14.$$
Answer: 14