Loading ...
Sorry, an error occurred while loading the content.

question on straigh forward calculation of prime numbers

Expand Messages
  • viva8698
    Hi, I have a question where I need a very very reliable answer: Does there exist any function in the world to which I can input the first 6 prime numbers and
    Message 1 of 2 , Mar 7, 2013
    • 0 Attachment
      Hi,

      I have a question where I need a very very reliable answer:

      Does there exist any function in the world to which I can input the first 6 prime numbers and by finding its zeros I could just get the next 12768 prime numbers - and so forth?

      I am indeed talkig about a straight forward calculation and not a sieving etc.

      I would be deeply thankful for your help.

      Thanks in advance
      -Sam
    • Maximilian Hasler
      ... Did you google ? There are explicit formulae for prime(n) but they are inefficient to compute. For example, on
      Message 2 of 2 , Mar 7, 2013
      • 0 Attachment
        On Thu, Mar 7, 2013 at 10:55 AM, viva8698 <vaseghisam@...> wrote:
        > Hi,
        >
        > I have a question where I need a very very reliable answer:
        >
        > Does there exist any function in the world to which I can input the first 6 prime numbers and by finding its zeros I could just get the next 12768 prime numbers - and so forth?

        Did you google ?
        There are explicit formulae for prime(n)
        but they are inefficient to compute.
        For example, on http://en.wikipedia.org/wiki/Formula_for_primes
        you find
        p_n = 1 + \sum_{k=1}^{2(\lfloor n \ln(n)\rfloor+1)} \left(1 -
        \left\lfloor{\pi(k) \over n} \right\rfloor\right)
        with
        \pi(k) := k - 1 + \sum_{j=1}^k \left\lfloor {2 \over j} \left(1 +
        \sum_{s=1}^{\left\lfloor\sqrt{j}\right\rfloor} \left(\left\lfloor{ j-1
        \over s}\right\rfloor - \left\lfloor{j \over s}\right\rfloor\right)
        \right)\right\rfloor

        Now these aren't directly given as "roots of polynomials"
        even though that could probably be done ;

        OTOH I don't understand really well your "and so forth" - can you give
        an example for any other sequence of numbers, to see how that should
        work ?

        Maximilian


        >
        > I am indeed talkig about a straight forward calculation and not a sieving etc.
        >
        > I would be deeply thankful for your help.
        >
        > Thanks in advance
        > -Sam
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.