An integral and $\pi(n)$ Are there polynomials $P,Q\in \mathbb{R}[x]$ satisfying :
$$\int_{0}^{\log n}\frac{P(x)}{Q(x)}\,\mathrm{d}x=\frac{n}{\pi(n)}\quad \text{ for infinitely many }n\in \mathbb{N}$$
Here $\pi(n)$ is the prime counting function. I have no idea about this problem. This is a problem from a local magazine, which has stopped publishing so I don't have any answer to this. Thanks.
 A: Say, $\displaystyle \int_{0}^{\log n_k}\frac{P(x)}{Q(x)}\,\mathrm{d}x=\frac{n_k}{\pi(n_k)}\quad \text{ for the subsequence } \,\{n_k\}_{k\in \mathbb{N}}\subset \mathbb{N}$.
Then the subsequence $\{n_k\}$ has either infinitely many primes or infinitely many composites.
Either way we have a sequence $\{n_{k_{r}}\}$ of $\{n_k\}$, such that $\pi(n_{k_{r}}+1) = \pi(n_{k_{r}})$.
Let, $\displaystyle F(x) = \dfrac{1}{x}\int_0^{\log x}\dfrac{P(t)}{Q(t)}\,dt$
Then, by Rolle's Mean Value Theorem $\exists\,c_r \in (n_{k_{r}},n_{k_{r}}+1)$, such that $F'(c_r) = 0$, for all $r \in \mathbb{N}$, where $c_r$
 is an unbounded sequence.
Since, $xF'(x) + F(x) = \dfrac{P(\log x)}{xQ(\log x)}$,
Thus, write $R(x) = \dfrac{P(x)}{Q(x)}$, we have: $\displaystyle R(\log c_r) = \int_0^{\log c_r} R(t)\,dt$, which we certainly can't have for an unbounded sequence $\{c_r\}$.
Making $x \mapsto e^x$, we see that $T(x) = R(x) - \displaystyle \int_0^x R(x)\,dx$ has infinitely many roots, i.e., $\log {c_r}$ $\implies $ by rolle's theorem once again $R'(c'_r) - R(c'_r) = 0 $, for an unbounded sequence $c'_r \in (c_r,c_{r+1})$, for each $r \in \mathbb{N}$. Contradiction.
