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 A231631 #12 Apr 19 2019 16:58:14 %S A231631 0,1,1,2,1,3,1,2,3,2,1,4,1,3,3,2,1,4,1,2,3,2,1,3,2,3,6,2,1,3,1,2,3,6, %T A231631 2,3,1,2,6,3,1,5,1,6,5,2,1,3,3,2,4,2,1,3,2,2,6,2,1,11,1,5,5,3,2,3,1,5, %U A231631 3,2,1,6,1,7,3,2,2,4,1,2,6,4,1,3,2,3,4,2,1,3,2,2,3,3,6,7,1,2,3,2 %N A231631 Least positive integer k < n with k!*(n-k) + 1 prime, or 0 if such an integer k does not exist. %C A231631 Conjecture: 0 < a(n) < sqrt(n)*(log n) for all n > 2. %C A231631 See also the conjecture in A231516. %H A231631 Zhi-Wei Sun, <a href="/A231631/b231631.txt">Table of n, a(n) for n = 1..10000</a> %e A231631 a(4) = 2 since 1!*3 + 1 = 4 is not prime, but 2!*2 + 1 = 5 is prime. %t A231631 Do[Do[If[PrimeQ[x!*(n-x)+1],Print[n," ",x];Goto[aa]],{x,1,n-1}]; %t A231631 Print[n," ",0];Label[aa];Continue,{n,1,100}] %t A231631 lpik[n_]:=Module[{k=1},While[!PrimeQ[k!(n-k)+1],k++];k]; Join[{0},Array[ lpik,100,2]] (* _Harvey P. Dale_, Apr 19 2019 *) %Y A231631 Cf. A000040, A000142, A231201, A231516, A231555, A231561, A231557 %K A231631 nonn %O A231631 1,4 %A A231631 _Zhi-Wei Sun_, Nov 11 2013