OFFSET
1,4
COMMENTS
All terms are positive except a(1) = a(3) = a(5) = 0 and a(7) = -4, by the PNT with error term for large n and computation for smaller n. In particular, PrimePi(n) * PrimePi(n^2) > PrimePi(n)^3, for n > 7.
For PrimePi(n^3) - PrimePi(n) * PrimePi(n^2), see A291539.
For PrimePi(n^3) - PrimePi(n)^3, see A291538.
For prime(n)^3 - prime(n) * prime(n^2), see A291542.
EXAMPLE
a(7) = PrimePi(7) * PrimePi(7^2) - PrimePi(7)^3 = 4 * 15 - 4^3 = -4.
MATHEMATICA
Table[ PrimePi[n] * PrimePi[n^2] - PrimePi[n]^3, {n, 65}]
PROG
(PARI) a(n) = primepi(n) * primepi(n^2) - primepi(n)^3; \\ Michel Marcus, Sep 10 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Jonathan Sondow, Aug 25 2017
STATUS
approved