Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!cca!ima!ism780!jim From: jim@ism780.UUCP (Jim Balter) Newsgroups: net.math Subject: Re: divisibility by 7 Message-ID: <26@ism780.UUCP> Date: Thu, 25-Aug-83 13:44:00 EDT Article-I.D.: ism780.26 Posted: Thu Aug 25 13:44:00 1983 Date-Received: Sat, 27-Aug-83 16:32:03 EDT Lines: 18 That's cute! And it's easy to prove. It is equivalent to saying that n mod 7 = 0 iff (floor(n/10) - 2*(n mod 10)) mod 7 = 0. Say n = 7*x = 10*a + b (a and b integers). Then floor(n/10) - 2*(n mod 10) = a - 2*b. By algebra a - 2*b = 21*a - 14*x = 7*(3*a-2*x). So, n mod 7 = 0 iff x is an integer iff a - 2*b is divisible by 7. I like your sample (but hardly random) number. Note for instance 142857*1 = 142857 142857*3 = 428571 142857*2 = 285714 142857*6 = 857142 142857*4 = 571428 142857*5 = 714285 --------