OFFSET
1,4
EXAMPLE
n= 10, prime(10) = 29, s = Sum_{i=1,10} prime(i) = 2+3+5+7+11+13+17+19+23+29 = 129,
p= primepi(29^2) = primepi(841) = 146. So a(10) = p-s = 146 - 129 = 17.
PROG
(PARI) a(n) = primepi(prime(n)^2) - sum(k=1, n, prime(k)); \\ Michel Marcus, Oct 17 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Dimitris Valianatos, Sep 27 2016
STATUS
approved