OFFSET
1,2
COMMENTS
It can be shown that a(n) > a(n-1) >= 1 and a(n) <= 2*n - 1 < 2*n (see proofs in the Links section).
LINKS
FORMULA
a(n) = A065328(n) + n. - Michel Marcus, Sep 12 2020
MATHEMATICA
Table[PrimePi[Prime[n] - n] + n, {n, 1, 64}] (* Amiram Eldar, Sep 09 2020 *)
PROG
(Python)
from sympy import prime, primepi
for n in range(1, 100001):
a_n = primepi(prime(n) - n) + n
print(a_n)
(PARI) a(n) = n + primepi(prime(n) - n); \\ Michel Marcus, Sep 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Sep 08 2020
STATUS
approved