A number is divisible by three (3) if it divides evenly without any fraction or remainder. 21 is divisible by 3 because it divides evenly into 3 times 7.

22 is not divisible by 3 because you can get three 7′s (7 + 7 + 7 = 21) and come up short of the 22.

22 divided by 3 is 7 and remainder 1, or 7 and 1/3rd (one third).

So is 151515151515151515 divisible by 3? I can quickly tell you **yes**. The trick is to add up all the individual digits and check if that is divisible by 3. If it is, then the original number is also divisible by 3. So in this case, 1 + 5 = 6 is divisible by 3. Every time I tack another “15″ onto the number, I am adding 6 to the digit total, and that will always be divisible by 3. So any number made up of digits “1″ and “5″ in equal quantity will be divisible by 3.

So again, add up all the digits: 1 + 5 + 1 + 5 + 1 + 5 + 1 + 5 + 1 + 5 + 1 + 5 + 1 + 5 + 1 + 5 + 1 + 5 = 54 which is divisible by 3, so the large number 151515151515151515 is divisible by 3. But you can do this one more stage, 54 is digits “5″ and “4″. 5 + 4 = 9 which is divisible by 3, so again the large eighteen digit number is divisible by 3.

Let’s make up another number: 123456789

Add up all the digits: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 54

5 + 4 = 9

9 is divisible by 3, so 123456789 is also divisible by 3.

So now you know the trick. Add the digits and get a total. If the total is more than one digit, add those digits together and get a total. Keep doing this until you have a single digit. If that digit is divisible by 3 (a 3, a 6, or a 9), then the starting number is also divisible by 3.

Why does this work? We are working in base 10, which means each digit represents the number of factors of 10 in the number. A three digit number is 100′s column, 10′s column, and 1′s column.

678 is 6 times 100 + 7 times 10 + 8 times 1.

100 is 99 + 1.

99 is divisible by 3.

10 is 9 + 1.

9 is divisible by 3.

10000000000000000000 is

9999999999999999999 + 1

9999999999999999999 is divisible by 3.

Every digit is for a column number divisible by 3 with a remainder of 1. A 2 in a column is then two of these. Some number divisible by 3 plus the same number divisible by 3 plus 1 plus 1. That becomes a number divisible by 3 with a remainder of 2. If you try this with other digits, you notice the digit is the number of extra 1′s we have when divided by 3.

Once you get three extra 1′s, then instead of remainder 3, you once again have a number divisible by 3.

21 divided by 3 is a remainder of 2 plus a remainder of 1.

2 * (9 +1) plus 1 * (0 +1) = 18 + 2 plus 0 + 1

2 + 1 = 3 and is divisible by 3, so 21 is divisible by 3.

For bonus points. How can you quickly tell if a number is divisible by 9?

If you add up all the digits, and that number is divisible by 9. Again, you can keep adding up the digits in the total until you have a single digit.

Why does this work? For the same logic that worked for 3.

10000000000000000000 is

9999999999999999999 + 1

9999999999999999999 is divisible by 9. So you are still dealing with a remainder of 1 for each digit.