Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site rabbit.UUCP Path: utzoo!linus!decvax!harpo!eagle!allegra!alice!rabbit!ark From: ark@rabbit.UUCP Newsgroups: net.math Subject: divisibility by 7 Message-ID: <1842@rabbit.UUCP> Date: Wed, 24-Aug-83 23:54:06 EDT Article-I.D.: rabbit.1842 Posted: Wed Aug 24 23:54:06 1983 Date-Received: Fri, 26-Aug-83 04:29:11 EDT Organization: Bell Labs, Murray Hill Lines: 15 To tell if an integer n is divisible by 7, repeat the following: n := floor(n / 10) - 2 * (n mod 10) You will evetually get a number that you can check at a glance. For instance: 142857 14285 - 14 = 14271 1427 - 2 = 1425 142 - 10 = 132 13 - 4 = 9 9 is not divisible by 7, so neither is 142857.