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.

Showing 1-3 of 3 results.

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

A160918 Averages of twin prime pairs that are sums of 4 consecutive averages of twin prime pairs.

Original entry on oeis.org

102, 150, 420, 660, 858, 1020, 2310, 2730, 3120, 3390, 5100, 5502, 5850, 6198, 7758, 12540, 13692, 13998, 15360, 17292, 21840, 23688, 25932, 32832, 41520, 43398, 46092, 49032, 49410, 50892, 58152, 61560, 64920, 70878, 72270, 78138, 88818
Offset: 1

Views

Author

Keywords

Comments

Members of A014574 which can be written as a sum of 4 consecutive members.

Examples

			102 is in the sequence because it can be written as 12 + 18 + 30 + 42.
150 is in the sequence because it is 18 + 30 + 42 + 60.
		

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];d=PrimeNextTwinAverage[c];a=a+b+c+d;If[PrimeQ[a-1]&&PrimeQ[a+1],AppendTo[lst,a]]],{n,2*8!}];lst
    With[{tpms=Mean/@Select[Partition[Prime[Range[10000]],2,1],#[[2]]- #[[1]] ==2&]},Total/@Select[Partition[tpms,4,1],MemberQ[tpms,Total[#]]&]] (* Harvey P. Dale, Apr 27 2012 *)

Formula

{A014574(i): A014574(i) = Sum_{k=0..3} A014574(j+k) for some k,j}.

A160919 Averages of twin prime pairs that are sums of 5 consecutive averages of twin prime pairs.

Original entry on oeis.org

108, 570, 858, 1452, 3330, 6792, 7458, 9420, 9630, 10710, 10890, 13722, 17388, 18120, 25032, 27582, 27792, 34032, 68712, 68898, 72270, 76830, 78978, 81372, 89820, 90402, 95232, 99708, 104472, 119772, 122868, 125790, 138078, 165312
Offset: 1

Views

Author

Keywords

Examples

			Averages of twin prime pairs: 4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, ...
108 = 6 + 12 + 18 + 30 + 42, 570 = 72 + 102 + 108 + 138 + 150, ...
		

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]; d=PrimeNextTwinAverage[c];e=PrimeNextTwinAverage[d]; a=a+b+c+d+e; If[PrimeQ[a-1]&&PrimeQ[a+1],AppendTo[lst,a]]],{n,3*8!}];lst
    Select[Total/@(Partition[Mean/@Select[Partition[Prime[Range[10000]],2,1],#[[2]]-#[[1]]==2&],5,1]),AllTrue[#+{1,-1},PrimeQ]&] (* Harvey P. Dale, Sep 26 2024 *)
Showing 1-3 of 3 results.