login
Smallest prime > n!+1.
3

%I #32 Feb 18 2024 04:53:33

%S 3,5,11,29,127,727,5051,40343,362897,3628811,39916817,479001629,

%T 6227020867,87178291219,1307674368043,20922789888023,355687428096031,

%U 6402373705728037,121645100408832089,2432902008176640029

%N Smallest prime > n!+1.

%C Main entry for this sequence is A037153.

%H Vincenzo Librandi, <a href="/A037152/b037152.txt">Table of n, a(n) for n = 1..100</a>

%F a(n) = A151800(A000142(n)+1) = A000142(n) + A037153(n).

%F a(n) = A151800(A038507(n)). - _Michel Marcus_, Feb 18 2024

%t NextPrime[Range[20]!+1] (* _Harvey P. Dale_, Apr 08 2012 *)

%o (Maxima) makelist(next_prime(n!+1), n, 1, 20); /* _Bruno Berselli_, May 20 2011 */

%o (PARI) for(n=1,100,print1(nextprime(n!+2),", ")); /* _Joerg Arndt_, May 21 2011 */

%Y Cf. A000142, A037153, A038507, A151800.

%K nonn

%O 1,1

%A _Jud McCranie_

%E Extended by _Ray Chandler_, Mar 07 2010