OFFSET
1,2
REFERENCES
Miklos Bona, Introduction to Enumerative Combinatorics, McGraw Hill 2007, Page 276.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..100
FORMULA
a(n) = n^(n-2)*(n!).
EXAMPLE
a(1) = 1^(1-2)*(1!) = 1.
a(2) = 2^(2-2)*(2!) = 2.
a(3) = 3^(3-2)*(3!) = 18.
MAPLE
a:= proc(n) option remember; `if`(n=1, 1,
a(n-1)*(n/(n-1))^(n-3)*n^2)
end:
seq(a(n), n=1..20); # Alois P. Heinz, May 16 2013
MATHEMATICA
Table[n^(n - 1) (n - 1)!, {n, 1, 16}] (* Geoffrey Critzer, May 10 2013 *)
PROG
(Magma) [Factorial(n-1)*n^(n-1): n in [1..20]]; // G. C. Greubel, Nov 28 2022
(SageMath) [factorial(n-1)*n^(n-1) for n in range(1, 21)] # G. C. Greubel, Nov 28 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Fabian Nedic, Dec 10 2008
STATUS
approved