Digit-sum test for divisibility by nine
Question
Give a criterion for when a whole number is divisible by , and prove it.
Short answer
A number is divisible by exactly when the sum of its digits is. Since , every power , so : 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