|
|
A050299
|
|
Numbers n such that ((n-1)! + 1)/n is prime.
|
|
9
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Except for the first term, all terms are primes because for n > 1, n divides (n-1)! + 1 iff n is prime. There are no other terms up to 6550 and the corresponding next prime has more than 22150 digits.
No more terms below 30941.
|
|
LINKS
|
J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, Combinatorial and Additive Number Theory, CANT 2011 and 2012, Springer Proc. in Math. & Stat., vol. 101 (2014), pp. 243-255.
|
|
FORMULA
|
|
|
EXAMPLE
|
7 is in the sequence because (6!+1)/7=103 is prime.
|
|
MATHEMATICA
|
v={1}; Do[If[PrimeQ[((Prime[n]-1)!+1)/Prime[n]], v=Append[v, Prime[n]]; Print[v]], {n, 845}]
|
|
PROG
|
(PARI) is(n)=((n-1)!+1)%n==0 && isprime(((n-1)!+1)/n) \\ Anders Hellström, Nov 22 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|