cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-14 of 14 results.

A121842 Difference between n^3 and next prime.

Original entry on oeis.org

2, 1, 3, 2, 3, 2, 7, 4, 9, 4, 9, 30, 5, 6, 5, 14, 3, 6, 7, 4, 9, 16, 3, 30, 5, 4, 3, 4, 9, 2, 11, 12, 3, 14, 9, 24, 7, 18, 5, 14, 7, 6, 5, 24, 9, 2, 31, 14, 5, 10, 3, 10, 3, 14, 13, 18, 5, 28, 9, 12, 23, 10, 3, 2, 3, 2, 5, 16, 9, 2, 19, 2, 25, 6, 3, 16, 3, 6, 5, 4, 9, 16, 13, 2, 19, 4, 3, 4, 9, 14
Offset: 0

Views

Author

Zak Seidov, Aug 29 2006

Keywords

Comments

From Ingham (1937) it follows that there is a prime between x^3 and (x+1)^3 if x is sufficiently large: see A060199 for further details. - M. F. Hasler, Nov 09 2020

Examples

			a(6)=7 because next prime after 6^3=216 is 223 and 223-216=7.
		

Crossrefs

Cf. A060199 (number of primes between consecutive cubes).

Programs

  • Mathematica
    Array[NextPrime[#] - # &[#^3] &, 90, 0] (* Michael De Vlieger, Nov 12 2020 *)
  • PARI
    a(n) = nextprime(n^3) - n^3; \\ Michel Marcus, Oct 10 2013

Formula

a(n) = A013632(n^3) = A013632(A000578(n)). - Michel Marcus, Oct 10 2013

A157481 Number of primes between n^3-n^2 and (n+1)^3-(n+1)^2.

Original entry on oeis.org

0, 2, 5, 8, 10, 16, 21, 24, 32, 36, 43, 53, 57, 65, 74, 86, 92, 104, 114, 123, 133, 150, 151, 175, 180, 194, 207, 224, 238, 251, 271, 275, 306, 305, 332, 349, 359, 383, 408, 410, 434, 458, 473, 497, 502, 549, 553, 570, 590, 630, 641, 668, 685, 718, 726, 748, 780
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[(n+1)^3-(n+1)^2]-PrimePi[n^3-n^2],{n,0,5!}]

A276119 Number of twin prime pairs between n^3 and (n+1)^3.

Original entry on oeis.org

2, 2, 3, 3, 5, 5, 4, 6, 5, 11, 9, 12, 11, 12, 17, 17, 16, 19, 16, 18, 24, 22, 17, 22, 26, 32, 36, 33, 26, 35, 39, 45, 36, 36, 38, 52, 42, 51, 40, 48, 55, 51, 67, 62, 64, 66, 66, 72, 77, 67, 71, 73, 96, 75, 69, 109, 83, 90, 86, 100, 101, 95, 91, 112, 111
Offset: 1

Views

Author

G. L. Honaker, Jr., Aug 21 2016

Keywords

Comments

Is there a twin prime pair between all consecutive cubes?

Examples

			a(9)=5 because there are 5 twin prime pairs between 9^3 and 10^3, i.e., {809, 811}, {821, 823}, {827, 829}, {857, 859}, {881, 883}.
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1) .. a(N)
    Primes:= select(isprime, {seq(x,x=3..(N+1)^3,2)}):
    Tprimes:= Primes intersect map(t -> t-2,Primes):
    seq(nops(select(t -> t > n^3 and t < (n+1)^3-2, Tprimes)),n=1..N); # Robert Israel, Aug 21 2016
  • PARI
    a(n)=my(p=nextprime(n^3),s); forprime(q=p+1, (n+1)^3, if(q-p==2, s++); p=q); s \\ Charles R Greathouse IV, Aug 21 2016
    
  • Perl
    use ntheory ":all"; sub a276119 { my $n = shift; twin_prime_count($n**3,($n+1)**3); } # Dana Jacobsen, Aug 22 2016

A157482 Number of primes between n^3-n^2-n^1 and (n+1)^3-(n+1)^2-(n+1)^1.

Original entry on oeis.org

0, 1, 5, 8, 10, 16, 21, 24, 30, 39, 42, 52, 57, 65, 75, 86, 92, 102, 115, 122, 133, 150, 151, 176, 181, 192, 209, 221, 239, 252, 270, 273, 307, 308, 328, 350, 359, 383, 407, 414, 430, 460, 472, 494, 504, 548, 554, 571, 590, 629, 642, 669, 681, 722, 724, 749, 776
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[(n+1)^3-(n+1)^2-(n+1)^1]-PrimePi[n^3-n^2-n^1],{n,0,5!}]
Previous Showing 11-14 of 14 results.