OFFSET
1,1
COMMENTS
Is there a twin prime pair between all consecutive cubes?
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
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}.
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
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
G. L. Honaker, Jr., Aug 21 2016
STATUS
approved