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!)
A120621 Least positive k such that !n + k is prime, where !n is left factorial. 1
2, 1, 1, 1, 1, 3, 3, 3, 9, 3, 7, 9, 7, 13, 49, 27, 9, 37, 19, 33, 7, 93, 103, 9, 73, 27, 13, 27, 165, 49, 39, 93, 97, 27, 37, 39, 135, 7, 193, 249, 39, 103, 13, 33, 213, 129, 33, 13, 39, 115, 187, 19, 7, 387, 19, 489, 303, 63, 33, 235, 297, 495, 657, 465, 235, 193, 369, 129 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
MATHEMATICA
a[n_] := Module[{k = 1, lf = Sum[i!, {i, 0, n - 1}]}, While[!PrimeQ[lf + k], k++]; k]; Array[a, 100, 0] (* Amiram Eldar, Dec 24 2019 *)
CROSSREFS
Cf. A003422, A033932 (with n! instead of !n).
Sequence in context: A322494 A258445 A129179 * A201080 A039754 A213919
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Aug 17 2006
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 10 03:52 EDT 2024. Contains 373253 sequences. (Running on oeis4.)