cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343593 a(n) is the smallest number k > 0 such that n! + n + k is prime.

This page as a plain text file.
%I A343593 #35 Apr 23 2021 06:38:46
%S A343593 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,
%T A343593 20,39,194,77,96,47,4,63,26,95,274,5,58,13,20,55,28,3,194,55,186,5,34,
%U A343593 11,220,1,18,169,16,93,50,225,234,211,708,69,208,3,128,217
%N A343593 a(n) is the smallest number k > 0 such that n! + n + k is prime.
%F A343593 a(n) = A037153(n) - n for n >= 1.
%F A343593 a(n) = A090786(n) + 1.
%e A343593 For n = 2: the smallest value of k such that 2! + 2 + k = 4 + k is prime is 1.
%p A343593 a:= n-> (t-> nextprime(t)-t)(n!+n):
%p A343593 seq(a(n), n=0..80);  # _Alois P. Heinz_, Apr 21 2021
%t A343593 a[n_] := NextPrime[(m = n! + n)] - m; Array[a, 100, 0] (* _Amiram Eldar_, Apr 21 2021 *)
%o A343593 (PARI) a(n) = my(s=n!+n); nextprime(s+1) - s; \\ _Michel Marcus_, Apr 21 2021
%Y A343593 Cf. A000040, A037153, A090786.
%K A343593 nonn
%O A343593 0,4
%A A343593 _Ventsislav D. Tsenov_, Apr 21 2021
%E A343593 More terms from _Alois P. Heinz_, Apr 21 2021