login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082491 a(n) = n! * d(n), where n! = factorial numbers (A000142), d(n) = subfactorial numbers (A000166). 10
1, 0, 2, 12, 216, 5280, 190800, 9344160, 598066560, 48443028480, 4844306476800, 586161043776000, 84407190782745600, 14264815236056985600, 2795903786354347468800, 629078351928420506112000, 161044058093696572354560000, 46541732789077953723039744000 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) is also the number of pairs of n-permutations p and q such that p(x)<>q(x) for each x in { 1, 2, ..., n }.
Or number of n X n matrices with exactly one 1 and one 2 in each row and column, other entries 0 (cf. A001499). - Vladimir Shevelev, Mar 22 2010
a(n) is approximately equal to (n!)^2/e. - J. M. Bergot, Jun 09 2018
LINKS
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).
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
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 *)
PROG
(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 */
CROSSREFS
Sequence in context: A156489 A129893 A008352 * A292812 A153302 A123118
KEYWORD
easy,nonn
AUTHOR
Emanuele Munarini, Apr 28 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)