Something is still amiss in the formula. For
[[latex($$\sum_{p\in P} \left(\pi(n/p)-\pi(p)\right)=\sum_{p\in P} \pi(n/p)-
\frac{m(m-1)}2$$)]]
to be true, it must be that
[[latex($$\sum_{p\in P}\pi(p)=\frac{m(m-1)}2$$)]]
But:
pi=: p:^:_1@(+ 1&p:)
] p=: p: i.m=: 5
2 3 5 7 11
pi p
1 2 3 4 5
+/ pi p
15
2 %~ m*m-1
10
----- Original Message -----
From: John Randall <[EMAIL PROTECTED]>
Date: Saturday, April 5, 2008 13:42
Subject: Re: [Jgeneral] How readable is J?
To: General forum <[email protected]>
> 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}
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm