OFFSET
1,3
COMMENTS
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..1000
EXAMPLE
(1! + 3)/1 = 4 is not prime.
(2! + 3)/2 = 5/2 is not prime.
(3! + 3)/3 = 3 is prime. Thus a(3) = 3.
PROG
(PARI)
a(n)=for(k=1, n, s=(k!+n)/k; if(floor(s)==s, if(ispseudoprime(s), return(k))))
n=1; while(n<150, print1(a(n), ", "); n++)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jul 31 2014
EXTENSIONS
Corrected by Jens Kruse Andersen, Aug 03 2014
STATUS
approved