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

%I #17 Apr 19 2014 08:47:33

%S 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,

%T 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,

%U 4,4,3,4,8,8,4,5,8,7,6,5,4,5,9,6,8,8,6,8,10,6,9,11

%N Number of primes between n^3 and n^3+n (inclusive).

%C Conjecture: a(n)>0 for n>23.

%H Alois P. Heinz, <a href="/A216266/b216266.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000720(n^3+n) - A000720(n^3).

%p a:= n-> add(`if`(isprime(t), 1, 0), t=n^3..n^3+n):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Mar 17 2013

%t Table[PrimePi[n^3+n]-PrimePi[n^3],{n,100}] (* _Harvey P. Dale_, Apr 19 2014 *)

%o (Java)

%o import java.math.BigInteger;

%o public class A216266 {

%o public static void main (String[] args) {

%o for (long n=1; n < (1<<21); n++) {

%o long cube = n*n*n, c = 0;

%o for (long k=cube+1; k<=cube+n; ++k) {

%o BigInteger b1 = BigInteger.valueOf(k);

%o if (b1.isProbablePrime(2)) {

%o if (b1.isProbablePrime(80))

%o ++c;

%o }

%o }

%o System.out.printf("%d, ", c);

%o }

%o }

%o }

%o (PARI)

%o default(primelimit,10^7);

%o a(n) = primepi(n^3+n) - primepi(n^3);

%o /* _Joerg Arndt_, Mar 16 2013 */

%Y Cf. A089610, A216265.

%K nonn

%O 1,7

%A _Alex Ratushnyak_, Mar 15 2013

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 June 10 03:52 EDT 2024. Contains 373253 sequences. (Running on oeis4.)