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-2 of 2 results.

A079016 Suppose p and q = p+12 are primes. Define the difference pattern of (p,q) to be the successive differences of the primes in the range p to q. There are 14 possible difference patterns, namely [12], [2,10], [4,8], [6,6], [8,4], [10,2], [2,4,6], [2,6,4], [4,2,6], [4,6,2], [6,2,4], [6,4,2], [2,4,2,4] and [4,2,4,2]. Sequence gives smallest value of p for each difference pattern, sorted by magnitude.

Original entry on oeis.org

5, 7, 17, 19, 29, 31, 47, 67, 89, 137, 139, 199, 397, 1601
Offset: 1

Views

Author

Labos Elemer, Jan 24 2003

Keywords

Examples

			p=1601, q=1613 has difference pattern [6,2,4] and {1601,1607,1609,1613} is the corresponding consecutive prime 4-tuple.
		

Crossrefs

A022006(1)=5, A022007(1)=7, A078847(1)=17, A078851(1)=19, A078848(1)=29, A078855(1)=31, A047948(1)=47, A078850(1)=67, A031930(1)=A000230(6)=199, A046137(1)=7, A078853(1)=1601.

Programs

  • Mathematica
    Function[s, Function[t, Union@ Flatten@ Map[s[[First@ Position[t, #]]] &, {{12}, {2, 10}, {4, 8}, {6, 6}, {8, 4}, {10, 2}, {2, 4, 6}, {2, 6, 4}, {4, 2, 6}, {4, 6, 2}, {6, 2, 4}, {6, 4, 2}, {2, 4, 2, 4}, {4, 2, 4, 2}}]]@ Map[Differences@ Select[Range[#, # + 12], PrimeQ] &, s]]@ Select[Prime@ Range[10^3], PrimeQ[# + 12] &] (* Michael De Vlieger, Feb 25 2017 *)

A079022 Suppose p and q = p + 2*n are primes. Define the difference pattern of (p, q) to be the successive differences of the primes in the range p to q. There are a(n) possible difference patterns.

Original entry on oeis.org

1, 2, 3, 5, 5, 14, 15, 17, 49, 56, 51, 175, 150, 148, 666, 581, 561, 1922, 1449
Offset: 1

Views

Author

Labos Elemer, Jan 24 2003

Keywords

Examples

			n=4, d=8: there are five difference patterns: [8], [6,2], [2,6], [2,4,2], [2,2,4]. The last pattern is singular with prime 4-tuple {p=3,5,7,11=q}.
		

Crossrefs

See A079016, A079017, A079018, A079019, A079020, A079021 for cases n=6 through 11.

Programs

  • Mathematica
    t[x_] := Table[Length[FactorInteger[x+j]], {j, 0, d}]; p[x_] := Flatten[Position[Table[PrimeQ[x+2*j], {j, 0, d/2}], True]]; dp[x_] := Delete[RotateLeft[p[x]]-p[x], -1]; k=0; d=12; {n1=2, n2=2000, h0=PrimePi[n1], h=PrimePi[n2]}; t1={}; Do[s=Prime[n]; If[PrimeQ[s + d], k=k+1; Print[{k, s, pt=2*dp[s]}]; t1=Union[t1, {2*dp[s]}], 1], {n, h0, h}]; {d, n1, n2, Length[t1], t1} (* program for d=12; partition list is enlargable if t1={} is replaced with already obtained set *)

Extensions

a(14)-a(17) and a(19) from David A. Corneth, Aug 30 2019
a(18) from Jinyuan Wang, Feb 16 2021
Showing 1-2 of 2 results.