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 A348347 #22 Oct 24 2021 17:11:02 %S A348347 1,5,92,13,208,47,512,149,1688,145,6686,539,4106,757,9970,1217,16012, %T A348347 881,56194,2441,53576,3343,111992,2917,152734,2053,49376,6791,839522, %U A348347 4985,114118,30097,567302,17209,493618,33613,991976,28097,758932,91099,1898368,36271 %N A348347 Smallest k such that in the pairs of numbers j*k +- 1, none is prime for 1 <= j < n but at least one is prime for j = n; or 0 if no such k exists. %C A348347 Smallest k such that A103689(k) = n. %C A348347 a(85) > 10^9 (unless a(85) = 0). %H A348347 Pontus von Brömssen, <a href="/A348347/b348347.txt">Table of n, a(n) for n = 1..84</a> %e A348347 a(3) = 92 because none of 92 +- 1 and 2*92 +- 1 are prime but 3*92 + 1 is prime; and for k < 92, either 3*k +- 1 are also both not prime, or some j*k +- 1 is prime for j < 3. %o A348347 (Python) %o A348347 from sympy import isprime %o A348347 def A348347(n): %o A348347 k = 1 %o A348347 while 1: %o A348347 m = 1 %o A348347 while m <= n and not (isprime(m*k-1) or isprime(m*k+1)): m += 1 %o A348347 if m == n: return k %o A348347 k += 1 %o A348347 (PARI) f(n) = my(k=1); while (!isprime(k*n+1) && !isprime(k*n-1), k++); k; \\ A103689 %o A348347 a(n) = my(k=1); while (f(k) != n, k++); k; \\ _Michel Marcus_, Oct 18 2021 %Y A348347 Cf. A103689. %K A348347 nonn %O A348347 1,2 %A A348347 _Pontus von Brömssen_, Oct 13 2021