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.

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