Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Science, Math, and Philosophy
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 03-31-2007, 05:30 AM
wooly_chicken wooly_chicken is offline
Senior Member
 
Join Date: Jun 2005
Location: Chicago, IL
Posts: 461
Default Re: simpler way to find if a number is prime? random inquiry

[ QUOTE ]
There are a few tricks to see if numbers are divisible by other numbers

all even numbers are out as stated earlier

numbers divisible by three you can add all digits in a number ie 213 is 2+1+3=6....if the sum is divisible by 3 then the full number is divisible by 3.

4 is even so it doest matter...but if the last two digits are divisible by 4, then the entire number is divisible by 4.

5 Obviously all numbers ending in 5 or 0 are div by 5

6 and 8 again both even

9 works the same as 3

That just leaves 7 to screw things up.

[/ QUOTE ]

Multiply the last digit of a number by five and add what you get to the remaining digits. What you get is divisible by 7 iff what you started with was. For example:

1547 is divisible by 7 iff 154+35=189 is divisible by 7 iff 18+5*9=63 is divisible by 7 iff 6+5*3=21 is divisible by 7 iff 2+5*1=7 is divisible by 7.

You can come up with similar tests for any number (the key idea for 7 is that 5 is the multiplicative inverse of 10 in $\Z/7\Z$), but they don't seem particularly useful to me.

EDIT: I suppose it would be easier to use -2 instead of 5.
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.