cp's OEIS Frontend

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.

A083663 Least k such that k*n!-1 is prime.

This page as a plain text file.
%I A083663 #13 Apr 26 2025 13:49:26
%S A083663 3,2,1,1,2,1,1,5,3,4,4,1,5,1,2,9,2,30,30,5,44,2,7,13,5,3,11,2,14,1,7,
%T A083663 1,1,30,16,22,36,1,38,13,22,6,36,17,36,40,31,25,38,13,4,32,22,154,10,
%U A083663 27,7,121,9,33,19,19,4,26,100,18,46,75,21,11,34,75,38,7,45,3,19,13,59,39,72
%N A083663 Least k such that k*n!-1 is prime.
%H A083663 Robert Israel, <a href="/A083663/b083663.txt">Table of n, a(n) for n = 1..600</a>
%F A083663 a(n) = A053989(n!) = (A084730(n)+1)/n!. - _Robert Israel_, Nov 23 2023
%p A083663 f:= proc(n) local w,k;
%p A083663 w:= n!;
%p A083663 for k from 1 do
%p A083663   if isprime(k*w-1) then return k fi
%p A083663 od
%p A083663 end proc:
%p A083663 map(f, [$1..100]); # _Robert Israel_, Nov 23 2023
%t A083663 lkp[n_]:=Module[{k=1,nf=n!},While[!PrimeQ[k*nf-1],k++];k]; Array[lkp,100] (* _Harvey P. Dale_, Apr 26 2025 *)
%o A083663 (PARI) a(n)=if(n<1,0,k=1; while(isprime(k*n!-1)==0,k++); k)
%Y A083663 Cf. A035093, A053989, A084730.
%K A083663 nonn
%O A083663 1,1
%A A083663 _Benoit Cloitre_, Jun 14 2003