This is my entry for the world's worst children's book.
It's called, Seven, the Reason We're Here.
After each patch of green text, please imagine scanning an illustration and then turning a page.
For example, imagine scanning an illustration now and then turning a page.
Are you tucked into your cozy bed?
These are the integer divisors we're discussing today.
2 3 4 5 6 7 8 9 10 11 12
We will see if they are factors of integer x.
x can be expressed as (a + 10b + 100c + 1,000d + 10,000e + 100,000f...)
where (a, b, c, d, e, f...) are also integers.
We'll also check each rule for the arbitrary example when x = 987,654,321.
2 3 4 5 6 7 8 9 10 11 12
The easiest of these integers is 10.
10 is divisible by 10, so any multiple of 10 is divisible by 10.
This means we need only concern ourselves with the ones unit.
Remembering that x = (a + 10b + 100c + 1,000d + 10,000e + 100,000f...),
the variable a must be 0 to pass this test.
If the last digit of x is 0,
x is divisible by 10.
And if it is not, x is not.
In the case of 987,654,321, a = 1.
a ≠ 0, so 987,654,321 is not divisible by 10.
2 3 4 5 6 7 8 9 10 11 12
The second easiest of these is 5.
10 is divisible by 5, so any multiple of 10 is divisible by 5.
This means we need only concern ourselves with the ones unit.
The variable a must be 0 or 5 to pass this test.
If the last digit of x is divisible by 5,
x is divisible by 5.
And if it is not, x is not.
In the case of 987,654,321, a = 1.
a ≠ 0 or 5, so 987,654,321 is not divisible by 5.
2 3 4 5 6 7 8 9 10 11 12
The third easiest of these is 2.
10 is divisible by 2, so any multiple of 10 is divisible by 2.
This means we need only concern ourselves with the ones unit.
The variable a must be 0, 2, 4, 6, or 8 to pass this test.
If the last digit of x is divisible by 2,
x is divisible by 2.
And if it is not, x is not.
In the case of 987,654,321, a = 1.
a ≠ 0, 2, 4, 6, or 8, so 987,654,321 is not divisible by 2.
2 3 4 5 6 7 8 9 10 11 12
The fourth easiest of these is 4.
100 is divisible by 4, so any multiple of 100 is divisible by 4.
This means we need only concern ourselves with the ones and tens units.
The number ba must be divisible by 4 to pass this test.
If the last two digits of x are divisible by 4,
x is divisible by 4.
And if they are not, x is not.
Another step to take is to verify whether or not ba is "doubly even."
Does (ba/2) pass the divisibility by 2 test?
In the case of 987,654,321, ba = 21.
ba is not divisible by 2, and therefore most certainly not divisible by 4.
So 987,654,321 is not divisible by 4.
2 3 4 5 6 7 8 9 10 11 12
The fifth easiest of these is 8.
1,000 is divisible by 8, so any multiple of 1,000 is divisible by 8.
This means we need only concern ourselves with the ones, tens, and hundreds units.
The number cba must be divisible by 8 to pass this test.
If the last three digits of x are divisible by 8,
x is divisible by 8.
And if they are not, x is not.
Another step to take is to verify whether or not cba is "triply even."
Does (cba/2/2) pass the divisibility by 2 test?
In the case of 987,654,321, cba = 321.
cba is not divisible by 2, therefore not divisible 4, and most certainly not divisible by 8.
So 987,654,321 is not divisible by 8.
2 3 4 5 6 7 8 9 10 11 12
With 9, it stops being quite so easy.
Let's start with the ones unit.
1 ≡ 1 (mod 9), which just means it has a remainder of 1 after being divided by 9.
To elaborate, 9 goes into 1 exactly 0 times, with a remainder of 1.
If (≡) is new to you, please take a moment to reread that.
When 1 ≤ x ≤ 9, a ≡ a (mod 9).
Again, please take your time.
10 ≡ 1 (mod 9).
To elaborate, 9 goes into 10 exactly 1 time, with a remainder of 1.
Furthermore, for each 10 in the tens units, we collect a remainder of 1.
10b ≡ b (mod 9).
I think the 10's were actually easier than the 1's; do you?
What if we keep going?
100 ≡ 1 (mod 9), and
1,000 ≡ 1 (mod 9).
Also, 100c ≡ c (mod 9), and
1,000d ≡ d (mod 9).
As we add up digits, we're really just collecting a sum of remainders of 1.
That is why if (a + b + c + d + e + f...) is divisible by 9,
x is divisible by 9.
And if it is not, x is not.
In the case of 987,654,321, (a + b + c + d + e + f + g + h + i) = 45.
45 is divisible by 9, so 987,654,321 is divisible by 9.
2 3 4 5 6 7 8 9 10 11 12
Once you understand the reasoning behind 9, the reasoning behind 3 is already in place.
All of this is pretty easy to check now:
a ≡ a (mod 3)
10b ≡ b (mod 3)
100c ≡ c (mod 3)
1,000d ≡ d (mod 3), etc.
That is why if (a + b + c + d + e + f...) is divisible by 3,
x is divisible by 3.
And if it is not, x is not.
In the case of 987,654,321, (a + b + c + d + e + f + g + h + i) = 45.
45 is divisible by 3, so 987,654,321 is divisible by 3.
But we already knew that, because anything that is divisible by 9 is divisible by 3!
We were being silly geese.
2 3 4 5 6 7 8 9 10 11 12
Once you understand 9, you're only halfway to understanding 11.
Let's start with the ones unit.
1 ≡ 1 (mod 11), and a ≡ a (mod 11).
Continuing with the tens unit, 10 ≡ 10 (mod 11).
But you know what else? 10 ≡ -1 (mod 11).
If you're new to "modular arithmetic," imagine a clock that goes to 11 instead of 12.
Adding 10 hours to the hour hand is like subtracting 1 hour.
Pick a small number to test this. I'll pick 5.
I will add 10 to 0 (5 times), and I will get 50.
In the world of (mod 11), for each 10 I took, I also collected a debt of -1 in my remainders.
For 11 goes into 50 (5 times minus 5).
Or 11 goes into 50 (4 times plus 6).
But we didn't care how many times 11 went into 50; we only cared about the remainder.
Subtracting 5 and adding 6 is the same thing in the world of (mod 11).
All of this means that 10b ≡ -b (mod 11)! That's weird, huh?
Does that make sense?
Did you brush your teeth well? If you didn't, go brush your teeth again.
What if we examine the hundreds?
11 goes into 100 (9 times) with a remainder of 1.
And for every 100 I take, I collect a +1 in my remainders.
So 100c ≡ c (mod 11).
It's just like the ones.
Thousands?
11 goes into 1,000 (90 times) with a remainder of 10.
But also, 11 goes into 1,000 (91 times) with a remainder of -1.
So 1,000d ≡ -d (mod 11).
It's just like the tens.
That is why if (a - b + c - d + e - f...) is divisible by 11,
x is divisible by 11.
And if it is not, x is not.
In the case of 987,654,321, (a - b + c - d + e - f + g - h + i) = 25 - 20 = 5.
5 is not divisible by 11, so 987,654,321 is not divisible by 11.
2 3 4 5 6 7 8 9 10 11 12
The test for 6 is no fun, but it makes perfect sense.
Does x pass the divisibility by 2 test?
Does x pass the divisibility by 3 test?
The prime factors of 6 are 2 and 3, and that is why if x passes both tests, it is divisible by 6.
And if it does not, x is not.
In the case of 987,654,321,
987,654,321 is not divisible by 2, so 987,654,321 is not divisible by 6.
2 3 4 5 6 7 8 9 10 11 12
The test for 12 is even less fun. Dreary, even!
Does x pass the divisibility by 3 test?
Does x pass the divisibility by 4 test?
The prime factors of 12 are 2, 2, and 3, and that is why if x passes both tests, it is divisible by 12.
And if it does not, x is not.
In the case of 987,654,321,
987,654,321 is not divisible by 2, so 987,654,321 is not divisible by 12.
2 3 4 5 6 7 8 9 10 11 12
At last, 7, THE REASON WE'RE HERE.
We will express x as
x = a + 10b.
Notice that x can be any integer, because b can have any number of digits.
Now, we will multiply x by 5.
It's an odd move, but if 5x is divisible by 7, then x is divisible by 7.
5x = 5a + 50b.
5x = 5a + (b - b) + 50b
5x = (5a + b) + 49b
But wait! We already know that 49b is divisible by 7!
That means if (5a + b) is divisible by 7,
x is divisible by 7.
And if it is not, x is not.
In the case of 987,654,321, a = 1 and b = 98,765,432.
(5a + b) = 98,765,437.
(5a + b) = 9,876,578.
In the case of 9,876,578, a = 8 and b = 987,657.
(5a + b) = 987,697.
In the case of 987,697, a = 7 and b = 98,769.
(5a + b) = 98,804.
In the case of 98,804, a = 4 and b = 9,880.
(5a + b) = 9,900.
In the case of 9,900, a = 0 and b = 990.
(5a + b) = 990.
In the case of 990, a = 0 and b = 99.
(5a + b) = 99.
In the case of 99, a = 9 and b = 9.
(5a + b) = 54.
54 is not divisible by 7, so 987,654,321 is not divisible by 7.
Here's another one.
Again, we will express x as
x = a + 10b.
Now, we will multiply x by 2.
It's an odd move, but if 2x is divisible by 7, then x is divisible by 7.
2x = 2a + 20b.
2x = 2a + (b - b) + 20b
2x = (2a - b) + 21b
But wait! We already know that 21b is divisible by 7!
That means if (2a - b) is divisible by 7,
x is divisible by 7.
And if it is not, x is not.
To make our computations a little easier, we can multiply by -1.
For if (2a - b) is divisible by 7, then -1(2a - b) is divisible by 7.That means if (b - 2a) is divisible by 7,
x is divisible by 7.
And if it is not, x is not. (b - 2a) = 98,765,430.
In the case of 987,654,321, a = 1 and b = 98,765,432.
In the case of 98,765,430, a = 0 and b = 9,876,543.
(b - 2a) = 9,876,543.
In the case of 9,876,543, a = 3 and b = 987,654.
(b - 2a) = 987,648
In the case of 987,648, a = 8 and b = 98,764.
(b - 2a) = 98,748.
In the case of 98,748, a = 8 and b = 9,874.
(b - 2a) = 9,858.
In the case of 9,858, a = 8 and b = 985.
(b - 2a) = 969.
In the case of 969, a = 9 and b = 96.
(b - 2a) = 78.
In the case of 78, a = 8 and b = 7.
(b - 2a) = -9.
-9 is not divisible by 7, so 987,654,321 is not divisible by 7.
Which one of those do you like better?
I like the first because I'd rather add than subtract.
Still can't sleep?
Seven was interesting, because we did some strange things to the original remainder.
But what, exactly, did we do?
Our original remainder was 0, 1, 2, 3, 4, 5, or 6.
Remember how the first algorithm multiplied the entire number by 5?
That means it also multiplies the remainder by 5.
The new remainder was that number (mod 7).
So for each time we repeat the first algorithm, we multiply the remainder by 5 (mod 7).
If the remainder is 0, multiplying by 5 (mod 7) changes nothing.
If the remainder is anything else, it goes through this cycle: (1, 5, 4, 6, 2, 3).
To elaborate,
1*5 = 5, which is 5 (mod 7).
5*5 = 25, which is 4 (mod 7).
4*5 = 20, which is 6 (mod 7).
6*5 = 30, which is 2 (mod 7).
2*5 = 10, which is 3 (mod 7).
And 3*5 = 15, which is 1 (mod 7).
But what about our second algorithm?
Each time we repeat the second algorithm, we multiply the remainder by -2 (mod 7).
If the remainder is 0, multiplying by 5 (mod 7) changes nothing.
If the remainder is anything else, it goes through this cycle: (1, 5, 4, 6, 2, 3).
That's the same cycle.
Why are they the same?
Remember, we're on a clock that only goes to 7.
Every time you add 5 to a number (mod 7), that's the same as subtracting 2.
So when you add 5 a bunch of times, that's the same as subtracting 2 that same bunch of times.
Let's check our math from before.
Notice that with both algorithms, we went through the process 8 times.
And with both algorithms, we ended with 5 (mod 7).
In case you forgot, the first algorithm gave us 54 ≡ 5 (mod 7).
The second gave us -9 ≡ 5 (mod 7).
We can cycle through (1, 5, 4, 6, 2, 3) backwards 8 times to get our original remainder.
From 5, we go 1, 3, 2, 6, 4, 5, 1, and finally 3.
And indeed, 987,654,321 = 7(141,093,474) + 3.
Good night!
Sleep tight!
Don't count the sheep; have your sibling do that for you.
Then you can check if integers 2-12 are factors of the size of the herd.
THE END.
Seven Smiling Sheep, Wikimedia Commons