OFFSET
3,1
COMMENTS
The smallest distance between 16-twins [A052380(8)] is 18 and its minimal increment is 6.
a(n) = p is the smallest prime introducing the prime quadruple [p, p+16, p+6n, p+6n+16], which has a difference pattern [16, 6n-16, 16].
LINKS
Amiram Eldar, Table of n, a(n) for n = 3..1002
EXAMPLE
a(9) = p = 4057 gives [4057, 4073, 4111, 4127] quadruple and [16, 38, 16] distance pattern with 4 primes in the medial gap.
MATHEMATICA
seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 16] // Flatten; pp = p[[i]]; dd = Differences[pp]/6 - 2; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[12000] (* Amiram Eldar, Mar 05 2025 *)
PROG
(PARI) list(len) = {my(s = vector(len), c = 0, p1 = 2, q1 = 0, q2, d); forprime(p2 = 3, , if(p2 == p1 + 16, q2 = p1; if(q1 > 0, d = (q2 - q1)/6 - 2; if(d <= len && s[d] == 0, c++; s[d] = q1; if(c == len, return(s)))); q1 = q2); p1 = p2); } \\ Amiram Eldar, Mar 05 2025
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Labos Elemer, Mar 07 2000
EXTENSIONS
Incorrect 43207 removed and more terms from Sean A. Irvine, Nov 06 2021
Name and offset corrected by Amiram Eldar, Mar 05 2025
STATUS
approved