Everything2
Near Matches
Ignore Exact
Full Text
Everything2

How to find out if ANY number is divisible by eleven

created by Spuunbenda

(idea) by Spuunbenda (3.8 d) (print)   ?   (I like it!) 1 C! Fri Aug 25 2000 at 20:47:34

Positive or negative integers of course; otherwise "divides" isn't as meaningful.

Take a number you'd hate to divide out longhand: 1,358,024,668.
Add its first digit to its third to its fifth etc. till there are no more: 1 + 5 + 0 + 4 + 6 = 16.
Repeat with the even digits: 3 + 8 + 2 + 6 + 8 = 27.
Subtract the larger number from the smaller. If the result is 11 or 0, your number is divisible by eleven, otherwise not. In this case, 27 - 16 = 11, so 1,358,024,668 IS divisible by eleven.

Mathematics is deeper and more beautiful than most of us will ever know.

(idea) by sockpuppet (7.4 mon) (print)   ?   (I like it!) 4 C!s Sat Aug 26 2000 at 21:46:12

For those of you wondering why this works, here's a simple explanation that is fairly visual and requires no number theory.

Assume that 11 divides a number X, so that X = 11Y for some integer Y. Say for argument that the decimal representation of Y is edcba, i.e. if Y=39452 then e=3, d=9, etc. Now write X = 11Y as the sum Y + 10Y = edcba + edcba0:

   Y:      e   d   c   b   a
+10Y:  e   d   c   b   a   0
 ---------------------------
=  X:  e  e+d d+c c+b b+a  a

For the moment, assume there is no carry in the above addition. Now split this into odd and even decimal positions (powers of 10):

   Y:      e   d   c   b   a
+10Y:  e   d   c   b   a   0
 ---------------------------
even:  e      d+c     b+a     = e+d+c+b+a
 odd:     e+d     c+b      a  = e+d+c+b+a

It's easy to see above that the multiplication by 10 followed by adding odd or even decimal places causes each decimal place to appear only once in the sums on the right. In fact, if there is no "carry" when we add, the sums of the even and odd decimal places will be equal, and subtracting them we get 0.

What if there is carry when we add Y and 10Y above? After all if c=6 and b=7 then c+b=13 (not a digit!) and we "carry the one" over to the next place. But then the picture above looks like:

 
   Y:      e   d     c     b   a
+10Y:  e   d   c     b     a   0
 ----------------------------------  
even:  e      d+c+1       b+a     = e+d+c+b+a + 1
 odd:     e+d      c+b-10      a  = e+d+c+b+a - 10

and subtracting the larger of these gives 11, exactly as expected. Obviously this extends by induction to any length number, and any number of carries that can take place, although it points out a case that the above writeup misses: subtracting will give you a multiple of 11, not just 0 or 11, eg: 409090 => 4+9+9 - 0+0+0 = 22.

Note: This isn't technically a proof until you run it backwards. We showed that given a multiple of 11 it has the subtraction-of-digits property. But if you reverse the steps above it's easy to see that the property guarantees that there exists a Y such that X=11Y, which is what we wanted to show.


The exact same argument explains the "rule of nines" -- why a number is divisible by 9 if the sum of its digits is divisible by 9:

 10Y:  e   d   c   b   a   0
  -Y:      e   d   c   b   a
 ---------------------------
 =9Y:  e  d-e c-d b-c a-b -a  = 0 +9n, where n is a result of carries.

You can play the same sorts of games with 101, 99, etc.


Another test for divisibility by 11 is subtracting the last digit of the number from the "tens part", ie: the number formed by truncating the last digit and dividing by 10. For example: 3795 is divisible by 11 if 379 - 5 = 374 is, which is divisible if 37 - 4 = 33 is.

This is even easier to see than the first property. Let the number we're testing for divisibility X = 11Y for some Y. Rewrite X as 10T + L, where T is the "tens part" and L is the last digit. Then we can restate the above as: X = 10T + L is divisible by 11 if T - L is. But if we add or subtract a multiple of 11 from something and get another multiple of 11, then that something is a multiple of 11, so we need only observe that: (10T + L) + (T - L) = 11T, so 10T + L is a multiple of 11 if T - L is, and we're done.

For divisibility by 9, you add the tens and ones parts: 2106 => 210+6=216 => 21+6=27 => 9.


printable version
chaos

Square of a number ending with a 5 How to determine whether a number is divisible by 7 rule of nines Shortcuts to check for divisibility
Finding the origin of a Hotmail message how to determine whether a number is divisible by n mathematics sexually ambiguous
Finding out where a net user lives Number Nine digital root As Cool As It Gets
The rule of eleven Humorous Writings of E2 How to determine whether a number is divisible by 3 Getting a hotel room at age 16
How to make a duct tape wallet number theory Eight hours for work, eight hours for sleep, eight hours for what we will mathematics is beautiful
Vulcan insults Tricks for multiplying two-digit numbers The nine functions of life eleven
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help


cooled by dannye

Cool Staff Picks
Little presents from the Node Fairy:
tzitzit
The "My parents suck with computers" node
NSC-68
Everything Almanac 2003
Hinduism
The Hacker's Kitchen Guide
Rosalind Franklin
The Painting of Sounds, Noises, and Smells
Tour de France
Hawthorn
The Captcha Project
work
Calvin and Hobbes
New Writeups
Mythi
July 24, 2008(personal)
locke baron
The fall of Earth(fiction)
BookReader
Fear the Cold(dream)
Pavlovna
Kathleen MacInnes(person)
stainedglass
1(fiction)
kalen
Three "T"s(idea)
octillion369
Undead(idea)
archiewood
Ico(fiction)
Heisenberg
Why I love Everything2(log)
octillion369
Death Knight(person)
XWiz
Are you hoping for a miracle?(review)
santo
The Host(review)
LostPsion
"Shut the Fuck Up" Theaters(idea)
beatrice
You've been slowly taking me over for nearly a year, do you know that?(idea)
Berek
YouTube(thing)
This page courtesy of The Everything Development Company