Skip to content

Digit-sum test for divisibility by nine

Question

Give a criterion for when a whole number is divisible by 99, and prove it.

Short answer

A number is divisible by 99 exactly when the sum of its digits is. Since 10≡1(mod9)10\equiv1\pmod 9, every power 10k≡110^k\equiv1, so ∑ak10k≡∑ak(mod9)\sum a_k10^k\equiv\sum a_k\pmod 9: the number and its digit sum leave the same remainder.

Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 2.7 Modular Arithmetic, 'Division by 9', p.24; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution