login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A036441 A180107 A135146 * A257637 A258027 A053096
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 13 2015
EXTENSIONS
Comment clarified by Antti Karttunen, Apr 18 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 06:44 EDT 2024. Contains 371782 sequences. (Running on oeis4.)