login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = prime(n)! - n!.
1

%I #20 Sep 08 2022 08:46:13

%S 1,4,114,5016,39916680,6227020080,355687428090960,121645100408791680,

%T 25852016738884976277120,8841761993739701954543612371200,

%U 8222838654177922817725562840083200,13763753091226345046315979581580901920998400

%N a(n) = prime(n)! - n!.

%F a(n) = prime(n)! - n! = A039716(n) - A000142(n).

%e The 3rd prime is 5, a(3)= 5! - 3! = 114.

%t Array[Prime[#]! - #! &, {12}] (* _Michael De Vlieger_, Aug 19 2015 *)

%o (Magma) [Factorial(NthPrime(n)) - Factorial(n): n in [1..15]]; // _Vincenzo Librandi_, Aug 20 2015

%o (PARI) first(m)=vector(m,i,prime(i)!-i!) \\ _Anders Hellström_, Aug 20 2015

%Y Cf. A000142, A014689, A039716.

%K nonn,easy

%O 1,2

%A _Altug Alkan_, Aug 19 2015