From: tycchow@ATHENA.MIT.EDU (Timothy Y Chow) Newsgroups: sci.math Subject: Re: divisibility by seven Date: 26 Jan 1994 05:26:54 GMT Organization: None. This saves me from writing a disclaimer. Message-ID: <2i4uuu$ism@senator-bedfellow.MIT.EDU> References: <2i0g6rINN3a7@iraun1.ira.uka.de> <2i0rlr$30b@calvin.st-and.ac.uk> <2i1r0f$au3@crl.crl.com> Here are some divisibility tests for 7, taken from Martin Gardner's _Unexpected_Hanging_ collection. 1. Take the digits of the number in reverse order, from right to left, multiplying them successively by the digits 1, 3, 2, 6, 4, 5, repeating with this sequence of multipliers as long as necessary. Add the products. This sum is congruent to the original number mod 7. 2. Remove the last digit, double it, subtract it from the truncated original number and continue doing this until only one digit remains. The original number is divisible by seven if and only if the final digit is divisible by 7. 3. (L. Vosburgh Lyons) This is best explained by example. 2 | 35 | 94 | 06 | 17 | 88 | 39 From right to left, mark off digits in pairs | | | | | | 2 | 0 | 3 | 6 | 3 | 4 | 4 Under each pair put down its excess over a multiple of 7 3 4 4 Break up the sequence of excesses into blocks 0 3 6 of 3, put them under each other and add each 2 of the three columns separately ----------- 3 7 12 3 0 5 Replace each number by its excess over a multiple of 7 | 2 | 5 Record the excess of 30 on the left, | the excess of 05 on the right Finally, subtract the left digit from the right digit (in this case we get 5 - 2 = 3); the result is congruent to the original number mod 7. 4. Partition the number into three-digit sections, starting at the right. Alternately add and subtract these sections, starting at the right. The result is congruent to the original number mod 7. Example: 61671142 -> 142 - 671 + 61 = -468. ======================================================================== Gardner lists many references, including the following. Leonard Eugene Dickson, "Criteria of Divisibility by a Given Number," _History_of_the_Theory_of_Numbers_ (New York: Chelsea Publishing, 1952), Vol. I, Chapter 12, pp. 337-46. E. A. Maxwell, "Division by 7 or 13," _Mathematical_Gazette_, Vol. 49, February 1965, p. 84. Henri Feiner, "Divisibility Test for 7," _The_Mathematics_Teacher_, Vol. 58, April 1965, pp. 311-12.