Learn / Library / Mental math
Remainder by digit sums
A checksum routine strips blocks of from the year code until fewer than remain. What value is left?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
A number and its digit sum leave the same remainder on division by .
Solution
- Since modulo , every power of leaves remainder .
- So the remainder equals that of the digit sum .
- Repeat the trick: .
- The remainder is .
Answer: