The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A216266 Number of primes between n^3 and n^3+n (inclusive). 4
1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 2, 2, 1, 2, 1, 3, 3, 3, 2, 4, 0, 3, 5, 4, 4, 2, 3, 2, 2, 5, 3, 3, 2, 5, 2, 3, 4, 5, 2, 3, 3, 5, 8, 5, 4, 5, 4, 3, 6, 6, 4, 4, 6, 5, 3, 7, 8, 2, 3, 6, 6, 5, 4, 5, 6, 5, 4, 4, 3, 4, 8, 8, 4, 5, 8, 7, 6, 5, 4, 5, 9, 6, 8, 8, 6, 8, 10, 6, 9, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
Conjecture: a(n)>0 for n>23.
LINKS
FORMULA
a(n) = A000720(n^3+n) - A000720(n^3).
MAPLE
a:= n-> add(`if`(isprime(t), 1, 0), t=n^3..n^3+n):
seq(a(n), n=1..100); # Alois P. Heinz, Mar 17 2013
MATHEMATICA
Table[PrimePi[n^3+n]-PrimePi[n^3], {n, 100}] (* Harvey P. Dale, Apr 19 2014 *)
PROG
(Java)
import java.math.BigInteger;
public class A216266 {
public static void main (String[] args) {
for (long n=1; n < (1<<21); n++) {
long cube = n*n*n, c = 0;
for (long k=cube+1; k<=cube+n; ++k) {
BigInteger b1 = BigInteger.valueOf(k);
if (b1.isProbablePrime(2)) {
if (b1.isProbablePrime(80))
++c;
}
}
System.out.printf("%d, ", c);
}
}
}
(PARI)
default(primelimit, 10^7);
a(n) = primepi(n^3+n) - primepi(n^3);
/* Joerg Arndt, Mar 16 2013 */
CROSSREFS
Sequence in context: A332038 A101672 A083731 * A177416 A087606 A271368
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 15 2013
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 May 15 02:58 EDT 2024. Contains 372536 sequences. (Running on oeis4.)