Quoto

Learn / Library / Mental math

Remainder by digit sums

Mental mathMedium

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.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

A number and its digit sum leave the same remainder on division by .

Solution
  1. Since modulo , every power of leaves remainder .
  2. So the remainder equals that of the digit sum .
  3. Repeat the trick: .
  4. The remainder is .

Answer: