In general, an integer n is divisible by d iff the digit sum s_(d + 1)(n) is divisible by d. Write a positive decimal integer a out digit by digit in the form a_n ...a_3 a_2 a_1 a_0. The following rules then determine if a is divisible by another number by examining the congruence properties of its digits. In congruence notation, n congruent k (mod m) means that the remainder when n is divided by a modulus m is k. (Note that it is always true that 10^0 = 1 congruent 1 for any base.) 1. All integers are divisible by 1.
congruence | digit sum | divisible | divisor | modulus | rule of nines