$\pi(n)$ is the prime counting function

$\lfloor x\rfloor$ is the floor function

$P_n$ is the nth prime number

Mathematical experiment with wolfram calculator yield:

No messy radical or power involve here

We need a proof to verify that this formula is correct.

Can anybody help us?

$$\sum_{i=0}^{\infty}\left\lfloor \frac{2n}{\pi(i)+n+1} \right\rfloor=P_n$$

Just wonder if this formula can be simplify more further.

  • $\begingroup$ Can you tell us a little bit about how you guessed such a formula? $\endgroup$ – Ravi May 5 '16 at 21:11
  • $\begingroup$ I was observing Martin Sebastian Ruiz and wallah formulas $\endgroup$ – user334593 May 5 '16 at 21:20

The proof is simple: partition the sum to whenever $\pi(i)$ jumps up by 1, i.e. when $i=P_j$ , the $j$'th prime. Then your sum is just:


Where we noticed that the floored term is always 1 until $j$ exceeds $n-1$, where it becomes 0. So your sum telescopes and the result follows.

  • $\begingroup$ Nice and simple we thought this could be a lengthy prove formula. Thank you $\endgroup$ – user334593 May 5 '16 at 21:21
  • 1
    $\begingroup$ (It's also useless for all practical purposes) $\endgroup$ – Alex R. May 5 '16 at 21:22
  • $\begingroup$ Seeing a simple beautiful prove of a formula it is enough for me $\endgroup$ – user334593 May 5 '16 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy