OFFSET
1,7
COMMENTS
Conjecture: a(n)>0 for n>23.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 15 2013
STATUS
approved