login
Integers k such that (k^3)/3 is the average of a pair of twin primes.
2

%I #12 Sep 08 2022 08:45:39

%S 6,30,84,144,186,204,270,360,516,576,726,756,810,990,1020,1140,1446,

%T 1500,1836,2010,2250,2304,2820,3204,3366,3564,4170,4320,4344,4416,

%U 4590,4656,5160,5220,5820,5976,6120,6204,6276,6534,6876,7260,7710,7806,7866,8256

%N Integers k such that (k^3)/3 is the average of a pair of twin primes.

%C These are the integers of the form (3*A014574(i))^(1/3), any index i. - _R. J. Mathar_, Dec 14 2008

%H Amiram Eldar, <a href="/A152788/b152788.txt">Table of n, a(n) for n = 1..10000</a>

%e 6 is a term since (6^3)/3 = 72 and (71, 73) are twin primes.

%e 30 is a term since (30^3)/3 = 9000 and (8999, 9001) are twin primes.

%t lst1={}; lst2={}; Do[ p1=Prime[n]; p2=Prime[n+1]; If[p2-p1==2, e=(3*(p1+1))^(1/3); i=Floor[e]; If[e==i, AppendTo[lst1,(p1+1)]; AppendTo[lst2,i]]], {n,2*10!}]; Print[lst1]; Print[lst2]

%t fQ[n_] := PrimeQ[n^3/3 - 1] && PrimeQ[n^3/3 + 1]; lst = {}; Do[If[fQ@n, AppendTo[lst, n]], {n, 3, 10^4, 3}]; lst

%o (Magma) [k:k in [3..9000 by 3]| IsPrime(k^3 div 3 -1) and IsPrime(k^3 div 3 +1)]; // _Marius A. Burtea_, Jan 01 2020

%Y Cf. A014574, A152786, A152787.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Dec 12 2008

%E Edited and extended by _Robert G. Wilson v_, Dec 14 2008

%E Corrected divisor in definition. - _R. J. Mathar_, Dec 20 2008