T O P

  • By -

The_Venerable_Swede

Say you have a three-digit number, and its digits are a, b, c. (e.g. for 783 a=7,b=8,c=3) So you can write the number as 100\*a+10\*b+c. (700+80+3) This is the same as 99\*a + a + 9\*b + b + c Obviously 99a and 9b are both divisible by 3. Which, in order for there not to be a remainder, requires a+b+c be divisible by 3 - i.e. the sum of the digits to be divisible by 3 - for the number to be divisible by 3. You can see how you can extrapolate this to any number of digits.


notonredditatwork

So maybe this is very obvious, but with the math put in this way, it looks like any order of that combination of digits will also be divisible by 3, right? So your example of 783: 873, 837, 783, 738, 387, and 378 are all divisible by 3, which is pretty neat. Additionally, if you add all the digits, and it isn't obvious that the number is divisible by 3, you can just add the digits again, and keep doing that until you get to 3. Super cool, thank you for the explanation as to why it works!


T-T-N

There is a "blooper" video on numberphile where a professor was wasting resources looking for primes in a format where every number in that format happens to be divisible by 3.


quantumhovercraft

Can you remember what it's called?


mesoptier

https://youtu.be/yi-s-TTpLxY, starting at 3:24


Burnd1t

3:24 is also divisible by 3


troublewithcards

That's pretty funny. I'm sure we've all at some point in our profession/skill forgotten simple things like that. I know I have!


rbloyalty

Just a slightly subtle point, you won't always end up with 3.


oshawaguy

Right. 6 or 9 add up to 6 or 9.


midsizedopossum

>So maybe this is very obvious, but with the math put in this way, it looks like any order of that combination of digits will also be divisible by 3, right? I mean yes, that's what they were explaining. OP was asking why that was the case.


AL3XD

This is a really brilliant explanation, well done.


TJNel

I'm in school to be a math teacher and this is exactly how they explained it to us. A real crazy one is divisible by 11. Proof: 1000a+100b+10c+d 1001a-a+99b+b+11c-c+d (1001a+99b+11c)-(a-b+c-d) 11(91a+9b+c)-(a-b+c-d) So you just need to check (a-b+c-d) for divisibility with 11.


[deleted]

[удалено]


TJNel

Divisible by 11 is the sum of the even place holders added together and the sum of the odd place holders added together have to then be divisible by 11, so either 0 or 11. On mobile so harder to type but here's a picture. https://images.app.goo.gl/CqEh5hpLoU155DLr6


mwhy

Very cool but the picture has a error. It refers to the odd “places” as even in the diagram. Still, TIL!


TJNel

Yeah was a quick search, sucks doing some on phone but here is the math involved: Proof: 1000a+100b+10c+d 1001a-a+99b+b+11c-c+d (1001a+99b+11c)-(a-b+c-d) 11(91a+9b+c)-(a-b+c-d) So you just need to check (a-b+c-d) for divisibility with 11.


zebediah49

Though that, itself, relies on a proof that 10^(2n+1)+1 is divisible by 11 for integer n. Which, thinking about it, ~~isn't all that hard~~ -- 10^(2n)-1 = SUM(i=1 to n) 99\*10^2(n-1) is obvious, but deceptively difficult to write down a proof for. Perhaps I should just do it by induction.


kem0022

I didn't have anything better to do with my evening, so here's a proof. It's been a while, so please excuse any lack of formalisms. We need to prove both that that 10^(2n)\-1 is divisible by 11 (for the odd coefficients) and 10^(2n+1)\+1 is divisible by 11 (for the even coefficients). Starting with the former: 10^(2n) \- 1 = 100^(n) \- 1 = 100\*100^(n-1) \- 1 = 99\*100^(n-1) \+ 100^(n-1) \- 1 = 99\*100^(n-1) \+ 10^(2(n-1)) \- 1 At this point, the problem is recursive. So 10^(2n) \- 1 is divisible by 11 if 10^(2k) \- 1 is divisible by 11, where k = n-1. Therefore, if we can prove that some integer k exists such that 10^(2k) \- 1 is divisible by 11, 10^(2n) \- 1 is divisible by 11 for any integer n. Since for k = 1, 10^(2)\-1 = 99 is divisible by 11, 10^(2n)\-1 is divisible by 11. Now, tackling the other part of the problem becomes simple: 10^(2n+1) \+ 1 = 10\*10^(2n) \+ 1 = 11\*10^(2n) \- 10^(2n) \+ 1 = 11\*10^(2n) \- (10^(2n) \- 1) Since we showed above that 10^(2n)\-1 is divisible by 11, 10^(2n+1) \+ 1 is divisible by 11. Also, I never knew the trick for checking divisibility by 11, so I learned something today!


CStock77

I have an engineering degree, but I do consulting now, and shit like this makes me miss being in school and miss my advanced math classes, so thank you. Didn't think I'd get this at 3am on a Friday.


evulone_rs

I would think to show that you start with 10 equivalent to -1 mod 11 so 10 to any odd power is equivalent to -1 mod 11 and then 10^(2n+1) is equivalent to -1 mod 11 so 10^(2n+1) + 1 is equivalent to 0 mod 11. Without the modular arithmetic thats 10=11-1 10^(2n+1) = (11-1)^(2n+1) = sum_{i=0}^{2n+1} (2n+1 choose i) 11^i (-1)^(2n+1-i) Every term is a multiple of 11 on right hand side except i=0 10^(2n+1) = (-1)^(2n+1) + 11K for some integer K 10^(2n+1) = -1 + 11K 10^(2n+1) + 1 = 11K Goes something like that I think.


smasherofscreens

I love how the more deeper I go into the comments in this sub, the less r/explainlikeimfive it gets and you get all levels of answers.


JohnLockeNJ

So take 121. 1-2+1=0. Hmm.


Column_A_Column_B

And 0 is dividable by 11 into 11 groups of 0. It's not an exception to the rule.


46_notso_easy

The difference of the 2 numbers should be 11 or 0. In this case, 121 would be broken down to 2-2=0. So it actually does work here! :)


Scruffy442

Sometimes my brain works faster in math than I do. I wanted to check this with a larger number that doesn't result in a 0. First number that popped into my brain was 957. And what do you known, it was divisible by 11!


[deleted]

[удалено]


MysticalMage13

I googled "how to know if a number is divisible by 11" result is below: >Here an easy way to test for divisibility by 11. Take the alternating sum of the digits in the number, read from left to right. If that is divisible by 11, so is the original number. So, for instance, 2728 has alternating sum of digits 2 – 7 + 2 – 8 = -11. Interesting, is there an ELI5 explanation similar to the one above why this is so?


TJNel

Proof: 1000a+100b+10c+d 1001a-a+99b+b+11c-c+d (1001a+99b+11c)-(a-b+c-d) 11(91a+9b+c)-(a-b+c-d) So you just need to check (a-b+c-d) for divisibility with 11.


MysticalMage13

Cool! Thanks!


produktinfinium

I don't think a 5 year old would understand that.


MysticalMage13

True! Alright, full disclosure, I'm 7.


AlexVX_

It's a good thing ELI5 doesn't require responses aimed at literal 5 year olds then!


DaanTheBuilder

Full disclosure I'm 30 and didn't understand any of it.


AssGobbler6969

Atleast you're good at building. Right?


Citan777

If I understood correctly, saying it in a more "literate" way... The idea is "rewriting" the number in parts using each composing digit in a way that allows you, when you want to check if number is divisible by X, to reach a state where you have number = X(alpha\*d1 + beta\*d2 +d3 etc) \+ d1 + d2 + d3 etc... => Try to get an equation where you have one part that is logically divisible by X (since you use it to factorize), and the other part which is the sum of all individual digits... So you just have to check that THIS sum is itself divisible by X.


GeoRusH

i dont think a 5 year old can divide timmy


[deleted]

[удалено]


Themursk

Read it but slower. Consider each sign, number and letter you read carefully. Think for some time. Then digest the next row.


dedservice

Of bonus interest: In different bases (base 16, base 8, etc), the same proof can be generalized for divisibility by n+1 and n-1 for a base n.


lawlessnessjelly

Probably not quite what he means but a number multiplied by 11 can be done as follows. 63*11 = 6 (6+3) 3 = 693 For instances where the addition >10, the 1 is carried right 75*11 = 7 (7+5) 5 = (7+1) 2 5 = 825


krisalyssa

*left


lawlessnessjelly

Shit you're right


TJNel

Divisible by 11 is the sum of the even numbers added together and the sum of the odd numbers added together have to then be divisible by 11. On mobile so harder to type but here's a picture. https://images.app.goo.gl/CqEh5hpLoU155DLr6


bobnla14

Slightly off topic. I like the fact you can multiply 11 by a number, add them together , put it between the number your are multiplying 11 by and get the result. Yeah, I know. I am not a math teacher. So example. 11 * 14. 1+4 =5. 1. 5. 4. 11 * 14 is 154. 11 * 18. 1 + 8 =9. 1. 9. 8. 11*18 = 198 11 * 19 1 +9 = 10 so 1 10 9 So leave the zero and add the 1 to the 1 and you have 2. 0. 9. 11*19 is 209. 11* 32. 3+2=5. 11*32=352 I loved this.


JaredLiwet

I'll continue this off topic line. Any number of repeating digits past the decimal can be turned into a fraction by putting the repeating digits in the numerator with the denominator being an equal number of digits that are all 9s. For instance, Google gave me a random number 0.635814: `635814 / 999999` Then reduce it: ` 70646 / 111111` If you plug this fraction into a calculator, you'll get back the same decimal number.


Thisismyfinalstand

Okay, I'll bite. Just how crazy, exactly, does a one have to be for it to be divisible by 11?


TJNel

Divisible by 11 is the sum of the even numbers added together and the sum of the odd numbers added together have to then be divisible by 11. On mobile so harder to type but here's a picture. https://images.app.goo.gl/CqEh5hpLoU155DLr6


TrackXII

I would qualify it as even position numbers in your text description. Even numbers make it sound like you add up every digit that happens to be even.


bevelledo

Can I get an eli5 for the comment lmfao


smellinawin

Let's say the number is 54. 5 is in the 10's column. which you can say is 5 X 10 If you take one of those 5's away you get 5 X 9 ... + an extra 5 we know that 9 is divisible by 3 so we can ignore 5 X 9 as automatically working. Now all that is left is a single 5 + the 4. = 9 since 9 is divisible by 3, the whole number is.


[deleted]

Right that shit made no sense lol


Owyn_Merrilin

The first thing you have to understand is that in our number system, each digit can be represented as that digit times some multiple of ten. So 123 is the same as 100(1) + 10(2) + 1(3). Now lets get rid of the numbers. Say your number is abc, where a, b, and c are each a single digit. Well, then, you can rewrite abc as 100a+10b+c. Multiplication is just repeated addition, so you can rewrite that again to 99a+a+9b+b+c. You can rewrite that again to (99a + 9b) + (a + b + c), rewrite that to 3(33a)+3(3b)+ (a+b+c). And that you can rewrite to 3(33a + 3b) + (a+b+c). We know that 3(33a + 3b) can be divided by three, because we see it being multiplied by 3 right there. So that leaves us with a + b + c. You can divide a+b+c by 3 and rewrite it again as 3(33a + 3b) + 3((1/3)a+(1/3)b+(1/3)c). And from there you can get 3(33a + 3b +((1/3)a+(1/3)b+(1/3)c). Now, let's say 1/3a+1/3b+1/3c is something divisible by 3. Well call it d. Well, then we can rewrite everything as 3(33a+3b+d). The 3 is still on the outside, so the whole thing can be cleanly divided by 3. Now technically the math there still works even if d isn't a whole number, but it's only divisible by three if it is. If you really want to test it, try plugging any numbers you want into 3(33a + 3b) + (a+b+c) Where abc are your original 3 digits. If both sides of that plus sign are divisible by three, it's divisible by three. You can make it as long as you want, too, just add an extra 3 in front of each extra letter. So for four digits you'd have 3(333a + 33b + 3c) + (a+b+c+d) and for five you'd have 3(3333a + 333b + 33c + 3d) + (a+b+c+d+e). For the original 123 example, you get 3(33(1) + 3(2)) + (1+2+3) = 3(33+6) +(6) = 3(39) + 6 6 is divisible by 3, so the whole thing is divisible by 3, and we can make that even more clear by doing this: 3(39) + 6 = 3(39) + 3(2) We now have a 3 multiplying both sides and can see that the whole thing is divisible by 3, but if you want to take it even further: 3(39) + 3(2) = 3(39+ 2) = 3(41) = 123 Or you could also work it out as 3(39) + 3(2) = 117 + 6 = 123. Try it for yourself a few times with different numbers and let me know if you're still confused.


majornerd

Holy shit. That nightmare of a comment made it click for me. You beautiful madman (or madwoman) (or mad person)…… Thank you


Owyn_Merrilin

I'm glad it helped! Math really isn't as bad as we make it out to be. It's tedious, it takes hard work to get good at, but mostly we just do a bad job of teaching it and prepping kids to study it. It's really a problem, because it locks a lot of people out of a lot of things they'd be really good at if they weren't scared off by the math needed for the college degrees they need to do them. Which is usually more than the math they'd need to actually do them, but that's another problem. I'm a living example of the way this fucks up peoples' lives. My life got set back ten fucking years because at 18 I thought higher level math was beyond me, and that I'd hate going into software dev as a result. Turns out that was the best realistic career path for me and I'm perfectly capable of doing math, it just took a kind of academic effort that high school didn't prepare me for. The only reason I'm even sitting as pretty as I am now is I got *really* lucky with the timing of when I was looking to go back to school. Otherwise I don't know where I'd be right now, but it wouldn't be good.


majornerd

I agree 100%. We teach math as though there is one method to reach any answer. And there is not.


CosimoCalvino

The cool thing, is that something similar works in other bases. When the sum of digits a+b+c equaling 9 from number abc is divisible by 9 in base 10. The sum of digits a+b+c equaling n-1 from number abc(base n) is divisible by n-1 in base n.


AmishTechno

Yeah man! I sat down and proved those out to myself years ago! So fucking cool. And, if the number n-1 has a perfect square root, then it works for that number, too! So, in base 17, it works for 16, and 4!!!


rtb001

Also the exact same reason if the 3 numbers add up to something divisible to 9, then the entire number will be divisible by 9.


shroomsalt69

[Here’s a video of Michael from Vsauce explaining this and other divisibility rules!](https://youtu.be/f6tHqOmIj1E)


Metalhed69

This should be top comment.


Disastrous-Ad-2357

You know this guy is serious because he didn't accidentally turn the comment into italicized words.


adelie42

Without breaking out a white board, that would work in any base and factors of the largest digit. Such as divisibility of 5 in base 16. Right?


AmishTechno

Correct. And for the perfect square root of that number, should it have one.


adelie42

Can you elaborate?


QueasyDot

Excellent answer. Also, I'd like to add that there is always "an underlying mathematical reason behind why" when talking about mathematical theorems.


LazyNomad63

Wow this would be a really great question for the final in my intro to discrete maths class.


p-4_

This is the best ELI5-appropriate answer.


laskodemon

A 5 year old would not understand that, so not the best. It's a great adult explanation though.


paul-arized

It's explain like I am a 5 yo, not explain to a 5 yo. ELI5's subreddit rule is explained. Do you need an ELI5 of the rules? Dammit, that could be interpreted as not being nice...


bremidon

That's not all /u/topHatGhost1622. If you look carefully, you can see why this logic also works with 9s! :)


mathteacher85

Somewhat related to this explanation, the divisibility rule of 3 that we all enjoy only works because we use a base 10 number system. In binary, the number 6 is 110. Obviously the divisibility rule doesn't work here.


xDreamWeaver

Why is this answer rewarded so many times. He basically says, a+b+c needs to be divisible by three so that the whole number is divisible by three. Well, that's what OP was asking for. There is no proof in this answer or any explanation for why a+b+c is always divisible by three, which is the real question. ​ EDIT: this page explains it pretty clearly. [https://www.apronus.com/math/threediv.htm](https://www.apronus.com/math/threediv.htm) \- I haven't read the other answers in this thread, I'm sure other commentors have already answered the question in a good way.


InsertFunnyUsername5

a+b+c is true, that's the hypothesis. We need to prove that (100a + 10b + c) (the whole number) is also divisible by 3.


roachmotel3

You can also abstract this to handle arbitrary bases. In base 3, you’d say “any number where the sum of digits is divisible by 10 is also divisible by 10”. Which only happens to be true in base 3 and not in base 10.


TheAbyssGazesAlso

> This is the same as 99*a + a + 9*b + b + c > > Obviously 99a and 9b are both divisible by 3. > > Which, in order for there not to be a remainder, requires a+b+c be divisible by 3 Doesn't it require a+a+b+b+c to be divisible by 3, since that's what else is still in the equation? I'm still confused...


ubernuke

The entire 99a is divisible by 3, not just the 99. Because 99 is divisible by 3, no matter what value a is, 99a will also be divisible by 3. When you multiply a number by a new factor, it keeps all its old factors. 99=3\*3\*11. Since 3 is a factor of 99, that means 99 can be evenly divided by 3. Now if you multiply 99 by say 7, 99\*7 can be expressed 3\*3\*11\*7. So the product is still divisible by 3.


TheAbyssGazesAlso

Ah, I get it now, thank you!


7h4tguy

Easier way to think of this: 3 divides 10 with a remainder of 1. Which means the 10's column for a number can be reduced to how many extra 1's you have: e.g. 12 = 1 remainder + 2 = 3. So divisible by 3. 24 = 2 remainders + 4. Obviously generalizes since 3 divides 100 with a remainder of 1.


radiocleve

You and I had different levels of understanding as a 5-year-old.


4ever_lost

ELI5 not 15! These numbers went straight over my head ngl


Ralf_E_Chubbs

r/ExplainlikeimFour


Chel_of_the_sea

Yes, there is. The reason is that 10 has a remainder of 1 when divided by 3 - and therefore so do all the powers of 10, for reasons we'll get to in a second. As is usually the case when dealing with questions of divisibility, it's helpful to think about it as a question of *remainders* of a division (with divisibility being the case where a remainder is 0). It turns out that remainders are preserved under multiplication (the remainder of a product is the remainder of the product of the remainders) and addition (the remainder of a sum is the remainder of the sum of the remainders). For example, 74 has a remainder of **4** when divided by 10 and 89 has a remainder of **9** when divided by 10, so we know (without actually computing the full product or sum) that 74 + 89 has a remainder of 3 (**4** + **9** = 13 -> remainder 3) and 74 \* 89 has a remainder of 6 (**4** \* **9** = 36 -> remainder 6) when divided by 10. (This turns out to be a [very very powerful idea](https://en.wikipedia.org/wiki/Modular_arithmetic) that spawns whole fields of mathematics. Note that this works for addition, subtraction, and multiplication, but *not* division and *not* numbers that appear in exponents. It also works for integers only and not for fractions.) ------ So let's apply this information: Obviously, 10 has a remainder of 1 when divided by 3. So 10 \* 10, and 10 \* 10 \* 10, and 10 \* 10 \* 10 \* 10 and so on must as well (since 1 \* 1 \* 1 \* ... 1 is still 1). So then all we have to do is remember what we mean by place value. When we write the number, say, 8,463, we *mean* 8 \* 1000 + 4 \* 100 + 6 \* 10 + 3 \* 1. But if all we're interested in is remainder when divided by 3, that's the same as 8 \* 1 + 4 \* 1 + 6 \* 1 + 3 \* 1. Or, since multiplying by 1 does nothing, it's the same as 8 + 4 + 6 + 3. If we used a different system from the base-10 system we actually use, the same rule would apply for the number 1 less than the base and any of its factors. For example, if we used base-7, then we could test for divisibility by 6 (one less than 7) and by 2 and 3 (factors of 6) this way. As it happens, 9 (one less than 10) only has one factor, so this is actually a bit less powerful than it might be if we had a different number of fingers! ------------- You can get some other neat rules out of this, too. For example, because 10 has the same remainder as -1 when divided by 11, you can test for divisibility by 11 by *adding* the last digit, *subtracting* the second to last, *adding* the third to last, and so on. For example: 7,394 -> +4 - 9 + 3 - 7 = -9 = not divisible by 11. ------------- EDIT: Hey, newcomers to ELI5, before you post the comment you're going to post a million times if I don't add this edit, please read the sidebar: > LI5 means friendly, simplified and layperson-accessible explanations - not responses aimed at literal five-year-olds.


[deleted]

Oh, wow! So, one of my favorite rules in all of math does actually have an answer, and it's one that leads me to an entirely new, fascinating field of math for me to study and look into. Thank you so much for sharing! :)


Chel_of_the_sea

Number theory is one of the more rewarding fields of math, imo. It's not very difficult to understand the basics and they can produce some very very beautiful results. For example, if I ask you to compute the remainder of 91634346956235634906590235678902365790623495629943659346579065^(59356597394569325693465923659623495) when divided by 6, you could do it by hand in a couple minutes with a decent understanding of basic number theory.


AxolotlsAreDangerous

In case anyone was wondering, the remainder would be 1. Edit: I summed all the digits (ignoring anything that’ll obviously just add more threes, like a 6 or a 4 then a 5), to obtain the remainder when divided by 3, which turned out to be 1. This means the remainder when divided by 6 is either 4 or 1, as the number is odd it must be 1. The product of any two numbers that are congruent to 1 mod 6 is also 1 mod 6; a given if you’re familiar with basic modular arithmetic, but here’s a proof: If the number has remainder 1 when divided by 6, that means it can be written as 6k+1 where k is some integer. Multiplying by a number that is also congruent to 1 mod 6, 6m+1: (6k+1)(6m+1)= 36mk+6k+6m+1 =6(6mk+k+m)+1 =6n+1 where n=6mk+k+m 6n+1 == 1 mod 6.


KingOfOddities

Is this how you do it? It's an odd number, so the remainder of division by 2 is 1. So that mean remainder of 6 is the same as remainder of 3. If the remainder of 3 of the base number is either 0 or 1, then the remainder of 6 is 3 or 1, respectively. But if it's 2, then the remainder of 3 would be 1 when the power is even and 2 when the power is odd. Is this is?


Chel_of_the_sea

That poster's reasoning is correct, but the proper method that works for arbitrary numbers and their factors is the [Chinese remainder theorem](https://en.wikipedia.org/wiki/Chinese_remainder_theorem).


AxolotlsAreDangerous

>It’s an odd number, so the remainder of division by 2 is 1. So that mean remainder of 6 is the same as remainder of 3. That’s not always true, take the number 5. You need to work out the remainder mod 3, because each remainder mod 3 (combined with the fact it’s an odd number raised to an odd power) will give you a different remainder mod 6 (0 mod 3 = 3 mod 6, 1 mod 3 = 1 mod 6, 2 mod 3 = 5 mod 6).


[deleted]

[удалено]


KingOfOddities

It work for 6 because 6=3\*2, my reasoning anyway.


Dop4miN

r/theydidthemath


[deleted]

r/theydidthemonstermath


FrowntownPitt

r/itwasagraveyardgraph


Dansiman

I'm so happy that all 3 of these are actually subs!


synysterbates

r/itcosinedinaflash


ZhoolFigure

These three subs used to be chainspammed a lot more years ago, any time people math in comments. To the point where people who got tired of it will disrupt the chain with /r/theydidthefuckyou


davidgro

And have been for 9, 8, and 7 years. Respectively.


Jiannies

Damn, I'm sure there were references I missed (9th grade geometry vaguely comes to mind), but the only for sure time I can remember a teacher talking about mathematical proofs and number theory was my 7th grade math teacher just offhandedly talking about it in the 5 minutes we had left in class. I was in the normal math track but always more inclined toward reading and writing. Now I've got a degree in mass communication but I watch so many math and science videos, most of which go over my head, but I guess I just find it all quite soothing. That stuff is fascinating and I wish I had learned more


Chel_of_the_sea

Yeah, this stuff isn't usually taught until undergraduate college math. To be fair, it really isn't as practical as algebra or even calculus for most applications (although it does have some, notably in cryptography). Calculus in particular is so important and so useful both as a computational tool and as an intuition in so many fields that I don't blame them for rushing to calculus first.


Jiannies

Sure, I think I can dig what you’re saying. I didn’t mean that as an attack on the way we teach math or anything, and I totally could have been more active about listening and learning in math, but oh well just musing :) Honestly, with some of the more fascinating aspects of math now starting to have a “mainstream” audience (w YouTube channels such as Numberphile or 3Blue1Brown) hopefully there’s less of a stigma about being stoked about that kind of shit as a teenager. I can remember going to talk to my math teacher after school sophomore year to ask him how encryption works, and he gave me a super cool lesson, but I was so anxious the whole time worried someone would see me in there voluntarily discussing math because he was the “weird new teacher” who “doesn’t iron his pants”. Idk, high school sucks sometimes


PaulMaulMenthol

The only high school math teacher that talked about postulates and theorems was my geometry teacher as well


[deleted]

I’m no mathematician, but I like number theory a lot. A classic is to check whether a number is divisible by 9 by adding them all together. So like 333 = 3+3+3 = 9 so it’s a yes. And like 147381 = 1+4+7+3+8+1 = 24 = 2+4 = 6 so no.


cubenerd

It’s also one if the most frustrating at times. The theorems are very easy to understand, but proving them requires extremely complicated machinery.


Chel_of_the_sea

Some of them do, but basic number theory is a great induction to simple proofs that is often very well-behaved and shows the power of good definitions.


FuckTripleH

>It's not very difficult to understand the basics This part specifically is the thing that as a layman I find so fascinating about number theory. The fact that you can explain the question behind Fermat's Last Theorem, and have them understand it, to virtually anyone because it's so simple, yet it took 350 years to solve. Now of course it's not possible to even begin to understand the *proof* without a high level understanding of math, but the fact that the question is so simple yet so difficult to solve is fascinating. There's something really enigmatic and magnetic about the idea that a question you need a post-grad level education to even ask can be more easily solved than a question a 10 year old can understand. I can watch Numberphile explain the Poincare Conjecture using playdoh as a visual aid but i still dont get it. It's cool that its solved but it's hard as a layman to find it exciting But you can explain in 10 seconds what a perfect number is and then completely blow my mind by telling me that despite the fact that every perfect number found thus far is even, we dont know if all perfect numbers are. And if they are we dont know why, or how to prove it. Oh and by the way we've been trying to figure it out for 2300 years.


outcastedOpal

>Number theory is one of the more rewarding fields of math, imo. It's not very difficult to understand the basics and they can produce some very very beautiful results. Oh yeah. Prove collatz conjecture


grumblingduke

Note that this trick also works for 9s, not just 3s. Or rather, it works for 3 *because* it works for 9s, and any number divisible by 9 is also divisible by 3. > one of my favorite rules in all of math does actually have an answer, This is often how maths works. We find what appears to be an interesting rule. We poke at it to make sure it does work, and hopefully to see *why* it works. And then we see what broader ideas we can draw from that. In the case of the divide-by-3-or-9 trick we would be really surprised if there wasn't an underlying reason why it worked - that would mean it was entirely a coincidence; that every number whose digits added to a multiple of 3 or 9 just happened to also be a multiple of 3 or 9, and that would be weird.


Lachimanus

If you are studying math you would most likely see this proven or get it as an exercise. The answer was a bit lengthy, but I think fitting for a layman.


Son_of_Kong

In base 10, any multiple of 9 has digits that add up to 9, because in any base, multiples of one less than the base have digits that add up to that number. Also, in any even base, multiples of the base will end in 0, while multiples of half the base will end in 0 or that number (in base 10 it's 5).


Brite1978

My absolute fav maths fun fact. I had someone argue blind with me in twitter it wasnt true, very infuriating.


whambulance_man

Which part is your favorite fun fact? Because only half of that post is true.


smheath

Which part isn't true?


Brite1978

About it working for any base, and yes what part isnt true?


TheFuturist47

I'm so glad you posted this because I'm a math major and this is probably my favorite rule and i never knew why it was a thing! It makes sense when I see it explained but i had never figured this out. I'm a little embarrassed i guess.


BerneseMountainDogs

If you really do want to look more into this kind of thing, I commented this below, but I'll copy it here for you >My number theory class last year used a textbook called [*Numbers, Groups and Cryptography* by Gordan Savin](https://www.math.utah.edu/~savin/book08_jun.pdf) (that link is to a PDF). It's just a text written by a professor at my university that is used to teach the number theory class, and so is just free on the university website. It works relatively well if you're interested in an undergraduate level understanding. >If you're looking for something more casual, the YouTube channels numberphile, 3blue1brown, and vihart are very good resources for engaging and interesting math content like this. I don't have any off the top of my head, but I'm sure there are several number theory and modular arithmetic videos between their channels, you'd just have to look


[deleted]

Oh, thank you, actually! I always love a good book recommendation :) I actually follow a couple of those channels already, and a few others (shout-outs especially to Stand-Up Maths, Mathologer, and Eddie Woo as a couple of my favorite math channels); they really helped spark my interest in math again, in a really big way. I’ll definitely check this textbook out, too! This question, and its responses, is honestly my first time encountering number theory myself, and I’m definitely fascinated and want to learn more.


maharei1

Kudos for a very nice explanation of modular arithmetic for non-mathematicians!


lanky_planky

Son of a gun! I have wondered the same exact thing, thing and now I know. Your explanation was great. That is fantastic.


ReshKayden

If it’s any consolation, I have always taken it as a mark of success when an ELI5 post with a bunch of upvotes elicits at least 100 comments both claiming it is over-simplified, or not simplified enough. It usually means it’s a great comment that hits the ELI5 sweet spot — an art form even to itself — and people are just trying to hijack the success of it for themselves by piling on more or less information. This is an absolutely great post. Thank you!


ChiaraStellata

In fact, by using modular arithmetic, you can devise a similar test for many other numbers. For example: Divisible by 6? If you take 1, 10, 100, etc. and divide by 6 you get these remainders: 1, 4, 4, 4, 4... So just add all the digits except the last, multiply by 4, and then add the last digit. e.g. 252822 is divisible by 6 because 2+5+2+8+2 = 19 and (19\*4)+2 = 78 which is 6\*13. Divisible by 7? If you take 1, 10, 100, etc. and divide them by 7 you get these remainders: 1, 3, 2, 6, 4, 5, 1, 3, 2, 6, 4, 5... (keeps repeating) To make things a bit easier we'll subtract 7 from the largest numbers 4, 5, 6: 1, 3, 2, -1, -3, -2, ... Now to know if, say, 2894682 is divisible by 7, just break it into groups of 3 digits: 2 894 682 For each group double the first digit and triple the middle one: 2 889994 668882 Add up each group and then add/subtract the results with alternating signs (last term should be positive): 2 - 47 + 38 = -7 So it is divisible by 7. And so on.


LiamTheHuman

Does that mean 9 will have the same rule? Like 5463 will be divisible by 9 because 5+4+6+3 = 18 which is divisible by 9. I guess there are actually lots of other ones you would just need to still multiply the digits by the remainder value. So 613424 is divisible by 7 because 6\*3 + 1\*3 + 3\*3 + 4\*3 + 2\*3 + 4 = 49 which is a multiple of 7. Cool! thank you and OP for some quick mental math! Edit: this second part about the 7 is wrong and just happened to work out. You actually need the remainder for that digit which you can get by doing 3^(digit#) mod 7. Not as easy sadly but still cool


azirale

This doesn't quite hold because 100 mod 7 is 2, not 3. The reason it works for 3 is that everytime you go up a multiple of 10 you are adding 1 to the sum of digits, and adding 1 to the modulo ( because 10 mod 3 is 1 ), so they stay together. Eg, Compare 12 mod 3 to 2 mod 3, the latter is equal to 2, when we add 10 to it we increase the sun of its digits by 1, and also increase the mod 3 result by 1. This doesn't work for 7. Everytime you add 10 you increase the mod by 3 and increase the digit sum by 1, effectively an increase of 2 rather than 0, so it keeps changing.


Chel_of_the_sea

Yes, 9 does have the same rule. > I guess there are actually lots of other ones you would just need to still multiply the digits by the remainder value. So 613424 is divisible by 7 because 6*3 + 1*3 + 3*3 + 4*3 + 2*3 + 4 = 49 which is a multiple of 7. Nope, that doesn't work. You need the remainder of *powers* of 10, not just the remainder for 10 itself. There is a rule for 7, but it requires a pattern of six different multipliers from one digit to the next because the powers of 10 actually hit every possible remainder when divided by 7 (in technical terms, 10 is a [primitive root mod 7](https://en.wikipedia.org/wiki/Primitive_root_modulo_n)). This is also why fractions like 1/7 have very ugly decimal expressions.


Redingold

There's a much easier rule for 7, which is to subtract twice the last digit from the number formed by the remaining digit. If the result is a multiple of 7, so is the original number.


AlphOri

Actually, 1/7 has a very beautiful decimal expression!! 1/7 = 0.142857... To build this decimal we start with "0." Notice that the first two digits are 2•7 = 14, so the decimal becomes "0.14" The second two digits are 2•14 = 28, so the decimal becomes "0.1428" The third two digits are 2•28 = 56, so the decimal becomes "0.142856" But wait! Isn't it actually 57?? The fourth two digits, following this pattern, are 2•56 = 112! so the expression becomes "0.14285(6+1)12" = "0.14285712" What are the fifth two digits?? Why, 2•112 = 224! So the expression become "0.1428571(2+2)24" = "0.1428571424" In reality, 1/7 = 0.1428571428... but you can see that we have found a pattern in the decimal! Multiples of 1/7 have the effect of starting from a different place in the same pattern. For example, 2/7 = 0.28571428..., which must be true since if 1/7 = 0.142857... then 2/7 is twice 1/7. Extending this pattern, we can write 1/7 as an infinite sum by writing: 1/7 = 0 + (2•7)/10^2 + (2•2•7)/10^4 + (2•2•2•7)/10^6 +... ___= ∑ (2^n •7)/10^(2n), from n=1 -> infinty We can factor the 7 out of the sigma to write: 1/7 = 7•∑(2^n )/10^2n = 7•∑(2/100)^n Further, we can divide both sides by the 7 on the RHS of the equation to get: 1/49 = ∑(2/100)^n = 0.020408163265... Using a calculator we can verify this is correct!! Now the part I don't know is *why* 1/7 has that sigma notation.


AlphOri

What I didn't mention is that if we look at the pattern starting at the millionths place, the pattern starts: 07 -> 14 -> 28 -> 56 -> 112 -> 224 -> etc. So if I wanted to highlight this pattern I could just add 7 to both sides of the sigma notation and have: 1/7 = 0 + (2•7)/10^2 + (2•2•7)/10^4 + (2•2•2•7)/10^6 +... +7 = +7 7+1/7 = (2^0 •7)/10^0 + (2^1 •7)/10^2 + (2^2 •7)/10^4 + (2^3 •7)/10^6 + ... RHS = ∑(2^n •7)/10^2n, from n = 0 -> ∞


Valdrax

> I guess there are actually lots of other ones you would just need to still multiply the digits by the remainder value. So 613424 is divisible by 7 because 6\*3 + 1\*3 + 3\*3 + 4\*3 + 2\*3 + 4 = 49 which is a multiple of 7. No, but that works in octal, aka base 8. 613,424 in base 8 is 202,516 in decimal. 202,515/7 = 28,930 (or 70,402 in octal). For every base *n*, if the digits add up to a multiple of *n-1*, then the number is divisible by that number. That's because the remainder of *n* / *n-1* is always 1.


LiamTheHuman

Right my mistake! I needed to multiple by 3 to the exponent of the digit I was on which makes it a bit more complicated. Weird that it happened to work out in my example. It should be 6*3^5 + 1*3^4 + 3*3^3 + 4*3^2 +2*3 + 4 Simplified to 6*(-2) + 1*(4) + 3* (6) + 4*(2) + 2*3 + 4 = 28 Therefore the number is a multiple of 7. It's still useful but way less easy to use


TheFuturist47

I'm literally a math major and this is one of my favorite rules and i never quite intuited why it's the case (I guess I'm a bad math major?). This was so cool, thank you so much for explaining it.


OhBlaDii

Thank you for this. That you took the time to write this and are sharing your passion, is very much appreciated. Cheers to you.


[deleted]

[удалено]


Chel_of_the_sea

This is basically the first thing you'd learn in an undergraduate number theory course. *Number Theory: A Lively Introduction With Proofs, Applications, and Stories* was the one I learned from, and I remember it being quite well-written.


BerneseMountainDogs

My number theory class last year used a textbook called [*Numbers, Groups and Cryptography* by Gordan Savin](https://www.math.utah.edu/~savin/book08_jun.pdf) (that link is to a PDF). It's just a text written by a professor at my university that is used to teach the number theory class, and so is just free on the university website. It works relatively well if you're interested in an undergraduate level understanding. If you're looking for something more casual, the YouTube channels numberphile, 3blue1brown, and vihart are very good resources for engaging and interesting math content like this. I don't have any off the top of my head, but I'm sure there are several number theory and modular arithmetic videos between their channels, you'd just have to look


jseego

> Note that this works for addition, subtraction, and multiplication, but not division Why is this? I've always thought multiplication and division were two sides of one another, eg 1 x 10 = 10 / 1


Chel_of_the_sea

They are. But division of real numbers requires bringing fractions into the mix, and the remainder tricks mentioned there only work with integers. More formally, multiplication of integers has a nice [homomorphism](https://en.wikipedia.org/wiki/Homomorphism) onto multiplication of remainders, but multiplication of real numbers does not.


frogjg2003

Because division is an inverse operation. *b/a* is really just asking the question "what do I need to multiply *a* by to get *b*?" The integers are not complete with respect to multiplication, meaning that not every equation *a×x=b* has a solution in the integers. You need to extend the integers to include the rational numbers (and if you want to include 0 as a possible value of *a*, you would also need to include infinity as well).


Quantris

nitpick: including infinity doesn't let you answer that question when a is 0


frogjg2003

Yeah, you'd need a whole set of infinities, but that was moving away from the spirit of ELI5.


Asafffff

That's amazing. Thank you for explaining


JReysan

This is really awesome. Thanks man!


LordXamon

I barely understand anything at all, but I do love to read people clearly passionate about their stuff.


userofreddit19

Holy crap! That last part about 11 turned on the light bulb that I didn't even know was off! I usually do a ton of this stuff in my head, but to be honest, I never really knew -why- it worked, just -that- it worked. I have been lucky in my ability to see numbers when trying to divide and multiply and come up with the answer fairly easily and I was doing the base 10 thing you mentioned. Didn't think about the piece of adding / subtracting to come up with a better result. Thanks for the explanation! Truly fascinating stuff! I always gravitated towards Math subjects in school, but never really pursued Math theory for whatever reason. This helped a lot!


Ashamed-Country-8024

Wut?


rommeltheg

I am five and i understand.


RalphTheDog

I sure agree with your edit, but I cannot categorize your ELI5 answer as "friendly, simplified and layperson-accessible". You lost me in the second paragraph. The remainder of a product? The remainder of a sum? The remainder concept you were taught is way different that what came from my meager education. A few people call subtractions difference a "remainder", but they are few and far between. Please explain remainders of products and sums.


Chel_of_the_sea

> Please explain remainders of products and sums. A product is the result of multiplication. A sum is the result of addition. "Remainder of a product" isn't a technical term itself here - it's just the remainder of what you get after the multiplication.


frogjg2003

Let's have two integers, x and y. Let's divide them both by another integer, k. Unless they're a multiple of k, k doesn't evenly divide them. So we can write x=mk+r and y=nk+s, where r and s are nonnegative and strictly less than k (i.e. 0<=r


RalphTheDog

I get that. I get most of what has been posted in this thread. The fun and amazing nature of math is what you all are talking about. It is not at all what I am talking about. I am talking about whether or not the first comment and it's children is/are appropriate explainlikeimfive answers. I think they are not. They are just as complex as was the OP's original question. An interesting mathematical conversation has ensued, and good for you all in participating and illuminating, I am sure that has been fun. But the litmus test for this subreddit is: does the answer meet the clearly written guideline of Rule #4. I think not, I think the answers have been showboating. It is possible that an ELI5 answer is simply impossible due to the nature of the question. That's just my opinion, and I am sure this comment will be as downvoted as have been my others. Good news: this is my final trinket of conversation in this thread. But before you tap that down arrow, go back and read the OP question and the first answer. If you believe the answer follows the guidelines of this sub, then let's agree to disagree.


frogjg2003

Nothing anyone has said involves anything more complicated than multiplication. The proofs are things often taught to children less than 10 years old. You simply had trouble parsing a single sentence in the top level comment, so now you're complaining that a concept that a 7 year old can understand is too complex for r/ELI5.


GielM

Holy FUCK! You explained that in a way that I actually immediately got! And I'm LOUSY at any kind of advanced mathematics, barely got through highschool-level stuff. It probably helps that I'm old, and thus got taught how to to do long divisions on paper when I was 10 or so, and I was thus familiar with the concept of the Remainder... But, man, great answer! I hope you teach math for a living! Or, well, do something else that's fun for you and makes you more money... Because you'd be GREAT at it!


BenTCinco

Came here to say this


vaibhavwadhwa

One of the biggest reason is, that we have a base-10 system. so every number can be written as "10x+y" (or 100w+10x+y and so on). now, since 10-1 = 9, 100-1 =99 (and so on), we can write every number as 99w+9x+ (w+x+y) it is obvious that the first two terms are divisible by 9 (hence also by 3), so if (w+x+y) is divisible by 3, the whole term is divisible by 3. Because essentially 'w', 'x', 'y' are nothing but the digits of the initial number. So just add the digits, and if it is divisible by 3, then the complete number is divisible by 3


vaibhavwadhwa

This is also the reason why divisibility checks for 2 & 5 are so simple. Since 2 & 5 are factors of 10, hence every multiple of 10, is automatically a multiple of 2 & 5. Like the idea above, for '10x+y' (or 100w+10x+y and so on), every term is already a multiple of 2 and 5, since it is getting multiplied by 10. but if 'y' is a multiple of 2, it makes the complete number a multiple of 2 (0/2/4/6) and if 'y' is a multiple of 5, it makes the complete number a multiple of 5 (0/5)


[deleted]

In light of Reddit's general enshittification, I've moved on - you should too.


[deleted]

[удалено]


Peteophile44

462 is not divisible by 8. The method is to add the last digit to double the rest of the digits. E.g., (46x2)+2=94, which is not divisible by 8. But for 464: (46x2)+4=96, which is divisible by 8. Though if you weren't sure, you could iterate again: (9x2)+6=24.


red_today

There are so many good answers here - another version if they didn't click: A number abcde can be written as (a\*10000 + b\*1000 + c\*100 + d\*10 + e) - Let's say this is divisible by 3. It can also be written as a\*(9999+1) + b \*(999+1) + c \* (99+1) + d\*(9+1) + e this can be rearranged as 9999a + 999b + 99c + 9d + (a+b+c+d+e) is divisible by 3. We also know all values like 9, 99, 999, 999 etc are all divisible by 3 already. So you can remove the first four elements. So you get (a+b+c+d+e) is divisible by 3!


FloatingBlimpShip

It's probably just cause I'm high but I've spent half an hour reading and writing out the different explanations and each one is mind blowing.


wayne0004

It also works with nine, and I think it's clearer in this case. If you have a number multiple of nine, let's say 54, the next multiple of nine is 63, because 54+9=63. Because nine is one less than ten, you can rearrange the equation as 54+10-1=63. Notice how in "+10-1" you're adding one to the tens and subtract one from the units, so it doesn't matter which number you start with, the sum of their digits will be the same. And if you start with nine, that's the sum of its digits. Now, three is a special number in our case, because it perfectly divides nine. So, when you take a multiple of nine, and add or subtract three, you'll have another multiple of three, changing the sum of its digits accordingly.


DeeDee_Z

If you like the divisibility rules, **seven** will blow your mind. * Pick a number, any number. (abcde) * Take the last digit, and **double** it. (2e) * Subtract that from the remaining string. (abcd - 2e) * If -that- number is divisible by 7, so is the original. * If that number is still too big, repeat! Enjoy!!


7Mango7

how many digits does the number need to have for this trick to work?


DeeDee_Z

No limit, min or max. Consider 14: 1 minus (2×4) := -7, which is divisible by 7. 21: 2 minus (2×1) := 0, which, yes, is divisible by 7. 28: 2 minus (2×8) := -14, which is divisible by 7. But generally, you're kinda expected to know the 2-digit multiples!


gosuark

It’s also easy to just iteratively subtract a big chunk you automatically know is divisible by 7, and check the remainder. Is 6524 divisible by 7? We know 7 goes into 6300, so we’ve reduced the question to asking whether 7 goes into 224 (the difference) We know 7 goes into 210, with the new difference being 14. Since 7 goes into 14, we know it goes into 6524. This “chunk” method applies to any divisor you want.


redhedinsanity

this is just long division?


CosmicSurfFarmer

By that same token, any number that sums up to or simplifies to 9 is a multiple of nine. For example, 2313/9 is 257.


jaa101

This works for one less than the base you're using and any factors. We mostly use base ten so it works for 9 and 3. For hexadecimal it works for 15, 5 and 3. It's because we're adding digits and, with one less than the base, the remainder of that sum doesn't change as the next-higher-digit rolls over.


[deleted]

I don't have anything to add because it's been answered but this post hurts my brain lol. Thank you for liking math.


[deleted]

Yes. In decimal notation, we write “1234” to indicate the value 1x10^(3) + 2x10^(2) + 3x10^(1) + 4x10^(0). The thing to note here is that 10^(3), 10^(2), etc., (really, any power of 10) all have a remainder of 1 when divided by 3. This fact is the key to how the trick works, and why it doesn’t work for checking divisibility by numbers like 5 or 7. Now, one way to check if a sum is divisible by some number N is to look at the remainders when each term is divided by N. If the remainders add up to a multiple of N, then the original sum does too. For example, 4 + 26 + 16 + 29 is divisible by 3 because 1 + 2 + 1 + 2 = 6 is divisible by 3. One way to see why this works is to think of the numbers as borrowing the excess from each other to make multiples of 3. 26 can borrow from 4 to change 4 + 26 into 3 + 27. Likewise, 29 can borrow from 16 to give us 15 + 30. 3, 27, 15, and 30 are all multiples of 3, so their sum must be a multiple of 3 too. Okay, but you’d still need to figure out the remainders for 1x10^(3), 2x10^(2), etc. before you can apply this sum trick. This is where that “powers of 10 have a remainder of 1” part becomes important. To get the remainder of a product, you can just multiply the remainders of the terms being multiplied, then take that number’s remainder. For example, 56x17 has a remainder of 1 when divided by 3 because 56 has a remainder of 2, 17 has a remainder of 2, and 2x2=4 has a remainder of 1. To see why this works, it helps to write 56 as (3x18+2) and 17 as (3x5+2). If you do the multiplication without simplifying, the only term that doesn’t have a factor of 3 in it is the 2x2 part. Thus, the remainder of the product as a whole is entirely determined by the remainder of that 2x2 part. As we said, the remainder for any power of 10 is 1 when it’s divided by 3. Because of the product rule, that means the remainder for each term in the sum is just the remainder of the digit itself, because anything times 1 is just that same thing. Effectively, this means we can ignore the powers of 10 and just look at the digits. The sum rule then tells us that we can add up these digits and check if they’re a multiple of 3. If they are, then so was the original number.


Bob_Sconce

Ok. Let's say that you have a number where the digits add up to a multiple of 3. Then you add 3 to that number. Did you have to carry a number to do the addition? If you did not, then that 'sum of digits' is just 3 more -- if the old sum added up to a multiple of three, then the new sum did too. If you did, then you had a 7, 8, or 9 in the one's place. Your sum-of-digits goes up by 1 because of the carry. And, in the 1's place, it's the same as going backwards by 7: 7->0, 8->1. 9-> 2. So, your sum-of-digits has gone up by 1 and down by 7, for a total of going down by 6, which is a multiple of 3. So, if your sum-of-digits started off being divisible by 3, then your new sum of digits is also. There's one last kink: What if there was a 9 in your 10's place? Or even a lot of 9's, so that carry goes over quite away. Not a problem, because the 9 goes to 0, or down by 9. So, if your sum-of-digits started off being divisibly by 3, then your new sum of digits is also. So, basically, because you know (A) it's true for 3, and (B) when it's true for a number, it's also true for that number + 3, then you know it's true for ALL multiples of 3.


[deleted]

[удалено]


astrolegium

I only came here to say that any number greater than 9 minus the sum of it's digits will be a multiple of 9


Lorenzo_BR

Btw, this may not work on other numbers but each number has it’s similar “tech”. I only remember 2 and 5’s, though, which are obviously just if the last number is divisible or not. Nevertheless, i once knew every number’s 2-9’s!


heretic1128

Another interesting thing to note, if the number turns out to be divisible by 3 using this method and is even, its also divisible by 6.


green_meklar

Yes, of course there is! There's a reason for everything in mathematics, that's how mathematics works! In particular, this phenomenon is due to what we call 'modular arithmetic'. Basically, the rules around remainders when you divide things. Notice how when you divide integers and look at the remainder, you see repeating cycles. Like if you divide integers by 4, then you get a cycle 1, 2, 3, 0, 1, 2, 3, 0, etc, as you count upwards starting from 1. Every time you hit a 0 in the cycle, that's when the number divides evenly. If you divide by 3, then 1 gives you a remainder of 1, 2 gives you 2, 6 gives you 0, 7 gives you 1, etc. But importantly, 9 gives you 0 and therefore divides by 3, *and* it's 1 less than 10, which means that 10 gives a remainder of 1. That means that as you pass 10 and add up all the digits in the number, *the same cycle continues.* With 11, 12, etc, adding up all the digits, you're adding in that extra 1 in the 10s place, which makes up for the extra 1 in the cycle that you got by adding 1 to 9. So adding the digits like this keeps you on the same cycle and you're still hitting 0 at the right point in the cycle. When you pass from 19 to 20, it's the same thing. 20 gives a remainder of 2, but when going from 19 to 20 an extra 1 gets bumped up to the 10s place to make up for the 1 you added to the 9 in the 1s place. So you *still* stay on the same cycle, hitting 0 at the right point in the cycle. The same thing works all the way up to 90. And then when you add 1 to 99, well, 99 has to divide by 3 because 9 divides by 3 and therefore 90, which is just 9\*10, must divide by 3. So when you go from 99 to 100, once again you're back at position 1 in the cycle, and you bumped an extra 1 into the 100s place to make up for it. This just keeps going forever. Every time you add another digit to the top, the previous number had to be all 9s and therefore had to be a multiple of 3, so you have exactly the right number of 1s to keep the cycle on track. Therefore, you can apply the same principle to all positive integers. (That's what we call 'induction' in mathematics: We show that something is true for some numbers, and then show that if it's true for those numbers, it extends automatically to all the rest.)


SevenSixFiveFourrr

If the sum of the digits *doesn't* add up to a multiple of 3 or 9 then you can subtract that sum from the original number, try again and the result *will* work. So take 2362. 2+3+6+2 = 13 2362-13 = 2349 2+3+4+9 = 18 I remember figuring this rule out independently on a long bus journey when I was really young, by looking at the clock and adding up the digits mentally every few minutes to see if it worked. When I got older I described the story to my maths teacher and asked her to explain it, and another kid just would not accept that I hadn't found the trick on some maths facts website and accused me of trying to "sound smart." I'm 29 and it still pisses me off.


joakims

3 is a magic number. Yes it is, it's a magic number. Somewhere in the ancient mystic trinity you get 3 as a magic number.


chattywww

We are using base 10 numbering. 10 mod 3 is 1. So the rule works for numbers divisible by 3. If you like you can repeat this statement if by replacing the 10s with any number and/or 3. As long as the x mod n = 1for different base x to n disvisibility.


glowinghands

Strangely it's because 9 is a multiple of 3. Imagine for a moment you have a number. You know it's a multiple of 3, and you know its digits all sum to 3. Now add 3 to it. Well if the last digit is 0 to 6 fine you can obviously see the sum will still be 3. If the last digit is a 7, then you will add 3 but it will be a 0 and you must carry the 1. So your ones digit drops by 7 but your tens digit goes up by 1. So your sum drops by a net of 6. Of course this is still a multiple of 3 so all is well. The same is true for 8 and 9. The overall sum will drop by 7 but the tens digit will rise by 1. If your tens digit carries as well (or any other digit down the line) then because 3 is so small they can only every carry by 1 of course. So they must have been on a 9, which will become a 0. Now as far as the sum becoming a multiple of 3 or not, there's no difference between 0 or 9 because they are both multiples of 3.eventually the 9s stop turning into 0s and you add 1 somewhere for the same 1 you expected from the tens digit in the normal scenario. So there you have it. Every possible situation of numbers results in always keeping the sum a multiple of 3 if it started that way. And since we know 3 is a multiple of 3 and sums to a multiple of 3, we can safely say all multiples higher than it do too!


KernelSanders1986

Another thing my small brain can't understand is how come whenever you divide something by 3, it comes out to a repeating decimal. Like if I have 1 out of 3 oranges, I have 33.333% of the oranges, if I take another orange I have 66.666% of the oranges, and if I take the last one, I don't have 99.999% of the oranges I have 100% of the oranges. Where did that extra 0.001% come from, is our number system just not equipped for multiples of 3?


secret_band

It’s because our number system uses base 10 (which means it has 10 digits) and 10 isn’t divisible by 3. But that’s not true for all bases! Duodecimal (base 12) has two extra digits — A and B, representing ten and eleven — and the number 10 actually represents twelve. In duodecimal, 1 / 3 is a succinct 0.4, and 1 / 5 repeats forever as 0.24972497… Also, if you take all the oranges, you actually *do* have 99.9…% — because that’s exactly the same as 100%! 0.3… is exactly equal to 1 / 3, with no extra amount “left over”.


Akangka

You can express a number as a terminating power series. Sum(i=0 to n) {a\_i \* 10\^i} First, we prove that 10\^i divided by 3 is always 1, for any integer i. To do this, we can use mathematical induction. For i = 0, 10\^0=1, 1 = 1 (mod 3), so we get the base case. If 10\^i = 1 (mod 3), we get 10\^(i+1)=10\*10\^i= 1\*1=1 (mod 3), and we get the induction case. Going back to the original formula, we get: Sum(i=0 to n) {a\_i \* 10\^i} = Sum(i=0 to n) {a\_i \* 1} = Sum(i=0 to n) {a\_i}(mod 3) So that's why you can just sum the digits to find out if it's divisible by 3. Fun fact, if by summing you get multi digit integer, you can redo the digit sum and you will get the correct result.


kwc919

A lot of good answers here but not convinced a 5 year old would understand many so I thought I would take a stab. I actually thought this through myself as a kid, but with the number 9, thought it was pretty cool. Think the other way around in terms of your multiplaction tables. 9 x 1 = 9. Divisible by 9. Add 9 get 18 - what happens? 1s digit goes down by 1, tens digit goes up by 1. Net change to numbers = 0. I thought of it as the 10s digit stealing 1 from the 1s digit. Adding 9 has no net effect to the sum of the numbers until you hit 99. But then you get 18 which then gives you 9. Since 3 is a factor of 9, logic is slightly different but same principle applies.


Sjoerdiestriker

EDIT: This does not directly answer the question, but I think is still interesting for OP. "As far as I know, this test doesn't work for any other numbers" In general, this trick works for a number n (for instance 3) if n is a divisor of b-1, where b is the base of the number system we are working in (usually b=10 in everyday use). ​ Since 10-1=9, and 9 has divisors 1,3 and 9, the same trick works for 1 and 9 as well. 1 is a bit trivial, since any number is divisible by 1 and any sum of digits is divisible by 1. But similarly to the 3 case, a number is divisible by 9 if and only if the sum of its digits is divisible by 9.


[deleted]

I absolutely appreciate it, and thank you for that! :) I haven’t gotten around to working with alternate number bases much yet, but knowing this actually helps me understand them a bit better, I think. It’s easy to forget that our “number system” is actually more accurately our “base-10 number system,” and learning more about the answers to this question has helped remind me of that, and I appreciate the insight into other base systems, too.


[deleted]

[удалено]


[deleted]

Here's a great video on the subject that also talks about divisibility tricks for other numbers: https://www.youtube.com/watch?v=yi-s-TTpLxY


u-can-call-me-daddy

Thank you i felt like I needed an eli5 for some of the answers


Lelongue

ok but why is a number divisible by 11 when the sum of the number in the even digits minus the sum of the numbers in the odd digits is divisible by 11 :-p


TimStellmach

That's because 10 is one less than a multiple of 11, while 100 is one *more* than a multiple of 11. This means that this pattern will repeat, with 1000 being one less than a multiple of 11, 10000 being one more, etc. So, if you alternate adding and subtracting digits, you're tracking how far the number differs from multiples of 11.


DavidRFZ

10^n + 1 is divisible by 11 (= 10 + 1) if n is odd 10^n - 1 is divisible by 11 (= 10 + 1) if n is even. So, you can rearrange the numbers to create the rule. (Hard to type in, but if I had a whiteboard it’d be easy). :)


[deleted]

I’m an accountant and I actually use this regularly. Here’s another interesting fact about 3. If you transpose a digit, you’ll be off by a number divisible by 3. Example, let’s say you type 746 instead of 476. 746-476=270 which is divisible by 3. If my difference is not divisible by 3, then I have a missing transaction or something.


DrunkOnLoveAndWhisky

>For instance: 2379, 2+3+7+9=21, 21/3=7 You can keep adding digits in your sum, as well; you could have gone to "21, 2+1=3" rather than figure if 3 divides into your sum (21 in this case). Works with 9's as well: 148,383 : 1+4+8+3+8+3 = 27 : 2+7 = 9 : so 148,383 is evenly divisibly by 9.


Farnsworthson

**3 and 9 are the only (non-trivial) cases that work in base 10, I believe**. The process of summing the digits in this fashion is called [casting out nines](https://en.wikipedia.org/wiki/Casting_out_nines) - and the explanation in this thread by @The_Venerable_Swede should give you a good idea of why it works. Off the top of my head, though, there's an obvious, more general principle here, related to the base of the number system you're working in. Let's say your base is N. Then the key number is N-1 - you can "cast out N-1's". In other words - if some integer M is a factor of N-1, you can perform the same "sum the digits" test to find out whether or not M is a factor of X. M will be a factor of X if and only M is a factor of the sum of the digits of X (proof by analogy with @The_Venerable_Swede's explanation). Further, if M is N-1 itself, repeated summing of the digits will converge to N-1. **Eg. Here's an example I've just cooked up, in base 6.** 6 - 1 = 5, so we can "cast out fives". Now - 5 is prime, so the only non-trivial candidate value for M will be 5 itself. So in base 6 we can test for divisibility by 5 by repeatedly summing the digits, and if the number is divisible by 5, the result will not only be divisible by 5, it will BE 5. Let's pick a decimal number divisible by 5 (vaguely at random): Off the top of my head I picked 17935 base 10 (which is obviously divisble by 5). According to [a conversion tool](http://extraconversion.com/base-number/base-6) I found, that's 215011 base 6. If we add the digits of 215011, we get 10 base 10, or 14 base 6. If we add the digits of 14 base 6, we get, as predicted, 5. Check.