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.

A231820 Least positive k such that n*k! - 1 is a prime, or 0 if no such k exists.

This page as a plain text file.
%I A231820 #14 Oct 29 2019 08:56:32
%S A231820 3,2,1,1,3,1,2,1,2,2,4,1,4,1,2,2,3,1,2,1,2,2,3,1,3,5,2,3,3,1,2,1,3,2,
%T A231820 4,2,2,1,3,2,4,1,3,1,2,4,3,1,2,6,2,2,3,1,2,5,2,3,3,1,10,1,4,2,3,2,3,1,
%U A231820 2,2,7,1,8,1,2,2,3,3,2,1,5,2,8,1,3,4,2,4,15,1
%N A231820 Least positive k such that n*k! - 1 is a prime, or 0 if no such k exists.
%H A231820 Robert Israel, <a href="/A231820/b231820.txt">Table of n, a(n) for n = 1..10000</a>
%p A231820 f:= proc(n) local k;
%p A231820 for k from 1 do if isprime(n*k!-1) then return k fi od
%p A231820 end proc:
%p A231820 map(f, [$1..100]); # _Robert Israel_, Oct 29 2019
%t A231820 Table[k = 1; While[! PrimeQ[k!*n - 1], k++]; k, {n, 100}] (* _T. D. Noe_, Nov 18 2013 *)
%o A231820 (PARI) a(n) = my(k=1); while (!isprime(n*k! - 1), k++); k; \\ _Michel Marcus_, Oct 29 2019
%Y A231820 Cf. A035092 (least k such that k*(n^2)+1 is a prime).
%Y A231820 Cf. A175763 (least k such that k*(n^n)+1 is a prime).
%Y A231820 Cf. A035093 (least k such that k*n!+1    is a prime).
%Y A231820 Cf. A193807 (least k such that n*(k^2)+1 is a prime).
%Y A231820 Cf. A231119 (least k such that n*(k^k)+1 is a prime).
%Y A231820 Cf. A057217 (least k such that n*k!+1    is a prime).
%Y A231820 Cf. A034693 (least k such that n*k +1    is a prime).
%Y A231820 Cf. A231819 (least k such that k*(n^2)-1 is a prime).
%Y A231820 Cf. A231818 (least k such that k*(n^n)-1 is a prime).
%Y A231820 Cf. A083663 (least k such that k*n!-1    is a prime).
%Y A231820 Cf. A231734 (least k such that n*(k^2)-1 is a prime).
%Y A231820 Cf. A231735 (least k such that n*(k^k)-1 is a prime).
%Y A231820 Cf. A053989 (least k such that n*k -1    is a prime).
%K A231820 nonn
%O A231820 1,1
%A A231820 _Alex Ratushnyak_, Nov 13 2013