Is there a way to find the approximate value of the nth prime?

前端 未结 7 1765
醉话见心
醉话见心 2020-12-14 10:09

Is there a function which will return the approximate value of the n th prime? I think this would be something like an approximate inverse prime counting function.

7条回答
  •  猫巷女王i
    2020-12-14 10:56

    To complement Dana J's Upper bound this formula should give you a good lower bound.

    P(n) = (((2 Log(3, n + 2))/(Log(2.5, 2) + Log(3, 3)) + (2 Log(3, n - 2))/(Log(3, 2) + Log(3, 3)))/2) n;
    

提交回复
热议问题