Determining prime numbers

Discussion in 'OT Technology' started by [DWI], Sep 30, 2003.

  1. [DWI]

    [DWI] Master of Nothing

    Joined:
    Aug 6, 2000
    Messages:
    21,936
    Likes Received:
    0
    Location:
    Maine
    What's the easiest way to do this?
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I've tried drawing them out of a hat but the odds decrease as the numbers go higher. Then I tried sitting a monkey down to a typewriter - sure I got one of them to write "In the beginning" but I mean that didn't help at all with my prime project. Then I went to the hardware store and asked for some prime numbers and the guy just gave a bunch of digits that were primed ready for paint. I asked my butcher about it but all he wanted to sell me was prime rib. While I was in the mall, I wandered over to the bank and they said they give me half a percent over prime and I figured I was finally on to something but I ended up with a lot of paperwork to fill out. Finally I ended up writing to leader of my country but well, he's retiring in February so I just gave up.
     
  3. Mugatu

    Mugatu Ask me about market research. OT Supporter

    Joined:
    Oct 21, 2001
    Messages:
    245,192
    Likes Received:
    0
    use a lookup table - determining prime number takes a lot of work once you get above trivial numbers
     
  4. Rick

    Rick New Member

    Joined:
    Feb 20, 2002
    Messages:
    1,735
    Likes Received:
    0
    Location:
    Henderson, NV
    :rofl:
     
  5. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    I have an algorithm for it here somewhere... Something to do with square roots and six or something like that, maybe I'll try to find it later. Hey, this could be an article in the possible newsletter :cool:
     
  6. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    or a project to find the most efficent way to figure out prime numbers
     
  7. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,236
    Likes Received:
    527
    Well, all primes > 3 have to be of the form 6n+1 or 6n-1. But unfortunately there's no good way to generate all of them reliably except checking all possible divisors. :dunno:
     
  8. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Well that's where it comes in handy to keep track of the ones you've already found ;). LCD's are all primes remember.
     
  9. agent0068

    agent0068 OT Supporter

    Joined:
    Jun 28, 2002
    Messages:
    39,833
    Likes Received:
    0
    something about the sieve of erasthenes if i remember correctly? and something about 2^n-1 maybe? :dunno: I should be studying right now...
     

Share This Page