[go: up one dir, main page]

login
A276119
Number of twin prime pairs between n^3 and (n+1)^3.
1
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,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