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!)
A343593 a(n) is the smallest number k > 0 such that n! + n + k is prime. 0
1, 1, 1, 2, 1, 2, 1, 4, 15, 8, 1, 6, 17, 54, 5, 28, 7, 14, 19, 70, 9, 10, 9, 74, 107, 16, 33, 20, 39, 194, 77, 96, 47, 4, 63, 26, 95, 274, 5, 58, 13, 20, 55, 28, 3, 194, 55, 186, 5, 34, 11, 220, 1, 18, 169, 16, 93, 50, 225, 234, 211, 708, 69, 208, 3, 128, 217 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Table of n, a(n) for n=0..66.

FORMULA

a(n) = A037153(n) - n for n >= 1.

a(n) = A090786(n) + 1.

EXAMPLE

For n = 2: the smallest value of k such that 2! + 2 + k = 4 + k is prime is 1.

MAPLE

a:= n-> (t-> nextprime(t)-t)(n!+n):

seq(a(n), n=0..80);  # Alois P. Heinz, Apr 21 2021

MATHEMATICA

a[n_] := NextPrime[(m = n! + n)] - m; Array[a, 100, 0] (* Amiram Eldar, Apr 21 2021 *)

PROG

(PARI) a(n) = my(s=n!+n); nextprime(s+1) - s; \\ Michel Marcus, Apr 21 2021

CROSSREFS

Cf. A000040, A037153, A090786.

Sequence in context: A246996 A260612 A159829 * A224763 A128515 A332489

Adjacent sequences:  A343590 A343591 A343592 * A343594 A343595 A343596

KEYWORD

nonn

AUTHOR

Ventsislav D. Tsenov, Apr 21 2021

EXTENSIONS

More terms from Alois P. Heinz, Apr 21 2021

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 July 27 05:26 EDT 2021. Contains 346305 sequences. (Running on oeis4.)