login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A256956
a(n) = pi(n) * pi(n+1), where pi(n) is the number of primes <= n.
1
0, 2, 4, 6, 9, 12, 16, 16, 16, 20, 25, 30, 36, 36, 36, 42, 49, 56, 64, 64, 64, 72, 81, 81, 81, 81, 81, 90, 100, 110, 121, 121, 121, 121, 121, 132, 144, 144, 144, 156, 169, 182, 196, 196, 196, 210, 225, 225, 225, 225, 225, 240, 256, 256, 256, 256, 256, 272
OFFSET
1,2
COMMENTS
For n>1, a(n) is a perfect square (A000290) if and only if pi(n) = pi(n+1) [i.e., when n+1 is composite], and is a pronic number (A002378) when pi(n) < pi(n+1) [when n+1 is prime].
LINKS
FORMULA
a(n) = A000720(n) * A000720(n+1).
EXAMPLE
a(5) = 9; pi(5) * pi(6) = 3 * 3 = 9.
a(6) = 12; pi(6) * pi(7) = 3 * 4 = 12.
MAPLE
with(numtheory): A256956:=n->pi(n)*pi(n+1): seq(A256956(n), n=1..100);
MATHEMATICA
Table[PrimePi[n]*PrimePi[n + 1], {n, 100}]
PROG
(PARI) vector(100, n, primepi(n)*primepi(n+1)) \\ Derek Orr, Apr 13 2015
(Magma) [ #PrimesUpTo(n) * #PrimesUpTo(n+1): n in [1..80] ]; // Vincenzo Librandi, Apr 14 2015
(Scheme) (define (A256956 n) (* (A000720 n) (A000720 (+ 1 n)))) ;; Antti Karttunen, Apr 18 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 13 2015
EXTENSIONS
Comment clarified by Antti Karttunen, Apr 18 2015
STATUS
approved