Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Large Twin Primes

  1. Nov 13, 2004 #1

    Zurtex

    User Avatar
    Science Advisor
    Homework Helper

    Hi hi, I've been messing about with primes for the last couple of weeks now to try and generate very strong primes for my RSA project. I've made an algorithm which generates a 100 digit prime within about 3 seconds. For my own amusement I thought I'd add a little check to see if any prime I found was also a twin prime. Well I've now successfully found a 100 digit twin prime, I'm wondering is there anywhere I can submit this and would it be worth it? Surely not all 100 digit twin primes have been found.
     
  2. jcsd
  3. Nov 13, 2004 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    How can one have *a* twin prime?

    Anyway, dunno how complete lists of twin primes are, but Wolfram has a link to a table of known twin primes of more than 2000 digits, so 100 doesn't seem very big in this context. The links through wolfram's twin prime page might be worth you investigating if you want to check.
     
  4. Nov 13, 2004 #3

    Zurtex

    User Avatar
    Science Advisor
    Homework Helper

    :rolleyes: Give me a break, I had just got up and was tired, sorry for the grammatical mistake.

    I realise that in context to 'the largest twin primes ever found' that as a freshman playing around in matlab for 20 minutes on an old computer I'm not going to be able to come close to them. However I thought there may like be some list of all twin primes found so far and the chances of finding twin primes in 100 digit region mustn’t be particularly high.
     
  5. Nov 13, 2004 #4

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    There may well be only few twin prime pairs with 100 digits known - I didn't exhaustively follow all the links - I figured, if you were interested, you'd do that. There was a list of thet first 100,000 twin pairs (and I don't think they got anywhere near 100 digits) on one site.. and some gzip'ed files with lots of numbers in them. Sadly I didn't see a twin prime checking machine. (Aren't twin primes bad for RSA? A naive division algorithm might start at the square root of the number to be factored and hit the answer in two steps or so - I just remember a question like that appearing on a computer project once - explain why primes close together are not as good as primes far apart in RSA. Of course this was something I read once 4 years ago and I could be misremembering).
     
  6. Nov 13, 2004 #5

    shmoe

    User Avatar
    Science Advisor
    Homework Helper

    They won't be too rare at that height. Hardy and Littlewood conjectured that the number of twin primes less than x to be about 1.32*x/log(x)^2. (The 1.32... is approximate, the constant is really a certain product over primes). You're basically a log(x) factor off from the number of primes. At 10^100 this is only 230.2..., so every 1.32...*230.2... primes or so you find, you'd expect p+2 to be prime once. Your old computer should be able to spit one out every 15~20 minutes or so, I guess half that time if you check p-2 as well. For fun you could run your program over a week finding primes and twin primes and see how close your actual data reflects the conjectured density.

    I'm sure there's no list of twin primes in the 10^100 range, but generating them is not too difficult, so any particular one isn't that interesting. Same reason any given 100 digit prime isn't too exciting.
     
  7. Nov 13, 2004 #6

    Zurtex

    User Avatar
    Science Advisor
    Homework Helper

    Thanks :smile:

    I realise twin primes aren't good for RSA and as a standard where p and q are my primes and p<q then I generally makes sure that q is not within the interval p to 2p. As well as various other rules I’ve come up with that should make it difficult to find p and q given pq from the level of thinking of most people in my class.
     
  8. Nov 13, 2004 #7
    Mmm... :uhh: can i pop-up and ask absic Q here:

    What is "twin prime"? :biggrin:
     
  9. Nov 13, 2004 #8

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Two primes are twins if they differ by 2.

    Some examples of twin primes are:

    3, 5
    5, 7
    11, 13
    17, 19
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Large Twin Primes
  1. Twin primes and others (Replies: 2)

Loading...