login
A231820
Least positive k such that n*k! - 1 is a prime, or 0 if no such k exists.
3
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, 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, 2, 2, 7, 1, 8, 1, 2, 2, 3, 3, 2, 1, 5, 2, 8, 1, 3, 4, 2, 4, 15, 1
OFFSET
1,1
LINKS
MAPLE
f:= proc(n) local k;
for k from 1 do if isprime(n*k!-1) then return k fi od
end proc:
map(f, [$1..100]); # Robert Israel, Oct 29 2019
MATHEMATICA
Table[k = 1; While[! PrimeQ[k!*n - 1], k++]; k, {n, 100}] (* T. D. Noe, Nov 18 2013 *)
PROG
(PARI) a(n) = my(k=1); while (!isprime(n*k! - 1), k++); k; \\ Michel Marcus, Oct 29 2019
CROSSREFS
Cf. A035092 (least k such that k*(n^2)+1 is a prime).
Cf. A175763 (least k such that k*(n^n)+1 is a prime).
Cf. A035093 (least k such that k*n!+1 is a prime).
Cf. A193807 (least k such that n*(k^2)+1 is a prime).
Cf. A231119 (least k such that n*(k^k)+1 is a prime).
Cf. A057217 (least k such that n*k!+1 is a prime).
Cf. A034693 (least k such that n*k +1 is a prime).
Cf. A231819 (least k such that k*(n^2)-1 is a prime).
Cf. A231818 (least k such that k*(n^n)-1 is a prime).
Cf. A083663 (least k such that k*n!-1 is a prime).
Cf. A231734 (least k such that n*(k^2)-1 is a prime).
Cf. A231735 (least k such that n*(k^k)-1 is a prime).
Cf. A053989 (least k such that n*k -1 is a prime).
Sequence in context: A344893 A338946 A083716 * A010268 A181657 A172254
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Nov 13 2013
STATUS
approved