[go: up one dir, main page]

login
A192451
Number of primes between successive hexagonal numbers.
1
0, 3, 3, 3, 5, 4, 6, 6, 6, 6, 8, 8, 8, 8, 10, 10, 8, 12, 12, 11, 12, 11, 14, 14, 12, 16, 10, 16, 17, 15, 16, 15, 19, 14, 20, 16, 19, 20, 18, 15, 21, 20, 23, 21, 21, 22, 22, 21, 23, 21, 25, 22, 26, 23, 26, 25, 28, 23, 28, 27, 24
OFFSET
1,2
FORMULA
a(n) = A000720(A000384(n)) - A000720(A000384(n-1)).
EXAMPLE
There are no primes between 0 and 1, so a(1) = 0;
there are three primes between 1 and 6, so a(2) = 3;
there are three primes between 6 and 15, so a(3) = 3.
MAPLE
A192451 := proc(n) numtheory[pi](n*(2*n-1)) -numtheory[pi]((n-1)*(2*n-3)) ; end proc: # R. J. Mathar, Jul 01 2011
PROG
(PARI) a(n)=sum(k=2*n^2-5*n+4, n*(2*n-1), isprime(k)) \\ Charles R Greathouse IV, Jul 13 2011
CROSSREFS
Sequence in context: A076566 A083574 A108025 * A129856 A136800 A126661
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by R. J. Mathar, Jul 01 2011
STATUS
approved