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.

A160917 Averages of twin prime pairs which can be represented as a sum of three consecutive of such pair averages.

Original entry on oeis.org

60, 282, 348, 522, 570, 618, 1788, 2112, 4050, 4422, 5880, 6198, 8232, 9678, 10458, 11700, 12072, 12162, 12378, 14010, 16140, 17598, 17838, 21648, 22698, 33348, 36342, 39228, 41610, 43782, 44088, 46272, 48780, 51198, 53088, 56910, 58230
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			a(1) = 60 = A014574(7) = 12 + 18 + 30 = A014574(3) + A014574(4) + A014574(5).
a(2) = 282 = A014574(19) = 72 + 102 + 108 = A014574(8) + A014574(9) + A014574(10).
		

Crossrefs

Programs

  • Mathematica
    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;b=PrimeNextTwinAverage[a]; c=PrimeNextTwinAverage[b];a=a+b+c;If[PrimeQ[a-1]&&PrimeQ[a+1],AppendTo[lst, a]]],{n,8!}];lst
    Module[{m=Mean/@Select[Partition[Prime[Range[10000]],2,1],#[[2]]-#[[1]] == 2&],t},t=Total/@Partition[m,3,1];Intersection[m,t]] (* Harvey P. Dale, Mar 06 2018 *)

Extensions

Comments moved to the examples - R. J. Mathar, Sep 11 2009