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!)
A092970 Smallest prime of the form n!/k + 1. k < = n, or 0 if no such prime exists. 3
2, 2, 3, 7, 31, 181, 1009, 13441, 45361, 453601, 3991681, 39916801, 566092801, 10897286401, 130767436801, 2988969984001, 25406244864001, 0, 8109673360588801, 304112751022080001, 2688996956405760001 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(10) = 453601 = 10!/8 + 1, as 10!/10 + 1 and 10!/9 + 1 are both composite.
MATHEMATICA
Table[SelectFirst[Reverse[n!/Range[n]+1], PrimeQ], {n, 30}]/.(Missing[ "NotFound"] -> 0) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 15 2019 *)
PROG
(PARI) a(n)=for (i=1, n, if(isprime(n!/(n-i+1)+1), return((n!/(n-i+1)+1))))
CROSSREFS
Sequence in context: A180996 A307503 A087522 * A052449 A053413 A232542
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 26 2004
EXTENSIONS
Corrected and extended by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004
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 May 12 01:20 EDT 2024. Contains 372431 sequences. (Running on oeis4.)