OFFSET
1,1
COMMENTS
Difference a(n+1) - a(n) = -1, 0, 1, 2, ... .
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Madhuparna Das and Goutam Paul, Revisiting Generalized Bertand's Postulate and Prime Gaps, arXiv:1710.09891 [math.NT], 2017-2019.
FORMULA
EXAMPLE
a(4) = 4 because between 4 and 16 there are 4 primes: 5, 7, 11, 13.
a(7) = 5 because between 7 and 28 there are 5 primes: 11, 13, 17, 19, 23.
MAPLE
MATHEMATICA
s=4; a[n_] := PrimePi[s*n]-PrimePi[n]
PROG
(PARI) a(n) = primepi(4*n) - primepi(n); \\ Michel Marcus, Oct 02 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 02 2002
STATUS
approved