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.

A070018 a(n) = smallest prime p = prime(k) such that gcd( prime(k+1) - prime(k), prime(k+2) - prime(k+1) ) = 2n.

This page as a plain text file.
%I A070018 #23 Aug 29 2019 09:53:33
%S A070018 3,89,47,1823,1627,199,5939,5591,15823,83117,259033,16763,365851,
%T A070018 1074167,69593,1625027,2541289,255767,11772613,3312227,247099,
%U A070018 23374859,25767389,3565931,21369059,15340943,6314393,59859131,101996837,4911251,70136597,166185431,12012677,198429983,247837313,23346737,298626077
%N A070018 a(n) = smallest prime p = prime(k) such that gcd( prime(k+1) - prime(k), prime(k+2) - prime(k+1) ) = 2n.
%F A070018 a(n) = Min{x : A057467(x)=2n}.
%e A070018 n=21: a(21)=247099, the consecutive prime triple {247099,247141,247183} determines {42,42} successive differences, the GCD of which is 2n=42.
%t A070018 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]
%o A070018 (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])););}
%o A070018 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
%Y A070018 Cf. A001223, A057467.
%Y A070018 Different from A054682?
%K A070018 nonn
%O A070018 1,1
%A A070018 _Labos Elemer_ and _Benoit Cloitre_, Apr 12 2002
%E A070018 Corrected and extended by _Michel Marcus_, Aug 29 2019