OFFSET
1,4
COMMENTS
To define as positive sequence let C(n)= A062298; f(a) = pi(a) if a is nonprime, f(a)= C(a) if a is prime. - Daniel Tisdale, Nov 07 2008
REFERENCES
G. A. Kudrevatow, (1970): Exercises in Number Theory. Problem 488; page 56; Prosveshenie, Moscow [in Russian].
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
The function is positive for composite and negative for prime numbers. It is zero at n=1.
PROG
(PARI) a(n)={if(n>1, primepi(n-1)*n - primepi(n)*(n-1), 0)} \\ Harry J. Smith, Aug 17 2009
CROSSREFS
KEYWORD
sign
AUTHOR
Labos Elemer, Aug 06 2001
STATUS
approved