login
A291540
a(n) = PrimePi(n) * PrimePi(n^2) - PrimePi(n)^3, where PrimePi = A000720.
6
0, 1, 0, 4, 0, 6, -4, 8, 24, 36, 25, 45, 18, 48, 72, 108, 84, 119, 64, 112, 168, 224, 162, 216, 297, 369, 432, 504, 460, 540, 451, 561, 660, 770, 869, 979, 900, 1008, 1152, 1284, 1222, 1365, 1218, 1386, 1540, 1722, 1560, 1755, 1980, 2130, 2295, 2520, 2448, 2640, 2848, 3024, 3216, 3488, 3366, 3638, 3510, 3744, 4050, 4320, 4572
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.
FORMULA
A291539(n) + a(n) = A291538(n).
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
KEYWORD
sign
AUTHOR
Jonathan Sondow, Aug 25 2017
STATUS
approved