A036679 a(n) = n^n - n!.
0, 0, 2, 21, 232, 3005, 45936, 818503, 16736896, 387057609, 9996371200, 285271753811, 8915621446656, 302868879571453, 11111919647266816, 437892582706491375, 18446723150919663616, 827239906198908668177, 39346401672922831847424, 1978419534015213180291979
Offset: 0
References
- D. S. Mitrinovic, Analytic Inequalities, Springer-Verlag, 1970; p. 193, 3.1.22.
Links
- T. D. Noe and Vincenzo Librandi, Table of n, a(n) for n = 0..300 [T. D. Noe computed terms 0-50, May 11 2007; Vincenzo Librandi computed the first 300 terms, Aug 22 2011]
- Mohammad K. Azarian, Remarks and Conjectures Regarding Combinatorics of Discrete Partial Functions, Int'l Math. Forum (2022) Vol. 17, No. 3, 129-141. See Corollary 2.3(iii).
Programs
-
Magma
[(n^n-Factorial(n)): n in [0..20] ]; // Vincenzo Librandi, Aug 22 2011
-
Mathematica
Join[{0}, Table[n^n - n!, {n, 20}]] (* Harvey P. Dale, Oct 11 2011 *)
-
PARI
a(n)=n^n-n! \\ Charles R Greathouse IV, Aug 22 2011
-
Python
from math import factorial def a(n): return n**n - factorial(n) print([a(n) for n in range(20)]) # Michael S. Branicky, Aug 10 2021
Formula
E.g.f.: 1/(1-T(x))-1/(1-x) where T(x) is the e.g.f. for A000169. - Geoffrey Critzer, Dec 10 2012
Comments