Straight Dope Message Board > Main Why does this division by 3 test work?
 Register FAQ Calendar Mark Forums Read

#1
07-27-2004, 02:01 PM
 Roadfood Guest Join Date: Jun 1999
Why does this division by 3 test work?

Many years ago, I learned an easy way to determine if a number (integer) is evenly divisible by 3: Just add up the digits and if the result is divisible by 3, so is the original number. For example, 12: 1 + 2 = 3, so 12 is evenly divisible by 3; 257: 2 + 5 + 7 = 14, then 1 + 4 = 5, so 257 is not evenly divisible by 3; but 255: 2 + 5 + 5 = 12 which is divisible by 3, so 255 is divisible by 3. The last two examples also point out that you can either stop after adding the digits of the original number or continue recursively until you get a single digit.

My question is, why does that work? And the related question: why doesn't it work for any other number? For example, 12 is evenly divisible by 2, but 1 + 2 = 3, which is not evenly divisible by 2. 12 is also evenly divisible by 4, but 3 is not. 25 is evenly divisible by 5, but 2 + 5 = 7, which is not. 36 is evenly divisible by 6, but 3 + 6 = 9, which is not. Etc.

So what's so special about the number 3 that this works only for that one number?
#2
07-27-2004, 02:25 PM
 Ximenean Guest Join Date: Aug 2001
It works because 10, the base number, has a remainder of 1 when you divide it by 3. Since 10 has a remainder of 1, n x 10, or n x 102, or n multiplied by any power of 10, has a remainder equal to n. Any number expressed in base 10 consists of multiples of powers of 10 -- 672, for example, is 6 x 102 + 7 x 101 + 2 x 100. So the remainder of 672 when divided by 3 is just 6 + 7 + 2 = 15, but 15 is also divisible by 3 so the remainder is effectively 0. I.e. 672 is divisible by 3.
#3
07-27-2004, 02:26 PM
 FlippyFly Guest Join Date: Jul 2004
Seems to me that it might be a quirk of the base ten number system... something to do with the fact that after nine, you go to the next digit... does it work for nine as well?

9
1+8=9
2+7=9
3+6=9
....
8+1=9
9+0=9
9+9=18=1+8=9
#4
07-27-2004, 02:35 PM
 sciguy Guest Join Date: Jan 2003
Quote:
 Originally Posted by Roadfood So what's so special about the number 3 that this works only for that one number?
The same trick also works for 9. I.e. 270549: 2 + 7 + 0 + 5 + 4 + 9 = 27, which is divisible by 9, therefore 270549 is divisible by 9. And for the same reason 3 works: 9 divided into 10x leaves a remainder of one, the rest is identical to what Usram laid out.
#5
07-27-2004, 02:39 PM
 sciguy Guest Join Date: Jan 2003
Oh, and for more divisibility rules than you can shake a stick at, try starting here:

http://mathforum.org/k12/mathtips/division.tips.html
#6
07-27-2004, 04:03 PM
 ultrafilter Guest Join Date: May 2001
In base n, this sort of divisibility test works for any number that divides n - 1.
#7
07-27-2004, 04:42 PM
 Chronos Charter Member Join Date: Jan 2000 Location: The Land of Cleves Posts: 50,804
Quote:
 In base n, this sort of divisibility test works for any number that divides n - 1.
So, let's see... Let's take the number 10011011000101101. The sum of the digits is 1001, and the sum of the digits of 1001 is 10, and the sum of the digits of 10 is 1, which is a multiple of 1. And sure enough, 10011011000101101 is a multiple of 1, too! Wow, it really works!
__________________
Time travels in divers paces with divers persons.
--As You Like It, III:ii:328
#8
07-27-2004, 05:46 PM
 Roadfood Guest Join Date: Jun 1999
Thanks to all. The key to my getting a conceptual understanding of this was to experimentally confirm that it works for 7 in base 8. 14 in octal is 16, 1 + 6 = 7. And it also helped to notice along the way how I went about manually converting from base 10 to base 8.
#9
07-27-2004, 07:57 PM
 Thudlow Boink Charter Member Join Date: May 2000 Location: Springfield, IL Posts: 16,673
#10
07-27-2004, 08:06 PM
 Bryan Ekers Guest Join Date: Nov 2000
Similarly, 121 is a perfect square in any base (well, except binary for obvious reasons) because it represents:

x2 + 2x + 1

which factors to

(x+1)2

Ditto for 1331 being a cube, 14641 being a "fourth" power, etc.

You can all kinds of fun stuff with bases, including proving Hallowe'en and Christmas are the same holiday.
#11
07-27-2004, 08:16 PM
 Northern Piper Charter Member Join Date: Jun 1999 Location: The Glitter Palace Posts: 15,770
Quote:
 Originally Posted by Bryan Ekers You can all kinds of fun stuff with bases, including proving Hallowe'en and Christmas are the same holiday.
Which was the key to one of the Good Doctor's Black Widowers stories.
#12
07-27-2004, 08:33 PM
 Bryan Ekers Guest Join Date: Nov 2000
Quote:
 Originally Posted by Northern Piper Which was the key to one of the Good Doctor's Black Widowers stories.
I must've missed that one.
#13
07-27-2004, 09:36 PM
 mnemosyne Charter Member Join Date: Feb 2000 Location: Montréal, Québec Posts: 8,763
SPOILER:
DEC 25 = OCT 31

A teacher asked me this once
#14
07-27-2004, 11:15 PM
 Northern Piper Charter Member Join Date: Jun 1999 Location: The Glitter Palace Posts: 15,770
Quote:
 Originally Posted by Bryan Ekers I must've missed that one.
SPOILER:

 Bookmarks

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Main     About This Message Board     Comments on Cecil's Columns/Staff Reports     Straight Dope Chicago     General Questions     Great Debates     Elections     Cafe Society     The Game Room     In My Humble Opinion (IMHO)     Mundane Pointless Stuff I Must Share (MPSIMS)     Marketplace     The BBQ Pit Side Conversations     The Barn House

All times are GMT -5. The time now is 09:37 AM.