Free Republic
Browse · Search
News/Activism
Topics · Post Article

Skip to comments.

Divisibility by Seven
sciencenews.org ^ | 21 May 05 | Ivars Peterson

Posted on 05/20/2005 10:47:46 PM PDT by Arkie2

It's easy to tell if a given whole number is divisible by 2. Just check whether the last digit is even. There are also simple rules to determine whether a number is divisible by 3, 4, 5, 6, 8, 9, or 10. The exception is 7.

The known rules for testing for divisibility by 7 are amazingly cumbersome.

Here's one such rule. To find out if a number is divisible by 7, double the last digit, then subtract it from the remaining digits of the number. If you get an answer divisible by 7, then the original number is divisible by 7. If you don't know whether the new number is divisible by 7, you apply the rule again.

For example, to check whether 616 is divisible by 7, double the last digit (6 x 2 = 12), then subtract the answer from the remaining digits (61 – 12 = 49). Because 49 is divisible by 7, so is 616.

The method works quite well for small numbers. For larger numbers, the rule is sufficiently complicated that it takes nearly as much effort to check for divisibility as it would be to perform the division operation itself.

Over the years, people have come up with dozens of algorithms for divisibility by 7. The latest entry comes from Gustavo Gerald Toja Frachia of São Paulo University.

Here's an example of how Toja's ingenious method works.

Consider the following multiple of 7: 6,049,344 Separate the number into pairs of digits, starting from the right. 6 04 93 44 Calculate the difference between each pair of digits and the nearest upper or lower multiple of 7, beginning with the first pair at the right. For the first pair, use the lower multiple, for the second use the upper multiple, for the third use the lower multiple, and so on. 44 – 42 = 2; 98 – 93 = 5; 04 – 0 = 4; 7 – 6 = 1 Write out the resulting digits in the order in which they were calculated. 2541 Repeat the process on the digits 2541. 25 41 41 – 35 = 6; 28 – 25 = 3 63 The final pair, 63, is a multiple of 7. Hence, the original number must also be a multiple of 7. Toja describes his method and explains why it works at http://www.divisibilitybyseven.mat.br/. He argues that his algorithm is remarkably fast and efficient for determining if large numbers are divisible by 7.

Alexander Bogolmolny recently extended Toja's algorithm to divisibility by 11 and 13 (see http://www.cut-the-knot.org/blue/div7-11-13.shtml), and Toja added a way of determining the remainder when a number isn't divisible by 7.

Interestingly, Toja's method starts off in much the same way as an algorithm developed by L. Vosburgh Lyons, a New York neuropsychiatrist. This method was first disclosed by Martin Gardner in a 1962 Scientific American article.

Here's the example that Gardner uses to demonstrate the Lyons test.

From right to left, mark off the digits in pairs. 2 35 94 06 17 88 39 For each pair, calculate its excess over a multiple of 7. 2 0 3 6 3 4 4 Gather the excesses in groups of three, from the right, and add each of the three columns separately. 3 4 4; 0 3 6; 2 3 + 0 = 3; 4 + 3 = 7; 4 + 6 + 2 = 12 Reduce the three sums by calculating the excess of each over a multiple of 7. 3 0 5 Record the excess of the first and second digits, taken together, over a multiple of 7 on the left. Record the excess of the second and third digits, taken together, over a multiple of 7 on the right. 2 5 Subtract the left digit from the right digit. (If the right digit is smaller, add 7 before subtracting.) This final digit is the remainder when the original number is divided by 7. Thus, the original number is divisible by 7 if and only if this final digit is 0. 3 It still seems like a lot of work! There's just something about 7 that brings in all sorts of complexities.

At a time when calculators and computers are ubiquitous, it's not clear how useful it is to know algorithms for divisibility. Playing with numbers, however, has an enduring appeal, especially when it comes to mystical "7


TOPICS: Miscellaneous; Technical
KEYWORDS: 7; 7daysinmay; magnificentseven; math; science; sevensamurai
Navigation: use the links below to view more comments.
first previous 1-2021-4041-50 next last
To: Arkie2
I hate when I agree to be the designated driver, then realize we're at my house.
21 posted on 05/20/2005 11:42:11 PM PDT by Larry Lucido
[ Post Reply | Private Reply | To 20 | View Replies]

To: Drammach
Yeah, I used one in Electronics School way back when.. '69-'70...

Me too! Also in physics!

The only thing a computer is good for, is posting on Free Republic!

22 posted on 05/20/2005 11:42:31 PM PDT by SirChas
[ Post Reply | Private Reply | To 19 | View Replies]

To: Larry Lucido

Just damn!!


23 posted on 05/20/2005 11:43:37 PM PDT by Arkie2 (No, I never voted for Bill Clinton.)
[ Post Reply | Private Reply | To 21 | View Replies]

To: Drammach

I used to have a round one with multiple wheels, one lg(10), and one lg(e), there was another, I forget which.


24 posted on 05/20/2005 11:46:17 PM PDT by djf (Sheep logic, or why sheep aren't mathematicians: I'll give up my freedom to preserve freedom)
[ Post Reply | Private Reply | To 19 | View Replies]

To: Drammach

Can you still remember the resistor color code? I'll bet you used the same "saying" that I was taught to remember it.


25 posted on 05/20/2005 11:46:42 PM PDT by SirChas
[ Post Reply | Private Reply | To 19 | View Replies]

To: SirChas

B
B
R
O
Y
G
B
V
G
W


26 posted on 05/20/2005 11:52:10 PM PDT by Xenophobic Alien (Nuke the whales! -- You really want to nuke whales? -- Well ya got to nuke something. -- Touche')
[ Post Reply | Private Reply | To 25 | View Replies]

To: Xenophobic Alien

And the tolerance?


27 posted on 05/20/2005 11:54:18 PM PDT by SirChas
[ Post Reply | Private Reply | To 26 | View Replies]

To: SirChas

SILVER
GOLD
NONE


28 posted on 05/20/2005 11:56:17 PM PDT by Xenophobic Alien (Nuke the whales! -- You really want to nuke whales? -- Well ya got to nuke something. -- Touche')
[ Post Reply | Private Reply | To 27 | View Replies]

To: Xenophobic Alien

IIRC

Gold 5%
Silver 10%
None 20%


29 posted on 05/20/2005 11:57:39 PM PDT by Xenophobic Alien (Nuke the whales! -- You really want to nuke whales? -- Well ya got to nuke something. -- Touche')
[ Post Reply | Private Reply | To 28 | View Replies]

To: angelanddevil2

Of course, doesn't everyone?


30 posted on 05/20/2005 11:58:29 PM PDT by blowfish
[ Post Reply | Private Reply | To 4 | View Replies]

To: Xenophobic Alien
Wow! Must be more engineers here than I thought. You sir win a new pocket protector! (or tube manual) Your choice.

Ok, What is a getter?

31 posted on 05/20/2005 11:58:45 PM PDT by SirChas
[ Post Reply | Private Reply | To 28 | View Replies]

To: Arkie2

bump for tomorrow.


32 posted on 05/21/2005 12:01:15 AM PDT by Musket
[ Post Reply | Private Reply | To 1 | View Replies]

To: SmithL

Ping to myself for another time, when I haven't had wine with dinner.


33 posted on 05/21/2005 12:01:42 AM PDT by SmithL (Proud Submariner)
[ Post Reply | Private Reply | To 1 | View Replies]

To: SmithL

Won't matter. Wine or not, you'll still wonder why the hell you're reading this!


34 posted on 05/21/2005 12:03:57 AM PDT by Arkie2 (No, I never voted for Bill Clinton.)
[ Post Reply | Private Reply | To 33 | View Replies]

To: Arkie2

ha!

I had to recall resistor color codes from memory over 15 years ago at 1:10 in the morning! LoL


35 posted on 05/21/2005 12:06:54 AM PDT by Xenophobic Alien (Nuke the whales! -- You really want to nuke whales? -- Well ya got to nuke something. -- Touche')
[ Post Reply | Private Reply | To 34 | View Replies]

To: Arkie2

You're right. I quit. I'm going to bed.


36 posted on 05/21/2005 12:07:33 AM PDT by SmithL (Proud Submariner)
[ Post Reply | Private Reply | To 34 | View Replies]

To: Xenophobic Alien

Bad Boys Rape Our Young Girls But Violet Gives Willingly.


37 posted on 05/21/2005 12:08:31 AM PDT by Joe Miner
[ Post Reply | Private Reply | To 26 | View Replies]

To: Joe Miner

That is what I was taught also! Funny how it has stuck with me since the late 60's.


38 posted on 05/21/2005 12:09:46 AM PDT by SirChas
[ Post Reply | Private Reply | To 37 | View Replies]

To: Joe Miner

Hey, keep that perv stuff off this thread! This is a self respecting group here.


39 posted on 05/21/2005 12:10:12 AM PDT by Arkie2 (No, I never voted for Bill Clinton.)
[ Post Reply | Private Reply | To 37 | View Replies]

To: Larry Lucido

easy skip the pizza, buy a keg the two left standing order a pizza and the one who is still standing eats it...the one who ate the pizza slept in the chunks...first one out was the first one who woke ,second to wake is cooking breakfast with the first, third wakes up in time for breakfast along with the forth, fifth wakes up does not want anything to eat along with the 6th who pee'd himself while they poke fun at the still drunk pizza eater with chuncks in his hair and is still sleeping.


40 posted on 05/21/2005 12:11:15 AM PDT by KingNo155
[ Post Reply | Private Reply | To 18 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-50 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
News/Activism
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson