login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A084730
Smallest prime of the form k*n! - 1.
2
2, 3, 5, 23, 239, 719, 5039, 201599, 1088639, 14515199, 159667199, 479001599, 31135103999, 87178291199, 2615348735999, 188305108991999, 711374856191999, 192071211171839999, 3649353012264959999, 12164510040883199999, 2248001455555215359999, 2248001455555215359999
OFFSET
2,1
LINKS
FORMULA
a(n) = A083663(n)*n! - 1 = A038700(n!). - Robert Israel, Nov 23 2023
EXAMPLE
a(8) = 161599 = 4*8! - 1 is a prime.
MAPLE
f:= proc(n) local w, k;
w:= n!;
for k from 1 do
if isprime(k*w-1) then return k*w-1 fi
od
end proc:
map(f, [$1..30]); # Robert Israel, Nov 23 2023
MATHEMATICA
Do[k = 1; While[ !PrimeQ[k*n! - 1], k++ ]; Print[k*n! - 1], {n, 2, 20}]
PROG
(PARI) a(n)=if(n<1, 0, k=1; while(isprime(k*n!-1)==0, k++); k*n!-1)
CROSSREFS
Sequence in context: A138655 A053708 A137070 * A117696 A256463 A279864
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 13 2003
EXTENSIONS
Corrected and extended by Benoit Cloitre, Jun 14 2003
STATUS
approved