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.

A342502 Gaps between first elements of prime quintuples of the form (p, p+2, p+6, p+12, p+14). The quintuples are abutting: twin/cousin/sexy/twin pairs.

This page as a plain text file.
%I A342502 #25 Feb 16 2025 08:34:01
%S A342502 12,210,1050,330,1920,390,720,150,22950,10710,780,5040,27060,26040,
%T A342502 2340,13440,8880,360,1950,41370,17790,3630,4320,6510,870,76620,15210,
%U A342502 21540,5760,29100,2340,66990,1950,3360,5370,16800,6930,40530,4230,3570,15510,10320
%N A342502 Gaps between first elements of prime quintuples of the form (p, p+2, p+6, p+12, p+14). The quintuples are abutting: twin/cousin/sexy/twin pairs.
%H A342502 T. Forbes, <a href="http://anthony.d.forbes.googlepages.com/adf.htm">Prime k-tuplets</a>
%H A342502 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeTriplet.html">Prime Triplet</a>.
%F A342502 a(n) = A078946(n) - A078946(n-1) for n >= 2.
%F A342502 a(n) == 0 (mod 30) for n>1.
%e A342502 The first 4 terms of the sequence are 12, 210, 1050, 330, since the gaps between first elements of the first five quintuples {5,7,11,17,19}, {17,19,23,29,31}, {227,229,233,239,241}, {1277,1279,1283,1289,1291}, {1607,1609,1613,1619,1621} are, 17-5=12, 227-17=210, etc.
%p A342502 b:= proc(n) option remember; local p; p:= `if`(n=1, 1, b(n-1));
%p A342502       do p:= nextprime(p);
%p A342502          if andmap(isprime, [p+2, p+6, p+12, p+14]) then return p fi
%p A342502       od
%p A342502     end:
%p A342502 a:= n-> b(n+1)-b(n):
%p A342502 seq(a(n), n=1..65);  # _Alois P. Heinz_, Mar 14 2021
%t A342502 b[n_] := b[n] = Module[{p}, p = If[n == 1, 1, b[n-1]]; While[True, p = NextPrime[p]; If[AllTrue[{p+2, p+6, p+12, p+14}, PrimeQ], Return[p]]]];
%t A342502 a[n_] := b[n+1]-b[n];
%t A342502 Table[a[n], {n, 1, 65}] (* _Jean-François Alcover_, May 14 2022, after _Alois P. Heinz_ *)
%Y A342502 Cf. A078946.
%K A342502 nonn
%O A342502 1,1
%A A342502 _James S. DeArmon_, Mar 14 2021