divisibleby9
Divisibleby9 refers to integers that are divisible by 9; equivalently, numbers n for which n ≡ 0 (mod 9). In decimal notation, this is commonly tested by the sum-of-digits rule: a base-10 number is divisible by 9 if and only if the sum of its decimal digits is divisible by 9. This stems from 10 ≡ 1 (mod 9), so a number n = d0 + 10 d1 + 10^2 d2 + ... satisfies n ≡ d0 + d1 + d2 + ... (mod 9). Repeating the digit-sum operation yields the digital root, which is 9 for nonzero multiples of 9 and 0 for 0.
Examples illustrate the rule: 45 has digits summing to 9, so it is divisible by 9; 12345
General notes and extensions: The digit-sum test is specific to base 10. In base b, a number