login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245696 Least number k >= 0 such that (n!-k)/n is prime. 3
0, 4, 5, 42, 7, 8, 279, 130, 121, 156, 13, 322, 15, 752, 901, 1062, 779, 2020, 651, 682, 1679, 2136, 1825, 3874, 999, 1204, 2929, 930, 31, 1952, 33, 34, 6755, 4068, 4699, 3686, 39, 2920, 3403, 5502, 3397, 4796, 4905, 2438, 4183, 3792, 5047, 2950, 4947, 9308, 3551, 3186, 6985, 3416, 26277, 16066, 6431, 8220, 8479, 4402, 4473, 6464, 23335, 8382, 21239, 12988, 17319, 7210, 6887, 54072, 11899, 27602 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,2

COMMENTS

a(n) < n! for all n > 2.

a(n) = n times (least m >= 0 such that (n-1)!-m is prime) = n*A033933(n-1). - Jens Kruse Andersen, Jul 30 2014 (This shows that a(n) always exists.)

LINKS

Jens Kruse Andersen, Table of n, a(n) for n = 3..2001

EXAMPLE

(6!-42)/6 = 113 is prime. Since 42 is the smallest number to produce a prime, a(6) = 42.

PROG

(PARI)

a(n)=for(k=0, 10^6, s=(n!-k)/n; if(floor(s)==s, if(ispseudoprime(s), return(k))))

n=3; while(n<100, print1(a(n), ", "); n++)

CROSSREFS

Cf. A033933, A245695, A245697.

Sequence in context: A223528 A189744 A241279 * A317139 A123304 A270129

Adjacent sequences:  A245693 A245694 A245695 * A245697 A245698 A245699

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 2 09:22 EDT 2021. Contains 346422 sequences. (Running on oeis4.)