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 A093868 #17 Feb 04 2023 04:05:14 %S A093868 2,3,2,3,11,5,13,7,17,11,23,11,53,13,29,17,67,17,37,19,41,23,47,23, %T A093868 101,53,53,29,59,29,61,31,67,67,71,37,73,37,79,41,83,41,173,43,89,47, %U A093868 281,47,97,101,101,53,107,53,109,113,113,59,353,59,367,61,127,127,131,67,269 %N A093868 Smallest prime that differs from a multiple of n by unity. %C A093868 Numbers n such that a(n-1)=a(n+1)=n are A025584 (primes p such that p-2 is not a prime). - _Rick L. Shepherd_, Aug 23 2004 %H A093868 Robert Israel, <a href="/A093868/b093868.txt">Table of n, a(n) for n = 1..10000</a> %F A093868 a(n) = min(A034694(n), A038700(n)) for all n >= 1. - _Rick L. Shepherd_, Aug 23 2004 %p A093868 f:= proc(n) local j,k; %p A093868 for k from 1 do %p A093868 for j in [-1,1] do %p A093868 if isprime(k*n+j) then return k*n+j fi %p A093868 od od %p A093868 end proc: %p A093868 map(f, [$1..100]); # _Robert Israel_, Nov 07 2019 %t A093868 a[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[Divisible[p-1, n] || Divisible[p+1, n], Return[p]]]]; %t A093868 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Feb 04 2023 *) %o A093868 (PARI) a(n) = forprime(p=2, , if (!((p+1) % n) || !((p-1) % n), return (p))); \\ _Michel Marcus_, Aug 08 2014 %Y A093868 Cf. A093869. %Y A093868 Cf. A034694 (Smallest prime == 1 (mod n)), A038700 (Smallest prime == -1 (mod n)). %K A093868 nonn,look %O A093868 1,1 %A A093868 _Amarnath Murthy_, Apr 20 2004 %E A093868 More terms from _Rick L. Shepherd_, Aug 23 2004