OFFSET
1,1
FORMULA
a(n) = Min{x : A057467(x)=2n}.
EXAMPLE
n=21: a(21)=247099, the consecutive prime triple {247099,247141,247183} determines {42,42} successive differences, the GCD of which is 2n=42.
MATHEMATICA
f[x_] := GCD[Prime[x+1]-Prime[x], Prime[x+2]-Prime[x+1]]; t = Table[0, {256} ]; Do[ c = f[n]; If[c <257 && t[[b]] == 0, t[[c]] = n], {n, 2, 1000000} ]; t Prime[t]
PROG
(PARI) fp(n, vp) = {for (k=1, #vp-2, if (gcd(vp[k+1] - vp[k], vp[k+2] - vp[k+1]) == 2*n, return (vp[k])); ); }
lista(nn) = {my(vp = primes(10000)); for (n=1, nn, my(p = fp(n, vp)); if (p, print1(p, ", "), break); ); } \\ Michel Marcus, Aug 29 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer and Benoit Cloitre, Apr 12 2002
EXTENSIONS
Corrected and extended by Michel Marcus, Aug 29 2019
STATUS
approved