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

I Found a formula for all primes

  1. Sep 21, 2015 #1
    To start let's use this trick to find a sequence of primes
    This trick starts with prime 11 and the next in sequence 13. After you add them together to get 24 you subtract 7 which is the prime in sequence before 11, and you will get the answer 17.
    Now this will find every single prime imaginable but it also has a few holes. When you do this with
    It still works well let's do it again
    Again it works! One more time
    What 25? That's not prime! But it is the factor of 5x5. Anyways lets get a little better idea
    23+25-19=29 prime
    25+29-23=31 prime
    29+31-25=35 not prime but = to 7x5
    The next holes are at:
    The pattern to understand goes like this. I'll go to the first numbers under 100
    Start at 1 add 4
    1+4 (1 is not prime)
    5+2 p
    7+4 p
    11+2 p
    13+4 p
    17+2 p
    19+4 p
    23+2 p
    25+4 5x5
    29+2 p
    31+4 p
    35+2 5x7
    37+4 p
    41+2 p
    43+4 p
    47+2 p
    49+4 7x7
    53+2 p
    55+4 5x11
    59+2 p
    61+4 p
    65+2 5x13
    67+4 p
    71+2 p
    73+4 p
    77+2 7x11
    79+4 p
    83+2 p
    85+4 5x17
    89+2 p
    91+4 7x13
    95+2 5x19
    97+4 p
    When you do this you find every number that is prime and the smallest to largest factors of multiples of primes starting with 5x5.
    One thing to note is that the prime numbers "2 and 3" are not in the sequence, or at least apparent. Well that is if you don't know where to look. For every operation you have a +4 and a +2
    Again two primes multiplied together.
    With all this information it is easy to develop a formula which will be
    Plug whatever you want into this formula and you will find either a prime or a multiple of two primes. Now if you are a cryptographer and one of your friends has a password of two primes multiplied together just use this function and start with x=1000 and go find that password because you'll run across it soon enough.
    Like I said this will find you every prime you could ever want but knowing that it is a prime that you got for your answer instead of a composite number of two primes is a problem I can't even solve efficiently when it comes to truly large numbers.
    As you progress through you will find less and less primes because the combination of primes becomes larger and larger with every prime you find, but if you can figure it all out well I'm glad I helped, just let me know how you did it and we'll all be dandy.
  2. jcsd
  3. Sep 21, 2015 #2


    User Avatar

    Staff: Mentor

    Thread closed for Moderation...
  4. Sep 21, 2015 #3

    Vanadium 50

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2017 Award

    Counterexample: x = 64 gives 385 = 5 x 7 x 11
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Found a formula for all primes