Identifier
Identifier
Values
[] => 1
[1] => 1
[1,2] => 1
[2,1] => 1
[1,2,3] => 1
[1,3,2] => 1
[2,1,3] => 1
[2,3,1] => 1
[3,1,2] => 1
[3,2,1] => 2
[1,2,3,4] => 1
[1,2,4,3] => 1
[1,3,2,4] => 1
[1,3,4,2] => 1
[1,4,2,3] => 1
[1,4,3,2] => 2
[2,1,3,4] => 1
[2,1,4,3] => 2
[2,3,1,4] => 1
[2,3,4,1] => 1
[2,4,1,3] => 2
[2,4,3,1] => 3
[3,1,2,4] => 1
[3,1,4,2] => 2
[3,2,1,4] => 2
[3,2,4,1] => 3
[3,4,1,2] => 2
[3,4,2,1] => 5
[4,1,2,3] => 1
[4,1,3,2] => 3
[4,2,1,3] => 3
[4,2,3,1] => 6
[4,3,1,2] => 5
[4,3,2,1] => 16
[1,2,3,4,5] => 1
[1,2,3,5,4] => 1
[1,2,4,3,5] => 1
[1,2,4,5,3] => 1
[1,2,5,3,4] => 1
[1,2,5,4,3] => 2
[1,3,2,4,5] => 1
[1,3,2,5,4] => 2
[1,3,4,2,5] => 1
[1,3,4,5,2] => 1
[1,3,5,2,4] => 2
[1,3,5,4,2] => 3
[1,4,2,3,5] => 1
[1,4,2,5,3] => 2
[1,4,3,2,5] => 2
[1,4,3,5,2] => 3
[1,4,5,2,3] => 2
[1,4,5,3,2] => 5
[1,5,2,3,4] => 1
[1,5,2,4,3] => 3
[1,5,3,2,4] => 3
[1,5,3,4,2] => 6
[1,5,4,2,3] => 5
[1,5,4,3,2] => 16
[2,1,3,4,5] => 1
[2,1,3,5,4] => 2
[2,1,4,3,5] => 2
[2,1,4,5,3] => 3
[2,1,5,3,4] => 3
[2,1,5,4,3] => 8
[2,3,1,4,5] => 1
[2,3,1,5,4] => 3
[2,3,4,1,5] => 1
[2,3,4,5,1] => 1
[2,3,5,1,4] => 3
[2,3,5,4,1] => 4
[2,4,1,3,5] => 2
[2,4,1,5,3] => 5
[2,4,3,1,5] => 3
[2,4,3,5,1] => 4
[2,4,5,1,3] => 5
[2,4,5,3,1] => 9
[2,5,1,3,4] => 3
[2,5,1,4,3] => 11
[2,5,3,1,4] => 6
[2,5,3,4,1] => 10
[2,5,4,1,3] => 16
[2,5,4,3,1] => 35
[3,1,2,4,5] => 1
[3,1,2,5,4] => 3
[3,1,4,2,5] => 2
[3,1,4,5,2] => 3
[3,1,5,2,4] => 5
[3,1,5,4,2] => 11
[3,2,1,4,5] => 2
[3,2,1,5,4] => 8
[3,2,4,1,5] => 3
[3,2,4,5,1] => 4
[3,2,5,1,4] => 11
[3,2,5,4,1] => 19
[3,4,1,2,5] => 2
[3,4,1,5,2] => 5
[3,4,2,1,5] => 5
[3,4,2,5,1] => 9
[3,4,5,1,2] => 5
[3,4,5,2,1] => 14
[3,5,1,2,4] => 5
[3,5,1,4,2] => 16
[3,5,2,1,4] => 16
[3,5,2,4,1] => 35
[3,5,4,1,2] => 21
[3,5,4,2,1] => 70
[4,1,2,3,5] => 1
[4,1,2,5,3] => 3
[4,1,3,2,5] => 3
[4,1,3,5,2] => 6
[4,1,5,2,3] => 5
[4,1,5,3,2] => 16
[4,2,1,3,5] => 3
[4,2,1,5,3] => 11
[4,2,3,1,5] => 6
[4,2,3,5,1] => 10
[4,2,5,1,3] => 16
[4,2,5,3,1] => 35
[4,3,1,2,5] => 5
[4,3,1,5,2] => 16
[4,3,2,1,5] => 16
[4,3,2,5,1] => 35
[4,3,5,1,2] => 21
[4,3,5,2,1] => 70
[4,5,1,2,3] => 5
[4,5,1,3,2] => 21
[4,5,2,1,3] => 21
[4,5,2,3,1] => 56
[4,5,3,1,2] => 42
[4,5,3,2,1] => 168
[5,1,2,3,4] => 1
[5,1,2,4,3] => 4
[5,1,3,2,4] => 4
[5,1,3,4,2] => 10
[5,1,4,2,3] => 9
[5,1,4,3,2] => 35
[5,2,1,3,4] => 4
[5,2,1,4,3] => 19
[5,2,3,1,4] => 10
[5,2,3,4,1] => 20
[5,2,4,1,3] => 35
[5,2,4,3,1] => 90
[5,3,1,2,4] => 9
[5,3,1,4,2] => 35
[5,3,2,1,4] => 35
[5,3,2,4,1] => 90
[5,3,4,1,2] => 56
[5,3,4,2,1] => 216
[5,4,1,2,3] => 14
[5,4,1,3,2] => 70
[5,4,2,1,3] => 70
[5,4,2,3,1] => 216
[5,4,3,1,2] => 168
[5,4,3,2,1] => 768
[1,2,3,4,5,6] => 1
[1,2,3,4,6,5] => 1
[1,2,3,5,4,6] => 1
[1,2,3,5,6,4] => 1
[1,2,3,6,4,5] => 1
[1,2,3,6,5,4] => 2
[1,2,4,3,5,6] => 1
[1,2,4,3,6,5] => 2
[1,2,4,5,3,6] => 1
[1,2,4,5,6,3] => 1
[1,2,4,6,3,5] => 2
[1,2,4,6,5,3] => 3
[1,2,5,3,4,6] => 1
[1,2,5,3,6,4] => 2
[1,2,5,4,3,6] => 2
[1,2,5,4,6,3] => 3
[1,2,5,6,3,4] => 2
[1,2,5,6,4,3] => 5
[1,2,6,3,4,5] => 1
[1,2,6,3,5,4] => 3
[1,2,6,4,3,5] => 3
[1,2,6,4,5,3] => 6
[1,2,6,5,3,4] => 5
[1,2,6,5,4,3] => 16
[1,3,2,4,5,6] => 1
[1,3,2,4,6,5] => 2
[1,3,2,5,4,6] => 2
[1,3,2,5,6,4] => 3
[1,3,2,6,4,5] => 3
[1,3,2,6,5,4] => 8
[1,3,4,2,5,6] => 1
[1,3,4,2,6,5] => 3
[1,3,4,5,2,6] => 1
[1,3,4,5,6,2] => 1
[1,3,4,6,2,5] => 3
[1,3,4,6,5,2] => 4
[1,3,5,2,4,6] => 2
[1,3,5,2,6,4] => 5
[1,3,5,4,2,6] => 3
[1,3,5,4,6,2] => 4
[1,3,5,6,2,4] => 5
[1,3,5,6,4,2] => 9
[1,3,6,2,4,5] => 3
[1,3,6,2,5,4] => 11
[1,3,6,4,2,5] => 6
[1,3,6,4,5,2] => 10
[1,3,6,5,2,4] => 16
[1,3,6,5,4,2] => 35
[1,4,2,3,5,6] => 1
[1,4,2,3,6,5] => 3
[1,4,2,5,3,6] => 2
[1,4,2,5,6,3] => 3
[1,4,2,6,3,5] => 5
[1,4,2,6,5,3] => 11
[1,4,3,2,5,6] => 2
[1,4,3,2,6,5] => 8
[1,4,3,5,2,6] => 3
[1,4,3,5,6,2] => 4
[1,4,3,6,2,5] => 11
[1,4,3,6,5,2] => 19
[1,4,5,2,3,6] => 2
[1,4,5,2,6,3] => 5
[1,4,5,3,2,6] => 5
[1,4,5,3,6,2] => 9
[1,4,5,6,2,3] => 5
[1,4,5,6,3,2] => 14
[1,4,6,2,3,5] => 5
[1,4,6,2,5,3] => 16
[1,4,6,3,2,5] => 16
[1,4,6,3,5,2] => 35
[1,4,6,5,2,3] => 21
[1,4,6,5,3,2] => 70
[1,5,2,3,4,6] => 1
[1,5,2,3,6,4] => 3
[1,5,2,4,3,6] => 3
[1,5,2,4,6,3] => 6
[1,5,2,6,3,4] => 5
[1,5,2,6,4,3] => 16
[1,5,3,2,4,6] => 3
[1,5,3,2,6,4] => 11
[1,5,3,4,2,6] => 6
[1,5,3,4,6,2] => 10
[1,5,3,6,2,4] => 16
[1,5,3,6,4,2] => 35
[1,5,4,2,3,6] => 5
[1,5,4,2,6,3] => 16
[1,5,4,3,2,6] => 16
[1,5,4,3,6,2] => 35
[1,5,4,6,2,3] => 21
[1,5,4,6,3,2] => 70
[1,5,6,2,3,4] => 5
[1,5,6,2,4,3] => 21
[1,5,6,3,2,4] => 21
[1,5,6,3,4,2] => 56
[1,5,6,4,2,3] => 42
[1,5,6,4,3,2] => 168
[1,6,2,3,4,5] => 1
[1,6,2,3,5,4] => 4
[1,6,2,4,3,5] => 4
[1,6,2,4,5,3] => 10
[1,6,2,5,3,4] => 9
[1,6,2,5,4,3] => 35
[1,6,3,2,4,5] => 4
[1,6,3,2,5,4] => 19
[1,6,3,4,2,5] => 10
[1,6,3,4,5,2] => 20
[1,6,3,5,2,4] => 35
[1,6,3,5,4,2] => 90
[1,6,4,2,3,5] => 9
[1,6,4,2,5,3] => 35
[1,6,4,3,2,5] => 35
[1,6,4,3,5,2] => 90
[1,6,4,5,2,3] => 56
[1,6,4,5,3,2] => 216
[1,6,5,2,3,4] => 14
[1,6,5,2,4,3] => 70
[1,6,5,3,2,4] => 70
[1,6,5,3,4,2] => 216
[1,6,5,4,2,3] => 168
[1,6,5,4,3,2] => 768
[2,1,3,4,5,6] => 1
[2,1,3,4,6,5] => 2
[2,1,3,5,4,6] => 2
[2,1,3,5,6,4] => 3
[2,1,3,6,4,5] => 3
[2,1,3,6,5,4] => 8
[2,1,4,3,5,6] => 2
[2,1,4,3,6,5] => 6
[2,1,4,5,3,6] => 3
[2,1,4,5,6,3] => 4
[2,1,4,6,3,5] => 8
[2,1,4,6,5,3] => 15
[2,1,5,3,4,6] => 3
[2,1,5,3,6,4] => 8
[2,1,5,4,3,6] => 8
[2,1,5,4,6,3] => 15
[2,1,5,6,3,4] => 10
[2,1,5,6,4,3] => 30
[2,1,6,3,4,5] => 4
[2,1,6,3,5,4] => 15
[2,1,6,4,3,5] => 15
[2,1,6,4,5,3] => 36
[2,1,6,5,3,4] => 30
[2,1,6,5,4,3] => 112
[2,3,1,4,5,6] => 1
[2,3,1,4,6,5] => 3
[2,3,1,5,4,6] => 3
[2,3,1,5,6,4] => 6
[2,3,1,6,4,5] => 6
[2,3,1,6,5,4] => 20
[2,3,4,1,5,6] => 1
[2,3,4,1,6,5] => 4
[2,3,4,5,1,6] => 1
[2,3,4,5,6,1] => 1
[2,3,4,6,1,5] => 4
[2,3,4,6,5,1] => 5
[2,3,5,1,4,6] => 3
[2,3,5,1,6,4] => 9
[2,3,5,4,1,6] => 4
[2,3,5,4,6,1] => 5
[2,3,5,6,1,4] => 9
[2,3,5,6,4,1] => 14
[2,3,6,1,4,5] => 6
[2,3,6,1,5,4] => 26
[2,3,6,4,1,5] => 10
[2,3,6,4,5,1] => 15
[2,3,6,5,1,4] => 35
[2,3,6,5,4,1] => 64
[2,4,1,3,5,6] => 2
[2,4,1,3,6,5] => 8
[2,4,1,5,3,6] => 5
[2,4,1,5,6,3] => 9
[2,4,1,6,3,5] => 16
[2,4,1,6,5,3] => 40
[2,4,3,1,5,6] => 3
[2,4,3,1,6,5] => 15
[2,4,3,5,1,6] => 4
[2,4,3,5,6,1] => 5
[2,4,3,6,1,5] => 19
[2,4,3,6,5,1] => 29
[2,4,5,1,3,6] => 5
[2,4,5,1,6,3] => 14
[2,4,5,3,1,6] => 9
[2,4,5,3,6,1] => 14
[2,4,5,6,1,3] => 14
[2,4,5,6,3,1] => 28
[2,4,6,1,3,5] => 16
[2,4,6,1,5,3] => 56
[2,4,6,3,1,5] => 35
[2,4,6,3,5,1] => 64
[2,4,6,5,1,3] => 70
[2,4,6,5,3,1] => 162
[2,5,1,3,4,6] => 3
[2,5,1,3,6,4] => 11
[2,5,1,4,3,6] => 11
[2,5,1,4,6,3] => 26
[2,5,1,6,3,4] => 21
[2,5,1,6,4,3] => 77
[2,5,3,1,4,6] => 6
[2,5,3,1,6,4] => 26
[2,5,3,4,1,6] => 10
[2,5,3,4,6,1] => 15
[2,5,3,6,1,4] => 35
[2,5,3,6,4,1] => 64
[2,5,4,1,3,6] => 16
[2,5,4,1,6,3] => 56
[2,5,4,3,1,6] => 35
[2,5,4,3,6,1] => 64
[2,5,4,6,1,3] => 70
[2,5,4,6,3,1] => 162
[2,5,6,1,3,4] => 21
[2,5,6,1,4,3] => 98
[2,5,6,3,1,4] => 56
[2,5,6,3,4,1] => 120
[2,5,6,4,1,3] => 168
[2,5,6,4,3,1] => 450
[2,6,1,3,4,5] => 4
[2,6,1,3,5,4] => 19
[2,6,1,4,3,5] => 19
[2,6,1,4,5,3] => 55
[2,6,1,5,3,4] => 49
[2,6,1,5,4,3] => 216
[2,6,3,1,4,5] => 10
[2,6,3,1,5,4] => 55
[2,6,3,4,1,5] => 20
[2,6,3,4,5,1] => 35
[2,6,3,5,1,4] => 90
[2,6,3,5,4,1] => 189
[2,6,4,1,3,5] => 35
[2,6,4,1,5,3] => 146
[2,6,4,3,1,5] => 90
[2,6,4,3,5,1] => 189
[2,6,4,5,1,3] => 216
[2,6,4,5,3,1] => 567
[2,6,5,1,3,4] => 70
[2,6,5,1,4,3] => 384
[2,6,5,3,1,4] => 216
[2,6,5,3,4,1] => 525
[2,6,5,4,1,3] => 768
[2,6,5,4,3,1] => 2310
[3,1,2,4,5,6] => 1
[3,1,2,4,6,5] => 3
[3,1,2,5,4,6] => 3
[3,1,2,5,6,4] => 6
[3,1,2,6,4,5] => 6
[3,1,2,6,5,4] => 20
[3,1,4,2,5,6] => 2
[3,1,4,2,6,5] => 8
[3,1,4,5,2,6] => 3
[3,1,4,5,6,2] => 4
[3,1,4,6,2,5] => 11
[3,1,4,6,5,2] => 19
[3,1,5,2,4,6] => 5
[3,1,5,2,6,4] => 16
[3,1,5,4,2,6] => 11
[3,1,5,4,6,2] => 19
[3,1,5,6,2,4] => 21
[3,1,5,6,4,2] => 49
[3,1,6,2,4,5] => 9
[3,1,6,2,5,4] => 40
[3,1,6,4,2,5] => 26
[3,1,6,4,5,2] => 55
[3,1,6,5,2,4] => 77
[3,1,6,5,4,2] => 216
[3,2,1,4,5,6] => 2
[3,2,1,4,6,5] => 8
[3,2,1,5,4,6] => 8
[3,2,1,5,6,4] => 20
[3,2,1,6,4,5] => 20
[3,2,1,6,5,4] => 80
[3,2,4,1,5,6] => 3
[3,2,4,1,6,5] => 15
[3,2,4,5,1,6] => 4
[3,2,4,5,6,1] => 5
[3,2,4,6,1,5] => 19
[3,2,4,6,5,1] => 29
[3,2,5,1,4,6] => 11
[3,2,5,1,6,4] => 40
[3,2,5,4,1,6] => 19
[3,2,5,4,6,1] => 29
[3,2,5,6,1,4] => 49
[3,2,5,6,4,1] => 92
[3,2,6,1,4,5] => 26
[3,2,6,1,5,4] => 132
[3,2,6,4,1,5] => 55
[3,2,6,4,5,1] => 99
[3,2,6,5,1,4] => 216
[3,2,6,5,4,1] => 471
[3,4,1,2,5,6] => 2
[3,4,1,2,6,5] => 10
[3,4,1,5,2,6] => 5
[3,4,1,5,6,2] => 9
[3,4,1,6,2,5] => 21
[3,4,1,6,5,2] => 49
[3,4,2,1,5,6] => 5
[3,4,2,1,6,5] => 30
[3,4,2,5,1,6] => 9
[3,4,2,5,6,1] => 14
[3,4,2,6,1,5] => 49
[3,4,2,6,5,1] => 92
[3,4,5,1,2,6] => 5
[3,4,5,1,6,2] => 14
[3,4,5,2,1,6] => 14
[3,4,5,2,6,1] => 28
[3,4,5,6,1,2] => 14
[3,4,5,6,2,1] => 42
[3,4,6,1,2,5] => 21
[3,4,6,1,5,2] => 70
[3,4,6,2,1,5] => 70
[3,4,6,2,5,1] => 162
[3,4,6,5,1,2] => 84
[3,4,6,5,2,1] => 288
[3,5,1,2,4,6] => 5
[3,5,1,2,6,4] => 21
[3,5,1,4,2,6] => 16
[3,5,1,4,6,2] => 35
[3,5,1,6,2,4] => 42
[3,5,1,6,4,2] => 126
[3,5,2,1,4,6] => 16
[3,5,2,1,6,4] => 77
[3,5,2,4,1,6] => 35
[3,5,2,4,6,1] => 64
[3,5,2,6,1,4] => 126
[3,5,2,6,4,1] => 282
[3,5,4,1,2,6] => 21
[3,5,4,1,6,2] => 70
[3,5,4,2,1,6] => 70
[3,5,4,2,6,1] => 162
[3,5,4,6,1,2] => 84
[3,5,4,6,2,1] => 288
[3,5,6,1,2,4] => 42
[3,5,6,1,4,2] => 168
[3,5,6,2,1,4] => 168
[3,5,6,2,4,1] => 450
[3,5,6,4,1,2] => 252
[3,5,6,4,2,1] => 990
[3,6,1,2,4,5] => 9
[3,6,1,2,5,4] => 49
[3,6,1,4,2,5] => 35
[3,6,1,4,5,2] => 90
[3,6,1,5,2,4] => 126
[3,6,1,5,4,2] => 432
[3,6,2,1,4,5] => 35
[3,6,2,1,5,4] => 216
[3,6,2,4,1,5] => 90
[3,6,2,4,5,1] => 189
[3,6,2,5,1,4] => 432
[3,6,2,5,4,1] => 1092
[3,6,4,1,2,5] => 56
[3,6,4,1,5,2] => 216
[3,6,4,2,1,5] => 216
[3,6,4,2,5,1] => 567
[3,6,4,5,1,2] => 300
[3,6,4,5,2,1] => 1155
[3,6,5,1,2,4] => 168
[3,6,5,1,4,2] => 768
[3,6,5,2,1,4] => 768
[3,6,5,2,4,1] => 2310
[3,6,5,4,1,2] => 1320
[3,6,5,4,2,1] => 5775
[4,1,2,3,5,6] => 1
[4,1,2,3,6,5] => 4
[4,1,2,5,3,6] => 3
[4,1,2,5,6,3] => 6
[4,1,2,6,3,5] => 9
[4,1,2,6,5,3] => 26
[4,1,3,2,5,6] => 3
[4,1,3,2,6,5] => 15
[4,1,3,5,2,6] => 6
[4,1,3,5,6,2] => 10
[4,1,3,6,2,5] => 26
[4,1,3,6,5,2] => 55
[4,1,5,2,3,6] => 5
[4,1,5,2,6,3] => 16
[4,1,5,3,2,6] => 16
[4,1,5,3,6,2] => 35
[4,1,5,6,2,3] => 21
[4,1,5,6,3,2] => 70
[4,1,6,2,3,5] => 14
[4,1,6,2,5,3] => 56
[4,1,6,3,2,5] => 56
[4,1,6,3,5,2] => 146
[4,1,6,5,2,3] => 98
[4,1,6,5,3,2] => 384
[4,2,1,3,5,6] => 3
[4,2,1,3,6,5] => 15
[4,2,1,5,3,6] => 11
[4,2,1,5,6,3] => 26
[4,2,1,6,3,5] => 40
[4,2,1,6,5,3] => 132
[4,2,3,1,5,6] => 6
[4,2,3,1,6,5] => 36
[4,2,3,5,1,6] => 10
[4,2,3,5,6,1] => 15
[4,2,3,6,1,5] => 55
[4,2,3,6,5,1] => 99
[4,2,5,1,3,6] => 16
[4,2,5,1,6,3] => 56
[4,2,5,3,1,6] => 35
[4,2,5,3,6,1] => 64
[4,2,5,6,1,3] => 70
[4,2,5,6,3,1] => 162
[4,2,6,1,3,5] => 56
[4,2,6,1,5,3] => 244
[4,2,6,3,1,5] => 146
[4,2,6,3,5,1] => 309
[4,2,6,5,1,3] => 384
[4,2,6,5,3,1] => 1017
[4,3,1,2,5,6] => 5
[4,3,1,2,6,5] => 30
[4,3,1,5,2,6] => 16
[4,3,1,5,6,2] => 35
[4,3,1,6,2,5] => 77
[4,3,1,6,5,2] => 216
[4,3,2,1,5,6] => 16
[4,3,2,1,6,5] => 112
[4,3,2,5,1,6] => 35
[4,3,2,5,6,1] => 64
[4,3,2,6,1,5] => 216
[4,3,2,6,5,1] => 471
[4,3,5,1,2,6] => 21
[4,3,5,1,6,2] => 70
[4,3,5,2,1,6] => 70
[4,3,5,2,6,1] => 162
[4,3,5,6,1,2] => 84
[4,3,5,6,2,1] => 288
[4,3,6,1,2,5] => 98
[4,3,6,1,5,2] => 384
[4,3,6,2,1,5] => 384
[4,3,6,2,5,1] => 1017
[4,3,6,5,1,2] => 552
[4,3,6,5,2,1] => 2145
[4,5,1,2,3,6] => 5
[4,5,1,2,6,3] => 21
[4,5,1,3,2,6] => 21
[4,5,1,3,6,2] => 56
[4,5,1,6,2,3] => 42
[4,5,1,6,3,2] => 168
[4,5,2,1,3,6] => 21
[4,5,2,1,6,3] => 98
[4,5,2,3,1,6] => 56
[4,5,2,3,6,1] => 120
[4,5,2,6,1,3] => 168
[4,5,2,6,3,1] => 450
[4,5,3,1,2,6] => 42
[4,5,3,1,6,2] => 168
[4,5,3,2,1,6] => 168
[4,5,3,2,6,1] => 450
[4,5,3,6,1,2] => 252
[4,5,3,6,2,1] => 990
[4,5,6,1,2,3] => 42
[4,5,6,1,3,2] => 210
[4,5,6,2,1,3] => 210
[4,5,6,2,3,1] => 660
[4,5,6,3,1,2] => 462
[4,5,6,3,2,1] => 2112
[4,6,1,2,3,5] => 14
[4,6,1,2,5,3] => 70
[4,6,1,3,2,5] => 70
[4,6,1,3,5,2] => 216
[4,6,1,5,2,3] => 168
[4,6,1,5,3,2] => 768
[4,6,2,1,3,5] => 70
[4,6,2,1,5,3] => 384
[4,6,2,3,1,5] => 216
[4,6,2,3,5,1] => 525
[4,6,2,5,1,3] => 768
[4,6,2,5,3,1] => 2310
[4,6,3,1,2,5] => 168
[4,6,3,1,5,2] => 768
[4,6,3,2,1,5] => 768
[4,6,3,2,5,1] => 2310
[4,6,3,5,1,2] => 1320
[4,6,3,5,2,1] => 5775
[4,6,5,1,2,3] => 210
[4,6,5,1,3,2] => 1188
[4,6,5,2,1,3] => 1188
[4,6,5,2,3,1] => 4158
[4,6,5,3,1,2] => 2970
[4,6,5,3,2,1] => 15015
[5,1,2,3,4,6] => 1
[5,1,2,3,6,4] => 4
[5,1,2,4,3,6] => 4
[5,1,2,4,6,3] => 10
[5,1,2,6,3,4] => 9
[5,1,2,6,4,3] => 35
[5,1,3,2,4,6] => 4
[5,1,3,2,6,4] => 19
[5,1,3,4,2,6] => 10
[5,1,3,4,6,2] => 20
[5,1,3,6,2,4] => 35
[5,1,3,6,4,2] => 90
[5,1,4,2,3,6] => 9
[5,1,4,2,6,3] => 35
[5,1,4,3,2,6] => 35
[5,1,4,3,6,2] => 90
[5,1,4,6,2,3] => 56
[5,1,4,6,3,2] => 216
[5,1,6,2,3,4] => 14
[5,1,6,2,4,3] => 70
[5,1,6,3,2,4] => 70
[5,1,6,3,4,2] => 216
[5,1,6,4,2,3] => 168
[5,1,6,4,3,2] => 768
[5,2,1,3,4,6] => 4
[5,2,1,3,6,4] => 19
[5,2,1,4,3,6] => 19
[5,2,1,4,6,3] => 55
[5,2,1,6,3,4] => 49
[5,2,1,6,4,3] => 216
[5,2,3,1,4,6] => 10
[5,2,3,1,6,4] => 55
[5,2,3,4,1,6] => 20
[5,2,3,4,6,1] => 35
[5,2,3,6,1,4] => 90
[5,2,3,6,4,1] => 189
[5,2,4,1,3,6] => 35
[5,2,4,1,6,3] => 146
[5,2,4,3,1,6] => 90
[5,2,4,3,6,1] => 189
[5,2,4,6,1,3] => 216
[5,2,4,6,3,1] => 567
[5,2,6,1,3,4] => 70
[5,2,6,1,4,3] => 384
[5,2,6,3,1,4] => 216
[5,2,6,3,4,1] => 525
[5,2,6,4,1,3] => 768
[5,2,6,4,3,1] => 2310
[5,3,1,2,4,6] => 9
[5,3,1,2,6,4] => 49
[5,3,1,4,2,6] => 35
[5,3,1,4,6,2] => 90
[5,3,1,6,2,4] => 126
[5,3,1,6,4,2] => 432
[5,3,2,1,4,6] => 35
[5,3,2,1,6,4] => 216
[5,3,2,4,1,6] => 90
[5,3,2,4,6,1] => 189
[5,3,2,6,1,4] => 432
[5,3,2,6,4,1] => 1092
[5,3,4,1,2,6] => 56
[5,3,4,1,6,2] => 216
[5,3,4,2,1,6] => 216
[5,3,4,2,6,1] => 567
[5,3,4,6,1,2] => 300
[5,3,4,6,2,1] => 1155
[5,3,6,1,2,4] => 168
[5,3,6,1,4,2] => 768
[5,3,6,2,1,4] => 768
[5,3,6,2,4,1] => 2310
[5,3,6,4,1,2] => 1320
[5,3,6,4,2,1] => 5775
[5,4,1,2,3,6] => 14
[5,4,1,2,6,3] => 70
[5,4,1,3,2,6] => 70
[5,4,1,3,6,2] => 216
[5,4,1,6,2,3] => 168
[5,4,1,6,3,2] => 768
[5,4,2,1,3,6] => 70
[5,4,2,1,6,3] => 384
[5,4,2,3,1,6] => 216
[5,4,2,3,6,1] => 525
[5,4,2,6,1,3] => 768
[5,4,2,6,3,1] => 2310
[5,4,3,1,2,6] => 168
[5,4,3,1,6,2] => 768
[5,4,3,2,1,6] => 768
[5,4,3,2,6,1] => 2310
[5,4,3,6,1,2] => 1320
[5,4,3,6,2,1] => 5775
[5,4,6,1,2,3] => 210
[5,4,6,1,3,2] => 1188
[5,4,6,2,1,3] => 1188
[5,4,6,2,3,1] => 4158
[5,4,6,3,1,2] => 2970
[5,4,6,3,2,1] => 15015
[5,6,1,2,3,4] => 14
[5,6,1,2,4,3] => 84
[5,6,1,3,2,4] => 84
[5,6,1,3,4,2] => 300
[5,6,1,4,2,3] => 252
[5,6,1,4,3,2] => 1320
[5,6,2,1,3,4] => 84
[5,6,2,1,4,3] => 552
[5,6,2,3,1,4] => 300
[5,6,2,3,4,1] => 825
[5,6,2,4,1,3] => 1320
[5,6,2,4,3,1] => 4455
[5,6,3,1,2,4] => 252
[5,6,3,1,4,2] => 1320
[5,6,3,2,1,4] => 1320
[5,6,3,2,4,1] => 4455
[5,6,3,4,1,2] => 2640
[5,6,3,4,2,1] => 12870
[5,6,4,1,2,3] => 462
[5,6,4,1,3,2] => 2970
[5,6,4,2,1,3] => 2970
[5,6,4,2,3,1] => 11583
[5,6,4,3,1,2] => 8580
[5,6,4,3,2,1] => 48048
[6,1,2,3,4,5] => 1
[6,1,2,3,5,4] => 5
[6,1,2,4,3,5] => 5
[6,1,2,4,5,3] => 15
[6,1,2,5,3,4] => 14
[6,1,2,5,4,3] => 64
[6,1,3,2,4,5] => 5
[6,1,3,2,5,4] => 29
[6,1,3,4,2,5] => 15
[6,1,3,4,5,2] => 35
[6,1,3,5,2,4] => 64
[6,1,3,5,4,2] => 189
[6,1,4,2,3,5] => 14
[6,1,4,2,5,3] => 64
[6,1,4,3,2,5] => 64
[6,1,4,3,5,2] => 189
[6,1,4,5,2,3] => 120
[6,1,4,5,3,2] => 525
[6,1,5,2,3,4] => 28
[6,1,5,2,4,3] => 162
[6,1,5,3,2,4] => 162
[6,1,5,3,4,2] => 567
[6,1,5,4,2,3] => 450
[6,1,5,4,3,2] => 2310
[6,2,1,3,4,5] => 5
[6,2,1,3,5,4] => 29
[6,2,1,4,3,5] => 29
[6,2,1,4,5,3] => 99
[6,2,1,5,3,4] => 92
[6,2,1,5,4,3] => 471
[6,2,3,1,4,5] => 15
[6,2,3,1,5,4] => 99
[6,2,3,4,1,5] => 35
[6,2,3,4,5,1] => 70
[6,2,3,5,1,4] => 189
[6,2,3,5,4,1] => 448
[6,2,4,1,3,5] => 64
[6,2,4,1,5,3] => 309
[6,2,4,3,1,5] => 189
[6,2,4,3,5,1] => 448
[6,2,4,5,1,3] => 525
[6,2,4,5,3,1] => 1540
[6,2,5,1,3,4] => 162
[6,2,5,1,4,3] => 1017
[6,2,5,3,1,4] => 567
[6,2,5,3,4,1] => 1540
[6,2,5,4,1,3] => 2310
[6,2,5,4,3,1] => 7700
[6,3,1,2,4,5] => 14
[6,3,1,2,5,4] => 92
[6,3,1,4,2,5] => 64
[6,3,1,4,5,2] => 189
[6,3,1,5,2,4] => 282
[6,3,1,5,4,2] => 1092
[6,3,2,1,4,5] => 64
[6,3,2,1,5,4] => 471
[6,3,2,4,1,5] => 189
[6,3,2,4,5,1] => 448
[6,3,2,5,1,4] => 1092
[6,3,2,5,4,1] => 3080
[6,3,4,1,2,5] => 120
[6,3,4,1,5,2] => 525
[6,3,4,2,1,5] => 525
[6,3,4,2,5,1] => 1540
[6,3,4,5,1,2] => 825
[6,3,4,5,2,1] => 3520
[6,3,5,1,2,4] => 450
[6,3,5,1,4,2] => 2310
[6,3,5,2,1,4] => 2310
[6,3,5,2,4,1] => 7700
[6,3,5,4,1,2] => 4455
[6,3,5,4,2,1] => 21450
[6,4,1,2,3,5] => 28
[6,4,1,2,5,3] => 162
[6,4,1,3,2,5] => 162
[6,4,1,3,5,2] => 567
[6,4,1,5,2,3] => 450
[6,4,1,5,3,2] => 2310
[6,4,2,1,3,5] => 162
[6,4,2,1,5,3] => 1017
[6,4,2,3,1,5] => 567
[6,4,2,3,5,1] => 1540
[6,4,2,5,1,3] => 2310
[6,4,2,5,3,1] => 7700
[6,4,3,1,2,5] => 450
[6,4,3,1,5,2] => 2310
[6,4,3,2,1,5] => 2310
[6,4,3,2,5,1] => 7700
[6,4,3,5,1,2] => 4455
[6,4,3,5,2,1] => 21450
[6,4,5,1,2,3] => 660
[6,4,5,1,3,2] => 4158
[6,4,5,2,1,3] => 4158
[6,4,5,2,3,1] => 16016
[6,4,5,3,1,2] => 11583
[6,4,5,3,2,1] => 64064
[6,5,1,2,3,4] => 42
[6,5,1,2,4,3] => 288
[6,5,1,3,2,4] => 288
[6,5,1,3,4,2] => 1155
[6,5,1,4,2,3] => 990
[6,5,1,4,3,2] => 5775
[6,5,2,1,3,4] => 288
[6,5,2,1,4,3] => 2145
[6,5,2,3,1,4] => 1155
[6,5,2,3,4,1] => 3520
[6,5,2,4,1,3] => 5775
[6,5,2,4,3,1] => 21450
[6,5,3,1,2,4] => 990
[6,5,3,1,4,2] => 5775
[6,5,3,2,1,4] => 5775
[6,5,3,2,4,1] => 21450
[6,5,3,4,1,2] => 12870
[6,5,3,4,2,1] => 68640
[6,5,4,1,2,3] => 2112
[6,5,4,1,3,2] => 15015
[6,5,4,2,1,3] => 15015
[6,5,4,2,3,1] => 64064
[6,5,4,3,1,2] => 48048
[6,5,4,3,2,1] => 292864
[1,2,3,4,5,6,7] => 1
[1,2,3,4,5,7,6] => 1
[1,2,3,4,6,5,7] => 1
[1,2,3,6,4,7,5] => 2
[1,2,6,3,4,7,5] => 3
[1,3,2,4,5,6,7] => 1
[1,3,7,2,4,5,6] => 4
[1,3,7,6,5,4,2] => 2310
[1,4,6,7,2,3,5] => 42
[1,4,6,7,5,3,2] => 990
[1,4,7,2,3,5,6] => 9
[1,4,7,6,5,3,2] => 5775
[1,5,2,3,4,7,6] => 4
[1,5,2,7,3,4,6] => 14
[1,5,4,7,6,3,2] => 2145
[1,5,6,2,7,3,4] => 42
[1,5,6,4,7,3,2] => 990
[1,5,6,7,2,3,4] => 42
[1,5,6,7,4,3,2] => 2112
[1,5,7,2,3,4,6] => 14
[1,5,7,6,4,3,2] => 15015
[1,6,2,3,4,7,5] => 4
[1,6,2,3,7,4,5] => 9
[1,6,2,7,3,4,5] => 14
[1,6,5,4,3,7,2] => 2310
[1,6,5,4,7,3,2] => 5775
[1,6,5,7,4,3,2] => 15015
[1,6,7,2,3,4,5] => 14
[1,6,7,5,4,3,2] => 48048
[1,7,2,3,4,5,6] => 1
[1,7,3,5,6,4,2] => 1540
[1,7,3,6,5,4,2] => 7700
[1,7,4,3,6,5,2] => 3080
[1,7,4,5,3,6,2] => 1540
[1,7,4,5,6,3,2] => 3520
[1,7,4,6,5,3,2] => 21450
[1,7,5,4,3,6,2] => 7700
[1,7,5,4,6,3,2] => 21450
[1,7,6,4,5,3,2] => 68640
[1,7,6,5,4,3,2] => 292864
[2,1,3,4,5,6,7] => 1
[2,1,3,4,7,5,6] => 3
[2,1,3,7,4,5,6] => 4
[2,1,6,3,4,5,7] => 4
[2,1,7,3,4,5,6] => 5
[2,1,7,6,5,4,3] => 8448
[2,3,1,4,5,6,7] => 1
[2,3,4,1,5,6,7] => 1
[2,3,4,1,5,7,6] => 4
[2,3,4,5,1,6,7] => 1
[2,3,4,5,1,7,6] => 5
[2,3,4,5,6,1,7] => 1
[2,3,4,5,6,7,1] => 1
[2,3,4,5,7,1,6] => 5
[2,3,4,6,1,7,5] => 14
[2,3,4,6,7,1,5] => 14
[2,3,4,7,1,5,6] => 10
[2,3,5,6,7,1,4] => 28
[2,4,1,3,5,6,7] => 2
[2,5,1,3,4,6,7] => 3
[2,5,7,1,3,4,6] => 70
[2,6,1,3,4,5,7] => 4
[2,6,1,7,3,4,5] => 84
[2,6,5,4,3,1,7] => 2310
[2,6,7,1,3,4,5] => 84
[2,7,1,3,4,5,6] => 5
[3,1,2,4,5,6,7] => 1
[3,1,2,4,5,7,6] => 3
[3,2,1,4,5,6,7] => 2
[3,2,4,5,6,7,1] => 6
[3,4,1,2,5,6,7] => 2
[3,4,2,5,6,7,1] => 20
[3,4,5,2,6,7,1] => 48
[3,4,5,6,2,7,1] => 90
[3,4,5,6,7,1,2] => 42
[3,5,6,1,2,4,7] => 42
[3,5,6,4,2,1,7] => 990
[3,6,1,2,4,5,7] => 9
[3,6,5,4,2,1,7] => 5775
[4,1,2,3,5,6,7] => 1
[4,1,2,3,5,7,6] => 4
[4,1,6,2,3,5,7] => 14
[4,2,3,5,6,7,1] => 21
[4,2,5,1,3,6,7] => 16
[4,3,2,1,5,6,7] => 16
[4,3,2,5,6,7,1] => 105
[4,3,5,2,6,7,1] => 315
[4,3,6,5,2,1,7] => 2145
[4,5,1,6,2,3,7] => 42
[4,5,2,3,6,7,1] => 225
[4,5,3,6,2,1,7] => 990
[4,5,6,1,2,3,7] => 42
[4,5,6,3,2,1,7] => 2112
[4,6,1,2,3,5,7] => 14
[4,6,1,2,3,7,5] => 84
[4,6,5,3,2,1,7] => 15015
[5,1,2,3,4,6,7] => 1
[5,1,2,3,4,7,6] => 5
[5,1,2,3,6,4,7] => 4
[5,1,2,3,6,7,4] => 10
[5,1,2,3,7,4,6] => 14
[5,1,2,6,3,4,7] => 9
[5,1,6,2,3,4,7] => 14
[5,1,6,2,3,7,4] => 70
[5,2,3,4,6,7,1] => 56
[5,2,6,7,1,3,4] => 1188
[5,3,2,4,6,7,1] => 350
[5,3,2,6,1,4,7] => 432
[5,3,6,7,1,2,4] => 2970
[5,4,3,2,1,6,7] => 768
[5,4,3,2,1,7,6] => 8448
[5,4,3,2,6,1,7] => 2310
[5,4,3,6,2,1,7] => 5775
[5,4,6,3,2,1,7] => 15015
[5,4,6,7,1,2,3] => 3432
[5,6,1,2,3,4,7] => 14
[5,6,1,2,3,7,4] => 84
[5,6,3,4,1,2,7] => 2640
[5,6,4,3,2,1,7] => 48048
[5,6,7,1,2,3,4] => 462
[6,1,2,3,4,5,7] => 1
[6,1,2,3,4,7,5] => 5
[6,1,2,3,7,4,5] => 14
[6,1,2,7,3,4,5] => 28
[6,2,3,4,5,7,1] => 126
[6,2,4,5,3,1,7] => 1540
[6,2,5,4,3,1,7] => 7700
[6,3,2,5,4,1,7] => 3080
[6,3,4,2,5,1,7] => 1540
[6,3,4,5,2,1,7] => 3520
[6,3,4,7,1,2,5] => 4455
[6,3,5,4,2,1,7] => 21450
[6,4,3,2,5,1,7] => 7700
[6,4,3,2,7,1,5] => 58916
[6,4,3,5,2,1,7] => 21450
[6,4,5,7,1,2,3] => 15015
[6,4,7,2,5,1,3] => 292864
[6,4,7,3,5,1,2] => 640640
[6,5,3,4,2,1,7] => 68640
[6,5,4,3,2,1,7] => 292864
[6,5,7,3,4,1,2] => 1361360
[6,7,1,2,3,4,5] => 42
[6,7,3,4,1,2,5] => 21450
[6,7,4,5,1,2,3] => 171600
[7,1,2,3,4,5,6] => 1
[7,2,1,3,4,5,6] => 6
[7,2,3,1,4,5,6] => 21
[7,2,3,4,1,5,6] => 56
[7,2,3,4,5,1,6] => 126
[7,3,1,2,4,5,6] => 20
[7,3,2,1,4,5,6] => 105
[7,3,2,4,1,5,6] => 350
[7,3,4,1,2,5,6] => 225
[7,4,1,2,3,5,6] => 48
[7,4,2,1,3,5,6] => 315
[7,4,5,6,1,2,3] => 50050
[7,5,1,2,3,4,6] => 90
[7,5,6,1,2,3,4] => 9009
[7,5,6,3,4,1,2] => 6534528
[7,6,1,2,3,4,5] => 132
[7,6,4,5,1,2,3] => 972400
[7,6,5,1,2,3,4] => 30030
[1,2,3,4,5,6,7,8] => 1
[1,7,8,6,5,4,3,2] => 141892608
[1,6,8,7,5,4,3,2] => 34918884
[1,7,6,8,5,4,3,2] => 34918884
[1,6,7,8,5,4,3,2] => 3734016
[1,5,8,7,6,4,3,2] => 10720710
[1,7,6,5,8,4,3,2] => 10720710
[1,3,5,7,8,6,4,2] => 2673
[1,4,3,8,7,6,5,2] => 61204
[1,6,5,4,3,8,7,2] => 61204
[1,4,3,6,5,8,7,2] => 314
[1,2,6,7,8,5,4,3] => 2112
[1,2,3,5,6,7,8,4] => 1
[1,2,3,4,5,6,8,7] => 1
[1,4,3,2,7,6,5,8] => 80
[1,3,4,2,6,7,5,8] => 6
[1,3,2,5,4,7,6,8] => 6
[1,2,3,5,4,7,6,8] => 2
[1,3,2,4,5,7,6,8] => 2
[1,2,3,4,5,7,6,8] => 1
[1,2,4,3,6,5,7,8] => 2
[1,3,2,5,4,6,7,8] => 2
[1,2,3,5,4,6,7,8] => 1
[1,3,2,4,5,6,7,8] => 1
[1,3,2,5,4,8,6,7] => 12
[1,3,5,8,2,4,6,7] => 35
[1,3,5,6,2,7,4,8] => 14
[1,3,2,6,4,7,5,8] => 8
[1,3,2,6,4,8,5,7] => 25
[1,3,2,6,4,5,7,8] => 3
[1,3,2,7,4,8,5,6] => 30
[1,3,2,7,4,5,6,8] => 4
[1,3,2,8,4,5,6,7] => 5
[1,3,2,4,5,8,6,7] => 3
[1,4,2,5,3,7,6,8] => 8
[1,4,2,5,3,8,6,7] => 20
[1,4,2,5,3,6,7,8] => 2
[1,4,5,6,7,2,3,8] => 14
[1,4,2,6,3,7,5,8] => 16
[1,4,2,6,7,8,3,5] => 84
[1,4,2,6,3,8,5,7] => 61
[1,4,2,6,3,5,7,8] => 5
[1,4,2,7,3,8,5,6] => 91
[1,4,2,7,3,5,6,8] => 9
[1,4,2,3,7,5,6,8] => 6
[1,4,2,3,5,7,6,8] => 3
[1,4,2,8,3,5,6,7] => 14
[1,4,2,3,5,8,6,7] => 6
[1,4,2,3,5,6,7,8] => 1
[1,5,2,6,3,7,4,8] => 16
[1,5,2,6,3,8,4,7] => 77
[1,5,2,6,3,4,7,8] => 5
[1,2,5,6,3,4,7,8] => 2
[1,5,2,7,3,8,4,6] => 168
[1,5,2,7,3,4,6,8] => 14
[1,5,2,3,4,7,6,8] => 4
[1,5,2,8,3,4,6,7] => 28
[1,5,8,2,3,4,6,7] => 28
[1,5,2,3,4,8,6,7] => 10
[1,2,3,5,4,8,6,7] => 3
[1,5,2,3,4,6,7,8] => 1
[1,6,2,7,3,8,4,5] => 168
[1,6,7,8,2,3,4,5] => 462
[1,6,2,7,3,4,5,8] => 14
[1,6,7,2,3,4,5,8] => 14
[1,6,2,3,4,7,5,8] => 4
[1,2,3,6,4,7,5,8] => 2
[1,6,2,8,3,4,5,7] => 42
[1,6,8,2,3,4,5,7] => 42
[1,6,2,3,4,8,5,7] => 14
[1,2,3,6,4,8,5,7] => 5
[1,6,2,3,4,5,7,8] => 1
[1,2,3,6,4,5,7,8] => 1
[1,7,2,8,3,4,5,6] => 42
[1,7,8,2,3,4,5,6] => 42
[1,7,2,3,8,4,5,6] => 28
[1,7,2,3,4,8,5,6] => 14
[1,2,3,7,4,8,5,6] => 5
[1,7,2,3,4,5,8,6] => 5
[1,2,7,3,4,5,8,6] => 4
[1,7,2,3,4,5,6,8] => 1
[1,2,3,7,4,5,6,8] => 1
[1,2,3,8,4,5,6,7] => 1
[1,2,3,4,5,8,6,7] => 1
[1,6,7,4,5,2,3,8] => 2640
[1,2,3,8,4,7,5,6] => 9
[1,6,2,5,3,4,7,8] => 9
[1,7,2,6,3,5,4,8] => 162
[1,7,2,6,3,4,5,8] => 28
[1,6,2,7,3,5,4,8] => 70
[1,6,2,5,3,7,4,8] => 35
[1,5,3,7,2,6,4,8] => 244
[1,7,2,8,3,5,4,6] => 288
[1,7,6,5,4,8,2,3] => 640640
[1,5,4,2,8,3,6,7] => 232
[1,7,2,5,3,4,6,8] => 14
[1,6,2,4,3,5,7,8] => 4
[1,5,2,4,3,6,7,8] => 3
[1,6,2,4,3,7,5,8] => 19
[1,2,3,8,4,6,5,7] => 4
[1,7,2,8,3,6,4,5] => 990
[1,5,2,8,3,7,4,6] => 534
[1,2,8,7,4,5,6,3] => 3520
[1,2,3,7,4,6,5,8] => 3
[1,5,7,3,8,4,6,2] => 23452
[1,3,2,8,4,7,5,6] => 63
[1,7,2,5,3,6,4,8] => 64
[1,6,2,8,3,7,4,5] => 702
[1,6,2,5,8,3,4,7] => 288
[1,7,2,8,4,5,3,6] => 1155
[1,7,3,4,2,5,8,6] => 99
[1,6,2,8,3,5,4,7] => 246
[1,7,6,8,5,4,2,3] => 5105100
[1,7,2,6,3,8,4,5] => 450
[1,7,2,4,3,5,6,8] => 5
[1,7,2,3,4,6,5,8] => 5
[1,6,7,8,3,4,5,2] => 50050
[1,3,2,7,4,6,5,8] => 15
[1,2,7,6,8,3,4,5] => 210
[1,7,2,5,3,8,4,6] => 282
[1,4,2,8,3,7,5,6] => 232
[1,6,2,4,3,8,5,7] => 78
[1,6,8,5,3,7,4,2] => 1153152
[1,3,6,7,5,8,2,4] => 990
[1,2,7,5,8,3,4,6] => 168
[1,6,7,2,8,4,3,5] => 2970
[1,4,3,7,8,5,6,2] => 2090
[1,5,6,3,4,8,7,2] => 2090
[1,5,2,4,3,7,6,8] => 15
[1,3,2,8,4,6,5,7] => 24
[1,7,2,4,3,6,5,8] => 29
[1,5,8,4,3,2,6,7] => 2310
[1,7,4,3,8,5,2,6] => 11220
[1,5,7,3,8,4,2,6] => 8613
[1,4,3,8,7,5,6,2] => 11121
[1,7,5,6,3,2,8,4] => 27599
[1,7,8,5,2,6,4,3] => 640640
[1,4,2,8,3,6,5,7] => 78
[1,4,6,7,3,2,8,5] => 912
[1,7,4,8,6,3,5,2] => 1153152
[1,3,7,4,6,8,2,5] => 567
[1,7,2,8,5,3,4,6] => 990
[1,3,8,7,5,6,2,4] => 68640
[1,2,8,7,6,3,4,5] => 2112
[1,7,5,4,8,3,6,2] => 474903
[1,7,6,8,4,3,5,2] => 2362932
[1,7,8,6,5,3,4,2] => 26604864
[1,5,2,8,3,6,4,7] => 134
[1,5,2,4,3,8,6,7] => 45
[1,6,7,3,2,5,4,8] => 552
[1,5,4,7,6,2,3,8] => 552
[1,7,4,5,3,2,8,6] => 4675
[1,7,3,5,6,8,2,4] => 3520
[1,7,2,5,8,6,4,3] => 21450
[1,7,4,8,2,6,5,3] => 132704
[1,6,4,7,5,8,2,3] => 8580
[1,4,8,6,7,5,2,3] => 126126
[1,5,8,3,7,6,4,2] => 474903
[1,6,8,7,3,5,4,2] => 2362932
[1,4,2,7,3,6,5,8] => 40
[1,5,2,7,3,6,4,8] => 56
[1,7,2,4,3,8,5,6] => 92
[1,6,2,5,3,8,4,7] => 190
[1,7,9,2,3,4,5,6,8] => 132
[1,2,3,4,5,6,7,9,8] => 1
[1,2,3,4,5,6,7,8,9] => 1
[1,2,3,4,5,6,7,8,9,10] => 1
[1,2,3,4,5,6,7,8,10,9] => 1
[1,2,3,4,5,6,7,8,9,11,10] => 1
click to show generating function       
Description
The number of reduced words for a permutation.
This is the number of ways to write a permutation as a minimal length product of simple transpositions. E.g., there are two reduced words for the permutation $[3,2,1]$, which are $(1,2)(2,3)(1,2) = (2,3)(1,2)(2,3)$.
References
[1] Edelman, P., Greene, C. Balanced tableaux MathSciNet:0871081
[2] Number of simple allowable sequences on 1..n containing the permutation 12...n. OEIS:A005118
[3] Total number of reduced decompositions for all permutations in S_n. OEIS:A246865
Code
def statistic(x):
    return sum(1 for _ in x.reduced_words_iterator())

Created
Sep 13, 2011 at 22:02 by Chris Berg
Updated
May 23, 2019 at 16:07 by Martin Rubey