login
This site is supported by donations 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. 13
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

T. D. Noe and Hans Havermann (T. D. Noe to 500), Table of n, a(n) for n = 2..2000

Index entries for sequences related to factorial numbers

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

Cf. A002982, A006990, A033932, A056752, A053714.

Sequence in context: A142465 A248829 A154337 * A108267 A156916 A173584

Adjacent sequences:  A033930 A033931 A033932 * A033934 A033935 A033936

KEYWORD

nonn,nice

AUTHOR

Jeff Burch

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 12 16:50 EST 2018. Contains 317116 sequences. (Running on oeis4.)