login
List of derangements of 1, 2, 3, ..., n for n = 2, 3, 4, ..., in lexicographic order.
1

%I #8 Jul 09 2012 13:12:52

%S 2,1,2,3,1,3,1,2,2,1,4,3,2,3,4,1,2,4,1,3,3,1,4,2,3,4,1,2,3,4,2,1,4,1,

%T 2,3,4,3,1,2,4,3,2,1,2,1,4,5,3,2,1,5,3,4,2,3,1,5,4,2,3,4,5,1,2,3,5,1,

%U 4,2,4,1,5,3,2,4,5,1,3,2,4,5,3,1,2,5,1

%N List of derangements of 1, 2, 3, ..., n for n = 2, 3, 4, ..., in lexicographic order.

%e The derangements can be written as

%e 21,

%e 231, 312,

%e 2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321, etc.

%Y Cf. A000166, A030298, A065087 (row sums), A086325 (row lengths).

%K nonn,tabf

%O 2,1

%A _William Rex Marshall_, Jul 08 2012