The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A238505 a(n) is the minimum number such that a(n)!/n! - 1 is prime (or 0 if no such number exists). 1
3, 3, 3, 4, 6, 6, 9, 8, 10, 11, 12, 12, 14, 14, 16, 17, 19, 18, 20, 20, 22, 24, 25, 24, 41, 27, 30, 29, 34, 30, 32, 32, 42, 36, 36, 44, 39, 38, 40, 42, 42, 42, 46, 44, 46, 47, 49, 48, 52, 51, 58, 58, 54, 54, 56, 57, 59, 60, 60, 60, 71, 62, 65, 65, 66, 67, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
If a(n) = 0, all numbers m!/n! - 1 for integer m > n are composite.
Up to n = 2500, a(n) > 0.
LINKS
EXAMPLE
n = 1: 2!/1! - 1 = 1 is not prime, 3!/1! - 1 = 5 is prime. So a(1) = 3;
n = 6: 7!/6! - 1 = 6, 8!/6! - 1 = 55, 9!/6! - 1 = 503. 6 and 55 are not prime. 503 is prime. So a(6) = 9.
MATHEMATICA
Table[i = n; a = n; While[! PrimeQ[a - 1], i++; a = a*i]; i, {n, 1, 67}]
PROG
(PARI) a(n) = {m = n; while(! isprime(m!/n! -1), m++); m; } \\ Michel Marcus, Mar 06 2014
CROSSREFS
Sequence in context: A334940 A011978 A167025 * A259897 A091849 A035567
KEYWORD
nonn
AUTHOR
Lei Zhou, Feb 27 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 June 12 12:32 EDT 2024. Contains 373331 sequences. (Running on oeis4.)