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 A057217 #18 Feb 23 2025 02:40:22 %S A057217 1,1,2,1,2,1,3,2,2,1,2,1,3,2,2,1,3,1,4,2,2,1,2,4,3,2,3,1,2,1,7,3,2,6, %T A057217 2,1,3,3,2,1,2,1,4,2,3,1,3,2,5,2,2,1,2,2,3,2,5,1,11,1,3,3,2,5,2,1,4,2, %U A057217 2,1,5,1,3,2,2,3,3,1,14,5,2,1,2,4,7,2,3,1,2,2,3,8,5,7,2,1,11,2,2,1,3,1,3 %N A057217 a(n) = smallest positive integer k such that 1 + n*k! is a prime. %H A057217 Amiram Eldar, <a href="/A057217/b057217.txt">Table of n, a(n) for n = 1..10000</a> %F A057217 a(n) = Min{k | 1 + nk! is prime}. %e A057217 For n = 7, 1 + 7*k! = {8,15,43,169,...}. The smallest k that gives prime is 3 and the obtained prime is 43. %e A057217 For n = 267, the smallest k! is 31! for which 1 + 267*k! is prime and the obtained prime is 65782709233423382541804503040000001. %t A057217 spi[n_]:=Module[{k=1},While[!PrimeQ[1+k!*n],k++];k]; Array[spi,110] (* _Harvey P. Dale_, May 01 2016 *) %o A057217 (PARI) a(n) = k = 1; while (!isprime(1+n*k!), k++); k; \\ _Michel Marcus_, Feb 20 2016 %K A057217 nonn %O A057217 1,3 %A A057217 _Labos Elemer_, Sep 27 2000 %E A057217 Offset corrected by _Michel Marcus_, Feb 20 2016