OFFSET
1,3
COMMENTS
Case n=1 is degenerate as 1*prime(1)=2, 1*prime(2)=3 and between 2 and 3 there is no prime while (PrimePi[n Prime[n+1]]-PrimePi[n Prime[n]]/.n->1) gives 1.
FORMULA
a(n) = pi(n*prime(n+1)) - pi(n*prime(n)) for n > 1 with a(1) = 0. - Wesley Ivan Hurt, Dec 27 2023
EXAMPLE
a(4)=5 because between 4*prime(4)=4*7=28 and 4*prime(5)=4*11=44, there are exactly 5 primes: 29,31,37,41,43.
MATHEMATICA
A104289=Prepend[Table[PrimePi[n Prime[n+1]]-PrimePi[n Prime[n]], {n, 2, 100}], 0]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 28 2005
STATUS
approved