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 A307833 #20 Jul 17 2019 18:43:46 %S A307833 2,2,2,2,2,2,3,5,3,4,2,3,2,2,2,2,2,2,2,3,5,2,2,4,3,3,2,2,2,2,2,3,2,4, %T A307833 3,2,2,2,3,6,3,2,2,2,3,4,2,2,2,3,2,3,3,4,3,4,4,5,2,3,4,2,3,2,3,2,2,4, %U A307833 3,2,2,5,2,4,4,4,4,3,2,5,2,3,4,2,4,4,2,2,2,4,2,6,4,2,2,5,4,6 %N A307833 Smallest k > 1 such that A014574(n)*k is adjacent to a prime. %C A307833 It is perhaps surprising that the values in this sequence are so small. For n < 8000 the largest value of a(n) is 20, which occurs for n = 4928. Also for n < 8000, a(n) is 2 on 2449 occasions. %C A307833 a(n)=2 if and only if A014574(n)+1 is in A038869 or A014574(n)-1 is in A045536. - _Robert Israel_, Jul 17 2019 %H A307833 Robert Israel, <a href="/A307833/b307833.txt">Table of n, a(n) for n = 1..10000</a> %F A307833 a(n) = A309120(A014574(n)). - _Robert Israel_, Jul 17 2019 %e A307833 72*5 = 360, which is adjacent to the prime 359, so a(8) = 5. %p A307833 P:= {seq(ithprime(i),i=1..10^4)}: %p A307833 A014574:= sort(convert(map(t -> t+1, P intersect map(`-`,P,2)),list)): %p A307833 f:= proc(m) local k; %p A307833 for k from 2 do %p A307833 if isprime(k*m-1) or isprime(k*m+1) then return k fi %p A307833 od %p A307833 end proc: %p A307833 map(f, A014574); # _Robert Israel_, Jul 17 2019 %t A307833 primeNearQ[n_] := AnyTrue[{-1, 1} + n, PrimeQ]; twinMidQ[n_] := AllTrue[{-1, 1} + n, PrimeQ]; f[n_] := Module[{k = 2}, While[! primeNearQ[k*n], k++]; k]; f /@ Select[Range[10^4], twinMidQ] (* _Amiram Eldar_, Jul 05 2019 *) %o A307833 (PARI) isok2(n) = isprime(n-1) && isprime(n+1); %o A307833 k(n) = my(k=2); while (! (isprime(n*k-1) || isprime(n*k+1)), k++); k; %o A307833 lista(nn) = for (n=1, nn, if (isok2(n), print1(k(n), ", "))); \\ _Michel Marcus_, May 01 2019 %Y A307833 Cf. A014574, A038869, A045536, A307775, A309120. %K A307833 nonn %O A307833 1,1 %A A307833 _Dmitry Kamenetsky_, May 01 2019