Roger Hui wrote:
> I think you need to say p^2<=n rather than <n .
> Otherwise it fails for semiprimes n which are
> perfect squares.

You're right.

\documentclass{article}
\begin{document}
\thispagestyle{empty}\noindent
Let $P$ be the set of primes $p$ such that $p^2\leq n$,
and let $m=\left| P\right|$.
Then the number of semiprimes less than or equal to $n$ is given by
$$\sum_{p\in P} \left(\pi(n/p)-\pi(p)\right)=
\sum_{p\in P} \pi(n/p)- \frac{m(m-1)}2.$$
\end{document}

Best wishes,

John


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to