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.

A052358 Least prime in A031936 (lesser of 18-twins) whose distance to the next 18-twin is 2*n.

Original entry on oeis.org

20183, 20963, 14011, 26759, 7433, 45613, 4703, 21911, 26539, 18233, 6581, 4423, 7351, 37379, 55903, 25801, 4373, 6529, 35879, 119993, 22171, 12923, 10691, 52609, 14303, 20201, 16231, 21121, 103049, 17863, 6451, 34439, 50341, 76129, 3803, 23251, 15241, 14369
Offset: 9

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 18-twins [A052380(9)] is 18 and its minimal increment is 2.
a(n) = p is the first prime initiating [p, p+18, p+2n, p+2n+18] prime and [18, 2n-18, 18] d-pattern.

Examples

			a(11) = 14011 initiates prime quadruple [14011, 14029, 14033, 14051] and difference pattern [18, 4, 18].
a(15) = 4703 specifies prime quadruple  [4703, 4721, 4133, 4151] which includes 2 primes (4723, 4729) in the center, and difference pattern [18, 28, 18].
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 18] // Flatten; pp = p[[i]]; dd = Differences[pp]/2 - 8; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[12000] (* Amiram Eldar, Mar 05 2025 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 2, q1 = 0, q2, d); forprime(p2 = 3, , if(p2 == p1 + 18, q2 = p1; if(q1 > 0, d = (q2 - q1)/2 - 8; if(d <= len && s[d] == 0, c++; s[d] = q1; if(c == len, return(s)))); q1 = q2); p1 = p2);} \\ Amiram Eldar, Mar 05 2025

Extensions

a(21) corrected and missing terms inserted by Sean A. Irvine, Nov 07 2021
Name and offset corrected by Amiram Eldar, Mar 05 2025