login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245695 Least number k >= 0 such that (n!+k)/n is prime. 3
1, 2, 0, 4, 25, 42, 49, 88, 207, 170, 121, 12, 377, 938, 285, 688, 391, 558, 703, 1780, 609, 682, 713, 2328, 3275, 1066, 1593, 28, 1943, 6690, 3317, 4064, 2607, 1258, 3395, 2196, 4847, 38, 1677, 3880, 2173, 42, 4171, 3124, 2115, 10994, 4747, 11184, 2597, 4150, 3111, 14092, 2809, 3834, 12265, 3976, 8493, 6206, 16697, 17580, 16531, 47678, 8253, 17344, 4355, 12738, 18961, 4964, 5727, 9170, 9869, 61704, 7373 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = M*n for some integer M >= 0.
a(n) = n times least m >= 0 such that (n-1)!+m is prime. - Jens Kruse Andersen, Jul 30 2014
LINKS
FORMULA
a(n) = n*A033932(n-1), except a(3) = 0 where A033932 demands positive values. - Jens Kruse Andersen, Jul 30 2014
EXAMPLE
(4!+0)/4 = 6 is not prime.
(4!+1)/4 = 25/4 is not prime.
(4!+2)/4 = 26/4 is not prime.
(4!+3)/4 = 27/4 is not prime.
(4!+4)/4 = 7 is prime. Thus a(4) = 4.
PROG
(PARI)
a(n)=for(k=0, 10^6, s=(n!+k)/n; if(floor(s)==s, if(ispseudoprime(s), return(k))))
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
Sequence in context: A199852 A055978 A356189 * A374286 A069025 A356815
KEYWORD
nonn
AUTHOR
Derek Orr, Jul 29 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 13:05 EDT 2024. Contains 375938 sequences. (Running on oeis4.)