# Formula for prime numbers?

**URL:** <https://boards.straightdope.com/t/formula-for-prime-numbers/8968>\
**Category:** Factual Questions\
**Created:** [March 20, 2000, 11:13pm UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968 "2000-03-20T23:13:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![quadell](https://avatars.discourse-cdn.com/v4/letter/q/b9bd4f/32.png) [@quadell](https://boards.straightdope.com/u/quadell)\
**Post date:** [March 20, 2000, 11:13pm UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968/1 "2000-03-20T23:13:00Z")

</div>

A friend of mine needs to know a formula, given n, that will return an upper bound on the number of prime numbers less than or equal to n. I told him f(n) = n, but he didn’t laugh. I think he wants the lowest upper bound anyone can come up with. Does anyone know a good formula for this?

Your Quadell

---

<div class="post-metadata">

**Author:** ![Arnold\_Winkelried](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@Arnold\_Winkelried](https://boards.straightdope.com/u/Arnold_Winkelried)\
**Post date:** [March 20, 2000, 11:21pm UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968/2 "2000-03-20T23:21:00Z")

</div>

[http://mathworld.wolfram.com/PrimeNumberTheorem.html](http://mathworld.wolfram.com/PrimeNumberTheorem.html)

---

<div class="post-metadata">

**Author:** ![quadell](https://avatars.discourse-cdn.com/v4/letter/q/b9bd4f/32.png) [@quadell](https://boards.straightdope.com/u/quadell)\
**Post date:** [March 22, 2000, 6:42am UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968/3 "2000-03-22T06:42:00Z")

</div>

Wow! Thanks much.

Your Quadell

---

<div class="post-metadata">

**Author:** ![Gilligan](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Gilligan](https://boards.straightdope.com/u/Gilligan)\
**Post date:** [March 22, 2000, 12:55am UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968/4 "2000-03-22T00:55:00Z")

</div>

I have a proof of the Riemann Hypothesis, but the margins of this thread are too narrow to contain it…

---

<div class="post-metadata">

**Author:** ![Arnold\_Winkelried](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@Arnold\_Winkelried](https://boards.straightdope.com/u/Arnold_Winkelried)\
**Post date:** [March 22, 2000, 12:57am UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968/5 "2000-03-22T00:57:00Z")

</div>

That’s OK Gilligan, will you offer me $100,000 to recreate your proof?

---

<div class="post-metadata">

**Author:** ![Louie](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Louie](https://boards.straightdope.com/u/Louie)\
**Post date:** [March 22, 2000, 2:16am UTC](https://boards.straightdope.com/t/formula-for-prime-numbers/8968/6 "2000-03-22T02:16:00Z")

</div>

What’s sad is that I laughed at Gilligan’s joke. ☹
