Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $P$ denote $\text{primes}$, and $\pi(x)$ denote $|P| \le x$.

Here's my first question: Why does

$$3+ (-1)\left(\left\lfloor\sum_{k=1}^{|\{x\in P,\;x\le n\}|} \frac{P_k}{1-P_k}\right\rfloor\right) = \pi(n),\quad n\ge1223$$

And similarly:

$$2+ (-1)\left(\left\lfloor\sum_{k=1}^{|\{x\in P,\;x\le n\}|} \frac{P_k}{1-P_k}\right\rfloor\right) = \pi(n),\quad 11\le n\lt1223$$

I know that it is a fairly weak statement as of yet, but I can't find this (or a statment similar enough) anywhere, which seems weird, as it seems to be a interesting way of defining $\pi(x)$.

If anyone has any explanation on why this is the case, please share.

Thanks in advance!


If the statment is redefined as $j+ (-1)\left(\left\lfloor\sum_{k=1}^{|\{x\in P,\;x\le n\}|} \frac{P_k}{1-P_k}\right\rfloor\right) = \pi(n)$, is there a way to determine $j$?

Edit 2:

As the accepted answer indicates:

$$j + (-1)\left(\left\lfloor\sum_{k=1}^{|\{x\in P,\;x\le n\}|} \frac{P_k}{1-P_k}\right\rfloor\right),\quad j>0,\; e^{e^{j-1}} < n < e^{e^{j}} = \pi(n)$$

share|cite|improve this question
What's the differnce between "Why does ...?" and "Is there a way to prove this?"? – Hagen von Eitzen May 23 '13 at 4:55
@HagenvonEitzen: Good point. – JohnWO May 23 '13 at 5:01
up vote 1 down vote accepted

Note that $$-\frac {P_k}{1-P_k}=1+\frac1{P_k-1}>1+\frac1{P_k}$$ and the sum of prime reciprocals diverges. Therefore, for $n$ big enough, your $\sum$ will be bigger than $\pi(n)+r$ for any $r$, thus disproving your conjecture. (The divergence is slow, however, for the $r$th steps you have to go up to $n$ in the order of $e^{e^{r}}$).

share|cite|improve this answer
Thanks! And thanks for answering my edit seconds after it was edited in! :) – JohnWO May 23 '13 at 5:07
@JohnWO .. but the estimate $e^{e^r}$ is not necessarily exact. What we have is that $\sum_{p<n}\frac1p-\ln\ln n$ approaches the value $0.26149\ldots$ as $n\to\infty$ – Hagen von Eitzen May 23 '13 at 14:45
$e^{e^{r}}$ is actually correct up to at least $10^8$, when flooring the value. – JohnWO May 24 '13 at 5:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.