login
Averages of twin prime pairs which are a sum of averages of two consecutive twin prime pairs.
4

%I #11 Jul 12 2020 13:34:14

%S 18,30,72,102,660,1092,1302,2082,2112,2382,2592,2970,4242,4272,4650,

%T 4722,4932,5442,5520,6690,6762,7590,8220,9000,10332,10860,11160,11718,

%U 11970,13002,16452,17658,18522,20232,22278,23040,23910,24180,24918

%N Averages of twin prime pairs which are a sum of averages of two consecutive twin prime pairs.

%C Values A014574(j) of the form A014574(k) + A014574(k+1).

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

%e 18=A014574(4) is in the sequence because it equals A014574(2)+A014574(3) = 6+12.

%e 30=A014574(5) is in the sequence because it equals A014574(3)+A014574(4) = 12+18.

%e 72=A014574(8) is in the sequence because it equals A014574(5)+A014574(6) = 30+42.

%t PrimeNextTwinAverage[n_]:=Module[{k},k=n+1;While[ !PrimeQ[k-1]||!PrimeQ[k+1], k++ ];k];lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],a=n;a+=PrimeNextTwinAverage[a]; If[PrimeQ[a-1]&&PrimeQ[a+1],AppendTo[lst,a]]],{n,8!}];lst

%t Select[Total/@Partition[Mean/@Select[Partition[Prime[Range[ 2000]],2,1], #[[2]] - #[[1]] ==2&],2,1],AllTrue[#+{1,-1},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 12 2020 *)

%Y Cf. A014574.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, May 30 2009

%E Comment and examples edited by _R. J. Mathar_, Jul 31 2007