TITLE: How many solutions do exist for $\varphi(n)=\pi(n), n\in\mathbb{N}$?
QUESTION [5 upvotes]: How many solutions do for the following equation exists?
\begin{align}
\varphi(n)=\pi(n), n\in\mathbb{N},
\end{align}
where $\varphi(n)$ is Euler's totient function  and $\pi(n)$ is the prime-counting function.
Thank you very much

REPLY [10 votes]: Surprisingly, the list of solutions is finite: 2, 3, 4, 8, 10, 14, 20, 90. Moreover $\varphi(n)>\pi(n)$ for $n>90$.
A proof is given at page 179 in the following paper by Leo Moser: "On the equation $\varphi(n)=\pi(n)$", Pi Mu Epsilon J. 1951, 177–180. 
Sketch of Moser's proof. We have that $\varphi(n)-\pi(n)=B(n) - A(n)$
where $A(n)$ is the number of prime divisors of $n$ 
and $B(n)$ is the 
number of non-primes, which do not exceed 
$n$ and are relatively prime to $n$. 
Now
i) $\pi(\sqrt{n})\geq 2A(n)$ for $n>360$ (lemma 3 where Bertrand's 
postulate is used) and ii) $B(n)>\pi(\sqrt{n})-A(n)$ (lemma 4).
Hence by  for $n>360$,
$$\varphi(n)-\pi(n)=B(n) - A(n)>\pi(\sqrt{n})-A(n)-A(n)\geq 0.$$
P.S. According http://oeis.org/A037171, the result has been proved by   David W. Wilson and Jeffrey Shallit, but unfortunately no reference is provided.