Roger Hui wrote:
> 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
I think I was seduced by +/ @ i. @ # . It should be 2 %~ m*m+1 .
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm