A082491 a(n) = n! * d(n), where n! = factorial numbers (A000142), d(n) = subfactorial numbers (A000166).
1, 0, 2, 12, 216, 5280, 190800, 9344160, 598066560, 48443028480, 4844306476800, 586161043776000, 84407190782745600, 14264815236056985600, 2795903786354347468800, 629078351928420506112000, 161044058093696572354560000, 46541732789077953723039744000
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Ira Gessel, Enumerative applications of symmetric functions, Séminaire Lotharingien de Combinatoire, B17a (1987), 17 pp.
- Shawn L. Witte, Link Nomenclature, Random Grid Diagrams, and Markov Chain Methods in Knot Theory, Ph. D. Dissertation, University of California-Davis (2020).
Programs
-
Maple
with (combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, labeled]; end: ZLL:=a(2):seq(count(ZLL, size=n)*n!, n=0..15); # Zerinvary Lajos, Jun 11 2008
-
Mathematica
Table[Subfactorial[n]*n!, {n, 0, 15}] (* Zerinvary Lajos, Jul 10 2009 *)
-
Maxima
A000166[0]:1$ A000166[n]:=n*A000166[n-1]+(-1)^n$ makelist(n!*A000166[n], n, 0, 12); /* Emanuele Munarini, Mar 01 2011 */
-
PARI
d(n)=if(n<1, n==0, n*d(n-1)+(-1)^n); a(n)=d(n)*n!; vector(33,n,a(n-1)) /* Joerg Arndt, May 28 2012 */
-
PARI
{a(n) = if( n<2, n==0, n! * round(n! / exp(1)))}; /* Michael Somos, Jun 24 2018 */
-
Python
A082491_list, m, x = [], 1, 1 for n in range(10*2): x, m = x*n**2 + m, -(n+1)*m A082491_list.append(x) # Chai Wah Wu, Nov 03 2014
-
Scala
val A082491_pairs: LazyList[BigInt && BigInt] = (BigInt(0), BigInt(1)) #:: (BigInt(1), BigInt(0)) #:: lift2 { case ((n, z), (_, y)) => (n+2, (n+2)*(n+1)*((n+1)*z+y)) } (A082491_pairs, A082491_pairs.tail) val A082491: LazyList[BigInt] = lift1(_._2)(A082491_pairs) /** Luc Duponcheel, Jan 25 2020 */
Formula
a(n) = n! * d(n) where d(n) = A000166(n).
a(n) = Sum_{k=0..n} binomial(n, k)^2 * (-1)^k * (n - k)!^2 * k!.
a(n+2) = (n+2)*(n+1) * ( a(n+1) + (n+1)*a(n) ).
a(n) ~ 2*Pi*n^(2*n+1)*exp(-2*n-1). - Ilya Gutkovskiy, Dec 04 2016
Comments