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.
%I A307775 #14 Dec 17 2020 11:53:54 %S A307775 3,2,5,4,2,10,3,6,10,4,6,4,9,6,15,21,13,3,15,6,6,8,6,5,4,11,5,26,6,2, %T A307775 2,6,6,11,4,5,4,6,14,6,20,9,46,5,9,4,14,11,9,20,21,6,6,4,6,14,4,9,9,3, %U A307775 21,5,35,15,14,2,5,30,36,4,5,14,2,29,21,10,39,8,4,5,9,3 %N A307775 Smallest k > 1 such that A014574(n)*k is in A014574. %H A307775 Robert Israel, <a href="/A307775/b307775.txt">Table of n, a(n) for n = 1..10000</a> %p A307775 P:= select(isprime, {seq(i,i=3..10^7,2)}): %p A307775 A14574:= sort(convert(map(`+`,P,1) intersect map(`+`,P,-1),list)): %p A307775 f:= proc(n) local k,v,kv; %p A307775 v:= A14574[n]: %p A307775 for k from 2 do %p A307775 kv:= k*v; %p A307775 if kv > 10^7 then if isprime(kv-1) and isprime(kv+1) then return k fi %p A307775 elif member(kv,A14574) then return k %p A307775 fi %p A307775 od %p A307775 end proc: %p A307775 map(f, [$1..100]); # _Robert Israel_, Dec 17 2020 %t A307775 twinMidQ[n_] := AllTrue[{-1, 1} + n, PrimeQ]; f[n_] := Module[{k = 2}, While[! twinMidQ[k*n], k++]; k]; f /@ Select[Range[10^3], twinMidQ] (* _Amiram Eldar_, Jul 05 2019 *) %o A307775 (PARI) isok2(n) = isprime(n-1) && isprime(n+1); %o A307775 k(n) = my(k=2); while (! isok2(n*k), k++); k; %o A307775 lista(nn) = for (n=1, nn, if (isok2(n), print1(k(n), ", "))); \\ _Michel Marcus_, Apr 28 2019 %Y A307775 Cf. A014574. %K A307775 nonn %O A307775 1,1 %A A307775 _Dmitry Kamenetsky_, Apr 28 2019