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

Prime numbers function

  1. Aug 10, 2004 #1
    is it true that this function:
    f(n) = 3^(n)+2

    will give a prime number for any natural value of n?
  2. jcsd
  3. Aug 10, 2004 #2
    Nope, f(5) = 3^5 + 2 = 245 = 5 * 7^2.

    Exercise: prove that f(n) assumes an infinite number of composite values.
    Last edited: Aug 10, 2004
  4. Aug 10, 2004 #3


    User Avatar
    Science Advisor

    To the best of my knowledge, there is no known algebraic expression that generates primes.
  5. Aug 10, 2004 #4
    Well, you can get kind of close ;) http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html,

  6. Aug 11, 2004 #5
    how about the function
    f(n) = 3^(2n)+2

    where n is a natural number
  7. Aug 11, 2004 #6
    No. Have you even tried looking for a counterexample? One exists in the really small natural numbers.
    Last edited: Aug 11, 2004
  8. Sep 18, 2004 #7


    User Avatar
    Science Advisor
    Homework Helper

    in the examples cited from wolfram it sounds as if one may have no clue which inputs actually give primes (i.e. positive outputs) and which do not.
  9. Sep 19, 2004 #8

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    It may sound that way since it is true.
  10. Sep 19, 2004 #9


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You can keep trying but you won't find a prime number function this way.

    I think the only known single-parameter function that generates primes is the one involving Mill's constant : f(n) = [M^3^n]
  11. Sep 19, 2004 #10


    User Avatar
    Science Advisor
    Homework Helper

    what is mills constant? the 3^n th root of 3?

    this does not sound promising Gokul. unless this "constant" is like my brother the engineers "fudge factor", i.e. the ratio between my answer and the right answer.

    actually isn't it obvious no formula of this type, taking higher powers of the same thing, can ever give more than one prime?

    or are you using brackets to mean something like the next smaller integer? even then I am highly skeptical. of course the rime number graph is convex, so has some sort of shape like an exponential, by the rpime number theorem, i guess, but what can you get out of that?

    maybe asymptotically you might say something about a large number, unlikely even infinitely many, primes.

    but i am a total novice here.
    Last edited: Sep 19, 2004
  12. Sep 19, 2004 #11


    User Avatar

  13. Sep 19, 2004 #12


    User Avatar
    Science Advisor
    Homework Helper

    oh great, so "mills constant" is not even known. so the formula [M^(3^n)]. is not actually an explicit formula at all.

    in fact apparently mills constant is computed by computing the primes instead.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook