If $x>2$, $x$ is even number, and $\pi(x)$ is a number of prime numbers less than $x$, then how can I find the roots of the equation $$x=2\pi(2x)-2$$ without the use of computer programming.
-
Note that $\pi(2(x+1))\le \pi(2x)+1$ – Mark Bennet Oct 26 '15 at 21:58
-
How did this problem arise, by the way? It doesn't seem particularly natural. – Travis Willse Oct 26 '15 at 23:07
4 Answers
Aside from the two primes $2$ and $3$ every prime is of the form $6n\pm 1$, and the first of these is $5$. This is on average one third of the remaining numbers, less $1$, because $1$ does not count as a prime.
It is therefore easy to prove that $\pi(n)\le \frac n3+2$. But to get a bound on the solutions you need to do better than $\frac n4$ for the variable bit.
If you eliminate the four primes $2,3,5,7$ and their multiples, the fraction of numbers left is $\frac 12\times \frac 23\times \frac 45\times \frac 67=\frac 8{35}\lt \frac 14$ so that you obtain, with the four special primes, and noting that $1$ does not count as prime, $\pi(n)\le \frac 8{35}n+4$
Then $x=2\pi(2x)-2\le \frac {32}{35}x+8-2$ or $3x\le 210$.
This gives a finite search which is easy enough to do by hand.
- 100,194
-
This is an especially nice (and pleasantly elementary) approach! One can't hope to improve your upper bound here much, either, as $x = 58$ is a solution. (I'd (+1) but am out of votes for the day.) – Travis Willse Oct 26 '15 at 22:49
-
-
Unfortunately this is one of those questions where it is really hard to solve without a computer program. If you want the answer $x=2,44,46,52,54,56,58...$ However this is one of those questions where you would just have to bruteforce to solve!
-
1
-
1I guess that this equation just has this roots, $x=2,44,46,52,54,56,58$ – Jamal Farokhi Oct 26 '15 at 22:32
-
-
@JamalFarokhi Never mind I didn't realize you were asking for values of x>2 – Dean Bearl Oct 26 '15 at 22:38
The prime-counting function $\pi(n)$ is asymptotic to $\frac{n}{\log n}$ as $n \to \infty$, and in fact one can show that $$\pi(x) <C \frac{x}{\log x},$$ where $C = 1.25506$ (see the reference below). So, if $n$ is a solution to $$n = 2 \pi(2 n) - 2,$$ we must have $$\phantom{(\ast)} \qquad n < 2 \left(C\frac{(2 n)}{\log (2 n)}\right) - 2 = \frac{4 C n}{\log (2n)} - 2 \qquad (\ast).$$ Rearranging gives $$n \log 2 n < 4 C n - 2 \log 2 n < 4 C n$$ and then $$\log 2n < 4 C ,$$ and so (since $\log$ is increasing) $$n < \frac{1}{2} e^{4 C} < 76.$$ In fact, by analyzing the inequality $(\ast)$ using elementary calculus, we can improve this bound to $$n < 66.$$ This leaves just $32$ even numbers to check. (One cannot hope to do too much better with this upper bound, as $n = 58$ is a solution.)
The inequality in the first display equation is (3.6) in Corollary 1 of the
Rosser, J. Barkley; Schoenfeld, Lowell. Approximate formulas for some functions of prime numbers. Illinois J. Math. 6 (1962), no. 1, 64--94.
- 3,955
- 99,363
$\pi(x)$ is known to be asymptotically $\frac{x}{\ln x}$ and this is also a good approximation for relatively small values (see table). Just trying to solve $x = 2\frac{2x}{\ln 2x} -2$ we can assume $x$ is in the vicinity of $\ln 2x \approx 4$.
So check the values near and you'll find all roots.
- 94