Stupid Divisibility Tricks

Marc Renault

The article Stupid Divisibility Tricks: 101 Ways to Stupefy Your Friends appeared in Math Horizons, November 2006.

PowerPoint slides for a presentation at MathFest in August, 2006.

Stupid Divisibility Tricks Summary

Marc Renault

Suppose you have a number  n  that you wish to check for divisibility by d.

Ending digits: the number of ending digits of n to check for divisibility by  d.

Add blocks: take the digits of n in blocks of the given length, and add them (or add and subtract alternately) starting from the right.  d | n iff d divides the result.

Right trim 1: remove the rightmost digit of n, multiply it by the number in the column, and add that to the remaining digits of n.  d | n iff d divides the result.

Right trim 2: like above, but remove the two rightmost digits of n.

Left trim 1: remove the leftmost digit of n, multiply it by the given number, shift in two places to the right, and add to the remaining digits of n.  d | n iff d divides the result.

Use other tricks: apply divisibility tests for smaller divisors.

 d end digits add blocks right trim 1 right trim 2 left trim 1 use other tricks 2 1 3 1, 2, 3 1, -2 1, -2 4 2 5 1 6 2  3 7 ±3 5, -2 4, -3 2 8 3 9 1, 2, 3 1 1 10 1 2  5 11 ±1, 2, ±3 -1 1 12 3  4 13 ±3 4, -9 3, -10 -4 14 2 2  7 15 3  5 16 4 17 -5 8, -9 18 2  9 19 2 4 5 20 2 4  5 21 -2 4 -5 3  7 22 2  11 23 7 3, -20 24 8  3 25 2 26 2  13 27 3 -8 10 28 4  7 29 3 -20 30 2  3  5 31 -3 32 5 4 33 2 10 1 3  11 34 -2 2  17 35 -5 5  7 36 4  9 37 3 -11 10 38 2  19 39 4 3  13 40 3 8  5 41 -4 42 2  3  7 43 -30 40, -3 44 4  11 45 9  5 46 2  23 47 8 48 4 16  3 49 5 2 50 2 2  25 51 -5 -2 52 -4 4  13 53 -9 -6 54 2  27 55 5  11 56 8  7 57 40 4 3  19 58 2  29 59 6 60 4  3  5 61 -6 62 2  31 63 9  7 64 6 65 5  13 66 2  3  11 67 -20 -2 68 4  17 69 7 -20 3  23 70 2  5  7 71 -7 72 8  9 73 ±4 74 2  37 75 3  25 76 4  19 77 ±3 -10 7  11 78 2  3  13 79 8 80 4 16  5 81 -8 82 2  41 83 25 84 4  3  7 85 5  17 86 2  43 87 -20 3  29 88 8  11 89 9, -80 -8 90 2  9  5 91 ±3 -9 -10 7  13 92 4  23 93 40 3  31 94 2  47 95 5 5  19 96 4 32  3 97 3 98 2 2  49 99 2 10 1 1 9  11 100 2 4  25