OFFSET
1,1
COMMENTS
For small n's, a(n) is negative, while for large n's, a(n) is positive.
PROG
(Python)
from sympy import primepi, prime
def A129146(n):
if n == 1: return -6
m, k = n, primepi(n) + n + (n>>1)
while m != k:
m, k = k, primepi(k) + n + (k>>1)
return prime(n+1)-m # Chai Wah Wu, Aug 01 2024
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Zak Seidov, Apr 01 2007
STATUS
approved