Results 1 to 9 of 9

Math Help - Prime Test

  1. #1
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024

    Prime Test

    I have a question for you guys.

    I've attached an excel document with "Quick's Prime Test"

    The question is, how often (excluding 2, 3, and 5) does it mess up?

    If you can't read excel then I'll put tell you how it works...
    Attached Files Attached Files
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by Quick View Post

    If you can't read excel then I'll put tell you how it works...
    I cannot read it.

    First, you should call it,
    "Quick's Primality Algorithm" it sounds way cooler.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by ThePerfectHacker View Post
    I cannot read it.

    First, you should call it,
    "Quick's Primality Algorithm" it sounds way cooler.
    Alright

    Anyway "Quick's Primality Algorithm" works in 6 steps ( n is the # being tested).

    1. is n\div 11 a whole #? (if yes, it's not prime. If no, go on)

    2. is n\div 5 a whole #? (if yes, it's not prime. If no, go on)

    3. is (n-1)\div 4 a whole #? (if yes, go to step 5. If no, go to step 4)

    4. is (n-3)\div 4 a whole #? (if yes, go to step 5. If no, it's not prime)

    5. is (n-1)\div 6 a whole #? (if yes, it's prime. If no, go to step 6)

    6. is (n-5)\div 6 a whole #? (if yes, it's prime. If no, it's not prime)
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    I'm actually more interested to see if there is even a way to find out the ratio between actual primes and pseudoprimes for this test...
    Follow Math Help Forum on Facebook and Google+

  5. #5
    is up to his old tricks again! Jhevon's Avatar
    Joined
    Feb 2007
    From
    New York, USA
    Posts
    11,663
    Thanks
    3
    Quote Originally Posted by Quick View Post
    I'm actually more interested to see if there is even a way to find out the ratio between actual primes and pseudoprimes for this test...
    How did you develop this algorithm? as for your current signature, "Quick's Property: \frac{n^2}{n-1}\div n=\frac{n^2}{n-1}-n" what's that about? does it also have to do with primes?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by Jhevon View Post
    How did you develop this algorithm? as for your current signature, "Quick's Property: \frac{n^2}{n-1}\div n=\frac{n^2}{n-1}-n" what's that about? does it also have to do with primes?
    I am the one who told him it does not work for 0 nor 1.

    No, the signature is his own invention that he finds amusing that division gives the same result as subtraction.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    South Africa
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by ThePerfectHacker View Post
    I am the one who told him it does not work for 0 nor 1.
    He should just put a semi-colon between the 0 and the 1. It looks like 0,1 at the moment.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by janvdl View Post
    He should just put a semi-colon between the 0 and the 1. It looks like 0,1 at the moment.
    The comma is the correct punctuation mark (not only that but in the US and
    UK at least "." is the decimal point not "," so to our minds there is no
    confusion.

    RonL
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    South Africa
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by CaptainBlack View Post
    The comma is the correct punctuation mark (not only that but in the US and
    UK at least "." is the decimal point not "," so to our minds there is no
    confusion.

    RonL
    But South Africa adopted the British system many years ago.
    And we use commas...
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: October 22nd 2011, 12:37 PM
  2. Prime testing with base 2 test.
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: March 10th 2011, 01:47 PM
  3. prime number test
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: December 29th 2009, 12:52 AM
  4. Replies: 1
    Last Post: September 14th 2009, 11:18 PM
  5. Replies: 8
    Last Post: April 4th 2009, 07:29 AM

Search Tags


/mathhelpforum @mathhelpforum