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!)
A033933 Least nonnegative m such that n! - m is prime. 20
0, 1, 1, 7, 1, 1, 31, 13, 11, 13, 1, 23, 1, 47, 53, 59, 41, 101, 31, 31, 73, 89, 73, 149, 37, 43, 101, 31, 1, 61, 1, 1, 193, 113, 127, 97, 1, 73, 83, 131, 79, 109, 109, 53, 89, 79, 103, 59, 97, 179, 67, 59, 127, 61, 461, 277, 109, 137, 139, 71, 71, 101, 359, 127, 317, 191, 251, 103, 97, 751, 163, 373, 199, 167, 157, 491, 317 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,4
COMMENTS
Conjecture: for n >= 3, a(n) is 1 or a prime. - Amarnath Murthy, Mar 19 2002
a(n) is not divisible by any prime <= n. If a(n) > 1 is composite, then a(n) > n^2. There are no entries up to n = 2000 with a(n) > n^2, and there may be none. - Robert Israel, Jul 20 2014
LINKS
Hans Havermann, Table of n, a(n) for n = 2..2000 (terms 2..500 from T. D. Noe)
MAPLE
0, seq(n! - prevprime(n!), n=3..100); # Robert Israel, Jul 15 2014
MATHEMATICA
p[n_] := Module[{nf = n!}, nf - NextPrime[nf, -1]]; Join[{0}, Table[p[n], {n, 3, 70}]] (* Harvey P. Dale, Jul 07 2012 *)
PROG
(PARI) for(n=2, 70, k=0; while(!isprime(n!-k), k++); print1(k, ", "))
(PARI) vector(66, t, my(n=t+1, f=n!); f-precprime(f)) \\ Joerg Arndt, Jul 19 2014
(Sage)
def A033933(n):
if n < 3: return 0
f = factorial(n)
return f - previous_prime(f)
[A033933(n) for n in (2..78)] # Peter Luschny, Jul 20 2014
CROSSREFS
Sequence in context: A142465 A248829 A154337 * A108267 A156916 A173584
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from Jud McCranie
a(21) onwards from Wouter Meeussen
Corrected by Rick L. Shepherd, Nov 06 2002
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 April 16 19:05 EDT 2024. Contains 371751 sequences. (Running on oeis4.)