OFFSET
1,3
COMMENTS
a(n) is the determinant of the n X n matrix M_(i,j) = ((i+j) mod n) where i and j range from 0 to n-1. - Benoit Cloitre, Nov 29 2002
|a(n)| = number of labeled mappings from n points to themselves (endofunctions) with an even number of cycles. E.g.f.: (1/2)*LambertW(-x)^2/(1+LambertW(-x)). - Vladeta Jovovic, Mar 30 2006
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..385
FORMULA
a(n) = (-1)^floor(n/2)*(1/2)*(n-1)*n^(n-1). - Benoit Cloitre, Nov 29 2002
EXAMPLE
a(3) = -9 because the determinant of {{0,1,2}, {1,2,0}, {2,0,1}} is -9.
MATHEMATICA
Table[(-1)^Floor[n/2]*(1/2)*(n - 1)*n^(n - 1), {n, 1, 50}] (* G. C. Greubel, Nov 14 2017 *)
PROG
(PARI) a(n)=(-1)^floor(n/2)*(1/2)*(n-1)*n^(n-1)
(Magma) [(-1)^Floor(n/2)*(1/2)*(n-1)*n^(n-1): n in [1..50]]; // G. C. Greubel, Nov 14 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Santi Spadaro, May 23 2002
STATUS
approved