Stupid Divisibility Tricks

Report
Stupid Divisibility Tricks
Marc Renault
Shippensburg University
MathFest
August 2006
Rule of 3
Rule of 7
Rule of 19
161
Other numbers?
Other categories of tricks?
L.E. Dickson 1919
History of the Theory of Numbers
Martin Gardner 1962
Scientific American 2 – 12
Internet, number theory texts, liberal
studies texts
Useful…?
Trick #1: Examine Ending Digits
2, 5, 10 divide 10
Examine last digit
4, 20, 25, 100 divide 100
Examine last 2 digits
8, 40 divide 1000
Examine last 3 digits
16, 80 divide 10,000
Examine last 4 digits
32 divides 100,000
Examine last 5 digits
64 divides 1,000,000
Examine last 6 digits
Trick #2: Add (Blocks of) Digits
Rule of 3:
8362 = 8×1000 + 3×100 + 6×10 + 2
≡ 8 + 3 + 6 + 2 (mod 3)
10 ≡ 1 (mod 3)
10 ≡ 1 (mod 9)
10 ≡ -1 (mod 11)
100 ≡ 1 (mod 11)
100 ≡ 1 (mod 33)
100 ≡ 1 (mod 99)
100 ≡ -1 (mod 101)
Add digits
Add pairs of digits
1000 ≡ -1 (mod 7)
1000 ≡ -1 (mod 13)
1000 ≡ 1 (mod 27) Add triples of digits
1000 ≡ 1 (mod 37)
1000 ≡ -1 (mod 77)
1000 ≡ -1 (mod 91)
Trick #3: Trim from the Right
Test for divisibility by 7:
6034
- 8
595
-10
49
6034 = 10×603 + 4
mod 7…
10×603 +
4 ≡ 0
 (-2)10×603 + (-2)4 ≡ 0

603 + (-2)4 ≡ 0
To test divisibility by d find an inverse of 10 (mod d).
d
3
7
9
11
13
17
19
21
23
27
29
31
33
37
39
41
43
47
49
51
10-1 (mod d)
1, -2
5, -2
1
-1
4, -9
-5
2
-2
7
-8
3
-3
10
-11
4
-4
-30
5
-5
d
53
57
59
61
63
67
69
71
73
77
79
81
83
87
89
91
93
97
99
101
10-1 (mod d)
40
6
-6
-20
7
-7
8
-8
25
9, -80
-9
10
-10
d
3
7
9
11
13
17
19
21
23
27
29
31
33
37
39
41
43
47
49
51
100-1 (mod d)
1, -2
4, -3
1
1
3, -10
8, -9
4
4
3, -20
10
-20
10
40, -3
8
d
53
57
59
61
63
67
69
71
73
77
79
81
83
87
89
91
93
97
99
101
100-1 (mod d)
-9
4
-2
-20
-10
-20
-8
-10
40
1
-1
Trick #4: Trim from the Left
Test for divisibility by 34:
587044
- 10
Trim off leftmost digit
77044
Multiply by 2
- 14
Move in 2 places
5644
Subtract
- 10
544
- 10
34
587044 is divisible by 34
587044 = 106×5 + 87044
≡ 104(-2)×5 + 87044 (mod 34)
100 ≡ -2 (mod 34)
d
7
13
14
19
21
32
33
34
35
48
100 (mod d)
2
-4
2
5
-5
4
1
-2
-5
4
d
49
51
52
53
95
96
97
98
99
101
100 (mod d)
2
-2
-4
-6
5
4
3
2
1
-1
Trick #5: Apply Smaller Divisors
Those divisors from 2 to 100 that haven’t been covered by other tricks:
d
6
12
18
22
24
26
28
30
36
38
42
44
45
46
54
55
56
58
60
use
2×3
3×4
2×9
2 × 11
3×8
2 × 13
4×7
3 × 10
4×9
2 × 19
2 × 21
4 × 11
5×9
2 × 23
2 × 27
5 × 11
7×8
2 × 29
3 × 20
d
62
63
65
66
68
70
72
74
75
76
78
82
84
85
86
88
90
92
94
use
2 × 31
7×9
5 × 13
2 × 3 × 11
4 × 17
7 × 10
8×9
2 × 37
3 × 25
4 × 19
2 × 39
2 × 41
4 × 21
5 × 17
2 × 43
8 × 11
9 × 10
4 × 23
2 × 47

similar documents