Identifier
Identifier
Values
[1,2] => 0
[2,1] => 2
[1,2,3] => 0
[1,3,2] => 2
[2,1,3] => 2
[2,3,1] => 6
[3,1,2] => 6
[3,2,1] => 8
[1,2,3,4] => 0
[1,2,4,3] => 2
[1,3,2,4] => 2
[1,3,4,2] => 6
[1,4,2,3] => 6
[1,4,3,2] => 8
[2,1,3,4] => 2
[2,1,4,3] => 4
[2,3,1,4] => 6
[2,3,4,1] => 12
[2,4,1,3] => 10
[2,4,3,1] => 14
[3,1,2,4] => 6
[3,1,4,2] => 10
[3,2,1,4] => 8
[3,2,4,1] => 14
[3,4,1,2] => 16
[3,4,2,1] => 18
[4,1,2,3] => 12
[4,1,3,2] => 14
[4,2,1,3] => 14
[4,2,3,1] => 18
[4,3,1,2] => 18
[4,3,2,1] => 20
[1,2,3,4,5] => 0
[1,2,3,5,4] => 2
[1,2,4,3,5] => 2
[1,2,4,5,3] => 6
[1,2,5,3,4] => 6
[1,2,5,4,3] => 8
[1,3,2,4,5] => 2
[1,3,2,5,4] => 4
[1,3,4,2,5] => 6
[1,3,4,5,2] => 12
[1,3,5,2,4] => 10
[1,3,5,4,2] => 14
[1,4,2,3,5] => 6
[1,4,2,5,3] => 10
[1,4,3,2,5] => 8
[1,4,3,5,2] => 14
[1,4,5,2,3] => 16
[1,4,5,3,2] => 18
[1,5,2,3,4] => 12
[1,5,2,4,3] => 14
[1,5,3,2,4] => 14
[1,5,3,4,2] => 18
[1,5,4,2,3] => 18
[1,5,4,3,2] => 20
[2,1,3,4,5] => 2
[2,1,3,5,4] => 4
[2,1,4,3,5] => 4
[2,1,4,5,3] => 8
[2,1,5,3,4] => 8
[2,1,5,4,3] => 10
[2,3,1,4,5] => 6
[2,3,1,5,4] => 8
[2,3,4,1,5] => 12
[2,3,4,5,1] => 20
[2,3,5,1,4] => 16
[2,3,5,4,1] => 22
[2,4,1,3,5] => 10
[2,4,1,5,3] => 14
[2,4,3,1,5] => 14
[2,4,3,5,1] => 22
[2,4,5,1,3] => 22
[2,4,5,3,1] => 26
[2,5,1,3,4] => 16
[2,5,1,4,3] => 18
[2,5,3,1,4] => 20
[2,5,3,4,1] => 26
[2,5,4,1,3] => 24
[2,5,4,3,1] => 28
[3,1,2,4,5] => 6
[3,1,2,5,4] => 8
[3,1,4,2,5] => 10
[3,1,4,5,2] => 16
[3,1,5,2,4] => 14
[3,1,5,4,2] => 18
[3,2,1,4,5] => 8
[3,2,1,5,4] => 10
[3,2,4,1,5] => 14
[3,2,4,5,1] => 22
[3,2,5,1,4] => 18
[3,2,5,4,1] => 24
[3,4,1,2,5] => 16
[3,4,1,5,2] => 22
[3,4,2,1,5] => 18
[3,4,2,5,1] => 26
[3,4,5,1,2] => 30
[3,4,5,2,1] => 32
[3,5,1,2,4] => 22
[3,5,1,4,2] => 26
[3,5,2,1,4] => 24
[3,5,2,4,1] => 30
[3,5,4,1,2] => 32
[3,5,4,2,1] => 34
[4,1,2,3,5] => 12
[4,1,2,5,3] => 16
[4,1,3,2,5] => 14
[4,1,3,5,2] => 20
[4,1,5,2,3] => 22
[4,1,5,3,2] => 24
[4,2,1,3,5] => 14
[4,2,1,5,3] => 18
[4,2,3,1,5] => 18
[4,2,3,5,1] => 26
[4,2,5,1,3] => 26
[4,2,5,3,1] => 30
[4,3,1,2,5] => 18
[4,3,1,5,2] => 24
[4,3,2,1,5] => 20
[4,3,2,5,1] => 28
[4,3,5,1,2] => 32
[4,3,5,2,1] => 34
[4,5,1,2,3] => 30
[4,5,1,3,2] => 32
[4,5,2,1,3] => 32
[4,5,2,3,1] => 36
[4,5,3,1,2] => 36
[4,5,3,2,1] => 38
[5,1,2,3,4] => 20
[5,1,2,4,3] => 22
[5,1,3,2,4] => 22
[5,1,3,4,2] => 26
[5,1,4,2,3] => 26
[5,1,4,3,2] => 28
[5,2,1,3,4] => 22
[5,2,1,4,3] => 24
[5,2,3,1,4] => 26
[5,2,3,4,1] => 32
[5,2,4,1,3] => 30
[5,2,4,3,1] => 34
[5,3,1,2,4] => 26
[5,3,1,4,2] => 30
[5,3,2,1,4] => 28
[5,3,2,4,1] => 34
[5,3,4,1,2] => 36
[5,3,4,2,1] => 38
[5,4,1,2,3] => 32
[5,4,1,3,2] => 34
[5,4,2,1,3] => 34
[5,4,2,3,1] => 38
[5,4,3,1,2] => 38
[5,4,3,2,1] => 40
[1,2,3,4,5,6] => 0
[1,2,3,4,6,5] => 2
[1,2,3,5,4,6] => 2
[1,2,3,5,6,4] => 6
[1,2,3,6,4,5] => 6
[1,2,3,6,5,4] => 8
[1,2,4,3,5,6] => 2
[1,2,4,3,6,5] => 4
[1,2,4,5,3,6] => 6
[1,2,4,5,6,3] => 12
[1,2,4,6,3,5] => 10
[1,2,4,6,5,3] => 14
[1,2,5,3,4,6] => 6
[1,2,5,3,6,4] => 10
[1,2,5,4,3,6] => 8
[1,2,5,4,6,3] => 14
[1,2,5,6,3,4] => 16
[1,2,5,6,4,3] => 18
[1,2,6,3,4,5] => 12
[1,2,6,3,5,4] => 14
[1,2,6,4,3,5] => 14
[1,2,6,4,5,3] => 18
[1,2,6,5,3,4] => 18
[1,2,6,5,4,3] => 20
[1,3,2,4,5,6] => 2
[1,3,2,4,6,5] => 4
[1,3,2,5,4,6] => 4
[1,3,2,5,6,4] => 8
[1,3,2,6,4,5] => 8
[1,3,2,6,5,4] => 10
[1,3,4,2,5,6] => 6
[1,3,4,2,6,5] => 8
[1,3,4,5,2,6] => 12
[1,3,4,5,6,2] => 20
[1,3,4,6,2,5] => 16
[1,3,4,6,5,2] => 22
[1,3,5,2,4,6] => 10
[1,3,5,2,6,4] => 14
[1,3,5,4,2,6] => 14
[1,3,5,4,6,2] => 22
[1,3,5,6,2,4] => 22
[1,3,5,6,4,2] => 26
[1,3,6,2,4,5] => 16
[1,3,6,2,5,4] => 18
[1,3,6,4,2,5] => 20
[1,3,6,4,5,2] => 26
[1,3,6,5,2,4] => 24
[1,3,6,5,4,2] => 28
[1,4,2,3,5,6] => 6
[1,4,2,3,6,5] => 8
[1,4,2,5,3,6] => 10
[1,4,2,5,6,3] => 16
[1,4,2,6,3,5] => 14
[1,4,2,6,5,3] => 18
[1,4,3,2,5,6] => 8
[1,4,3,2,6,5] => 10
[1,4,3,5,2,6] => 14
[1,4,3,5,6,2] => 22
[1,4,3,6,2,5] => 18
[1,4,3,6,5,2] => 24
[1,4,5,2,3,6] => 16
[1,4,5,2,6,3] => 22
[1,4,5,3,2,6] => 18
[1,4,5,3,6,2] => 26
[1,4,5,6,2,3] => 30
[1,4,5,6,3,2] => 32
[1,4,6,2,3,5] => 22
[1,4,6,2,5,3] => 26
[1,4,6,3,2,5] => 24
[1,4,6,3,5,2] => 30
[1,4,6,5,2,3] => 32
[1,4,6,5,3,2] => 34
[1,5,2,3,4,6] => 12
[1,5,2,3,6,4] => 16
[1,5,2,4,3,6] => 14
[1,5,2,4,6,3] => 20
[1,5,2,6,3,4] => 22
[1,5,2,6,4,3] => 24
[1,5,3,2,4,6] => 14
[1,5,3,2,6,4] => 18
[1,5,3,4,2,6] => 18
[1,5,3,4,6,2] => 26
[1,5,3,6,2,4] => 26
[1,5,3,6,4,2] => 30
[1,5,4,2,3,6] => 18
[1,5,4,2,6,3] => 24
[1,5,4,3,2,6] => 20
[1,5,4,3,6,2] => 28
[1,5,4,6,2,3] => 32
[1,5,4,6,3,2] => 34
[1,5,6,2,3,4] => 30
[1,5,6,2,4,3] => 32
[1,5,6,3,2,4] => 32
[1,5,6,3,4,2] => 36
[1,5,6,4,2,3] => 36
[1,5,6,4,3,2] => 38
[1,6,2,3,4,5] => 20
[1,6,2,3,5,4] => 22
[1,6,2,4,3,5] => 22
[1,6,2,4,5,3] => 26
[1,6,2,5,3,4] => 26
[1,6,2,5,4,3] => 28
[1,6,3,2,4,5] => 22
[1,6,3,2,5,4] => 24
[1,6,3,4,2,5] => 26
[1,6,3,4,5,2] => 32
[1,6,3,5,2,4] => 30
[1,6,3,5,4,2] => 34
[1,6,4,2,3,5] => 26
[1,6,4,2,5,3] => 30
[1,6,4,3,2,5] => 28
[1,6,4,3,5,2] => 34
[1,6,4,5,2,3] => 36
[1,6,4,5,3,2] => 38
[1,6,5,2,3,4] => 32
[1,6,5,2,4,3] => 34
[1,6,5,3,2,4] => 34
[1,6,5,3,4,2] => 38
[1,6,5,4,2,3] => 38
[1,6,5,4,3,2] => 40
[2,1,3,4,5,6] => 2
[2,1,3,4,6,5] => 4
[2,1,3,5,4,6] => 4
[2,1,3,5,6,4] => 8
[2,1,3,6,4,5] => 8
[2,1,3,6,5,4] => 10
[2,1,4,3,5,6] => 4
[2,1,4,3,6,5] => 6
[2,1,4,5,3,6] => 8
[2,1,4,5,6,3] => 14
[2,1,4,6,3,5] => 12
[2,1,4,6,5,3] => 16
[2,1,5,3,4,6] => 8
[2,1,5,3,6,4] => 12
[2,1,5,4,3,6] => 10
[2,1,5,4,6,3] => 16
[2,1,5,6,3,4] => 18
[2,1,5,6,4,3] => 20
[2,1,6,3,4,5] => 14
[2,1,6,3,5,4] => 16
[2,1,6,4,3,5] => 16
[2,1,6,4,5,3] => 20
[2,1,6,5,3,4] => 20
[2,1,6,5,4,3] => 22
[2,3,1,4,5,6] => 6
[2,3,1,4,6,5] => 8
[2,3,1,5,4,6] => 8
[2,3,1,5,6,4] => 12
[2,3,1,6,4,5] => 12
[2,3,1,6,5,4] => 14
[2,3,4,1,5,6] => 12
[2,3,4,1,6,5] => 14
[2,3,4,5,1,6] => 20
[2,3,4,5,6,1] => 30
[2,3,4,6,1,5] => 24
[2,3,4,6,5,1] => 32
[2,3,5,1,4,6] => 16
[2,3,5,1,6,4] => 20
[2,3,5,4,1,6] => 22
[2,3,5,4,6,1] => 32
[2,3,5,6,1,4] => 30
[2,3,5,6,4,1] => 36
[2,3,6,1,4,5] => 22
[2,3,6,1,5,4] => 24
[2,3,6,4,1,5] => 28
[2,3,6,4,5,1] => 36
[2,3,6,5,1,4] => 32
[2,3,6,5,4,1] => 38
[2,4,1,3,5,6] => 10
[2,4,1,3,6,5] => 12
[2,4,1,5,3,6] => 14
[2,4,1,5,6,3] => 20
[2,4,1,6,3,5] => 18
[2,4,1,6,5,3] => 22
[2,4,3,1,5,6] => 14
[2,4,3,1,6,5] => 16
[2,4,3,5,1,6] => 22
[2,4,3,5,6,1] => 32
[2,4,3,6,1,5] => 26
[2,4,3,6,5,1] => 34
[2,4,5,1,3,6] => 22
[2,4,5,1,6,3] => 28
[2,4,5,3,1,6] => 26
[2,4,5,3,6,1] => 36
[2,4,5,6,1,3] => 38
[2,4,5,6,3,1] => 42
[2,4,6,1,3,5] => 28
[2,4,6,1,5,3] => 32
[2,4,6,3,1,5] => 32
[2,4,6,3,5,1] => 40
[2,4,6,5,1,3] => 40
[2,4,6,5,3,1] => 44
[2,5,1,3,4,6] => 16
[2,5,1,3,6,4] => 20
[2,5,1,4,3,6] => 18
[2,5,1,4,6,3] => 24
[2,5,1,6,3,4] => 26
[2,5,1,6,4,3] => 28
[2,5,3,1,4,6] => 20
[2,5,3,1,6,4] => 24
[2,5,3,4,1,6] => 26
[2,5,3,4,6,1] => 36
[2,5,3,6,1,4] => 34
[2,5,3,6,4,1] => 40
[2,5,4,1,3,6] => 24
[2,5,4,1,6,3] => 30
[2,5,4,3,1,6] => 28
[2,5,4,3,6,1] => 38
[2,5,4,6,1,3] => 40
[2,5,4,6,3,1] => 44
[2,5,6,1,3,4] => 36
[2,5,6,1,4,3] => 38
[2,5,6,3,1,4] => 40
[2,5,6,3,4,1] => 46
[2,5,6,4,1,3] => 44
[2,5,6,4,3,1] => 48
[2,6,1,3,4,5] => 24
[2,6,1,3,5,4] => 26
[2,6,1,4,3,5] => 26
[2,6,1,4,5,3] => 30
[2,6,1,5,3,4] => 30
[2,6,1,5,4,3] => 32
[2,6,3,1,4,5] => 28
[2,6,3,1,5,4] => 30
[2,6,3,4,1,5] => 34
[2,6,3,4,5,1] => 42
[2,6,3,5,1,4] => 38
[2,6,3,5,4,1] => 44
[2,6,4,1,3,5] => 32
[2,6,4,1,5,3] => 36
[2,6,4,3,1,5] => 36
[2,6,4,3,5,1] => 44
[2,6,4,5,1,3] => 44
[2,6,4,5,3,1] => 48
[2,6,5,1,3,4] => 38
[2,6,5,1,4,3] => 40
[2,6,5,3,1,4] => 42
[2,6,5,3,4,1] => 48
[2,6,5,4,1,3] => 46
[2,6,5,4,3,1] => 50
[3,1,2,4,5,6] => 6
[3,1,2,4,6,5] => 8
[3,1,2,5,4,6] => 8
[3,1,2,5,6,4] => 12
[3,1,2,6,4,5] => 12
[3,1,2,6,5,4] => 14
[3,1,4,2,5,6] => 10
[3,1,4,2,6,5] => 12
[3,1,4,5,2,6] => 16
[3,1,4,5,6,2] => 24
[3,1,4,6,2,5] => 20
[3,1,4,6,5,2] => 26
[3,1,5,2,4,6] => 14
[3,1,5,2,6,4] => 18
[3,1,5,4,2,6] => 18
[3,1,5,4,6,2] => 26
[3,1,5,6,2,4] => 26
[3,1,5,6,4,2] => 30
[3,1,6,2,4,5] => 20
[3,1,6,2,5,4] => 22
[3,1,6,4,2,5] => 24
[3,1,6,4,5,2] => 30
[3,1,6,5,2,4] => 28
[3,1,6,5,4,2] => 32
[3,2,1,4,5,6] => 8
[3,2,1,4,6,5] => 10
[3,2,1,5,4,6] => 10
[3,2,1,5,6,4] => 14
[3,2,1,6,4,5] => 14
[3,2,1,6,5,4] => 16
[3,2,4,1,5,6] => 14
[3,2,4,1,6,5] => 16
[3,2,4,5,1,6] => 22
[3,2,4,5,6,1] => 32
[3,2,4,6,1,5] => 26
[3,2,4,6,5,1] => 34
[3,2,5,1,4,6] => 18
[3,2,5,1,6,4] => 22
[3,2,5,4,1,6] => 24
[3,2,5,4,6,1] => 34
[3,2,5,6,1,4] => 32
[3,2,5,6,4,1] => 38
[3,2,6,1,4,5] => 24
[3,2,6,1,5,4] => 26
[3,2,6,4,1,5] => 30
[3,2,6,4,5,1] => 38
[3,2,6,5,1,4] => 34
[3,2,6,5,4,1] => 40
[3,4,1,2,5,6] => 16
[3,4,1,2,6,5] => 18
[3,4,1,5,2,6] => 22
[3,4,1,5,6,2] => 30
[3,4,1,6,2,5] => 26
[3,4,1,6,5,2] => 32
[3,4,2,1,5,6] => 18
[3,4,2,1,6,5] => 20
[3,4,2,5,1,6] => 26
[3,4,2,5,6,1] => 36
[3,4,2,6,1,5] => 30
[3,4,2,6,5,1] => 38
[3,4,5,1,2,6] => 30
[3,4,5,1,6,2] => 38
[3,4,5,2,1,6] => 32
[3,4,5,2,6,1] => 42
[3,4,5,6,1,2] => 48
[3,4,5,6,2,1] => 50
[3,4,6,1,2,5] => 36
[3,4,6,1,5,2] => 42
[3,4,6,2,1,5] => 38
[3,4,6,2,5,1] => 46
[3,4,6,5,1,2] => 50
[3,4,6,5,2,1] => 52
[3,5,1,2,4,6] => 22
[3,5,1,2,6,4] => 26
[3,5,1,4,2,6] => 26
[3,5,1,4,6,2] => 34
[3,5,1,6,2,4] => 34
[3,5,1,6,4,2] => 38
[3,5,2,1,4,6] => 24
[3,5,2,1,6,4] => 28
[3,5,2,4,1,6] => 30
[3,5,2,4,6,1] => 40
[3,5,2,6,1,4] => 38
[3,5,2,6,4,1] => 44
[3,5,4,1,2,6] => 32
[3,5,4,1,6,2] => 40
[3,5,4,2,1,6] => 34
[3,5,4,2,6,1] => 44
[3,5,4,6,1,2] => 50
[3,5,4,6,2,1] => 52
[3,5,6,1,2,4] => 44
[3,5,6,1,4,2] => 48
[3,5,6,2,1,4] => 46
[3,5,6,2,4,1] => 52
[3,5,6,4,1,2] => 54
[3,5,6,4,2,1] => 56
[3,6,1,2,4,5] => 30
[3,6,1,2,5,4] => 32
[3,6,1,4,2,5] => 34
[3,6,1,4,5,2] => 40
[3,6,1,5,2,4] => 38
[3,6,1,5,4,2] => 42
[3,6,2,1,4,5] => 32
[3,6,2,1,5,4] => 34
[3,6,2,4,1,5] => 38
[3,6,2,4,5,1] => 46
[3,6,2,5,1,4] => 42
[3,6,2,5,4,1] => 48
[3,6,4,1,2,5] => 40
[3,6,4,1,5,2] => 46
[3,6,4,2,1,5] => 42
[3,6,4,2,5,1] => 50
[3,6,4,5,1,2] => 54
[3,6,4,5,2,1] => 56
[3,6,5,1,2,4] => 46
[3,6,5,1,4,2] => 50
[3,6,5,2,1,4] => 48
[3,6,5,2,4,1] => 54
[3,6,5,4,1,2] => 56
[3,6,5,4,2,1] => 58
[4,1,2,3,5,6] => 12
[4,1,2,3,6,5] => 14
[4,1,2,5,3,6] => 16
[4,1,2,5,6,3] => 22
[4,1,2,6,3,5] => 20
[4,1,2,6,5,3] => 24
[4,1,3,2,5,6] => 14
[4,1,3,2,6,5] => 16
[4,1,3,5,2,6] => 20
[4,1,3,5,6,2] => 28
[4,1,3,6,2,5] => 24
[4,1,3,6,5,2] => 30
[4,1,5,2,3,6] => 22
[4,1,5,2,6,3] => 28
[4,1,5,3,2,6] => 24
[4,1,5,3,6,2] => 32
[4,1,5,6,2,3] => 36
[4,1,5,6,3,2] => 38
[4,1,6,2,3,5] => 28
[4,1,6,2,5,3] => 32
[4,1,6,3,2,5] => 30
[4,1,6,3,5,2] => 36
[4,1,6,5,2,3] => 38
[4,1,6,5,3,2] => 40
[4,2,1,3,5,6] => 14
[4,2,1,3,6,5] => 16
[4,2,1,5,3,6] => 18
[4,2,1,5,6,3] => 24
[4,2,1,6,3,5] => 22
[4,2,1,6,5,3] => 26
[4,2,3,1,5,6] => 18
[4,2,3,1,6,5] => 20
[4,2,3,5,1,6] => 26
[4,2,3,5,6,1] => 36
[4,2,3,6,1,5] => 30
[4,2,3,6,5,1] => 38
[4,2,5,1,3,6] => 26
[4,2,5,1,6,3] => 32
[4,2,5,3,1,6] => 30
[4,2,5,3,6,1] => 40
[4,2,5,6,1,3] => 42
[4,2,5,6,3,1] => 46
[4,2,6,1,3,5] => 32
[4,2,6,1,5,3] => 36
[4,2,6,3,1,5] => 36
[4,2,6,3,5,1] => 44
[4,2,6,5,1,3] => 44
[4,2,6,5,3,1] => 48
[4,3,1,2,5,6] => 18
[4,3,1,2,6,5] => 20
[4,3,1,5,2,6] => 24
[4,3,1,5,6,2] => 32
[4,3,1,6,2,5] => 28
[4,3,1,6,5,2] => 34
[4,3,2,1,5,6] => 20
[4,3,2,1,6,5] => 22
[4,3,2,5,1,6] => 28
[4,3,2,5,6,1] => 38
[4,3,2,6,1,5] => 32
[4,3,2,6,5,1] => 40
[4,3,5,1,2,6] => 32
[4,3,5,1,6,2] => 40
[4,3,5,2,1,6] => 34
[4,3,5,2,6,1] => 44
[4,3,5,6,1,2] => 50
[4,3,5,6,2,1] => 52
[4,3,6,1,2,5] => 38
[4,3,6,1,5,2] => 44
[4,3,6,2,1,5] => 40
[4,3,6,2,5,1] => 48
[4,3,6,5,1,2] => 52
[4,3,6,5,2,1] => 54
[4,5,1,2,3,6] => 30
[4,5,1,2,6,3] => 36
[4,5,1,3,2,6] => 32
[4,5,1,3,6,2] => 40
[4,5,1,6,2,3] => 44
[4,5,1,6,3,2] => 46
[4,5,2,1,3,6] => 32
[4,5,2,1,6,3] => 38
[4,5,2,3,1,6] => 36
[4,5,2,3,6,1] => 46
[4,5,2,6,1,3] => 48
[4,5,2,6,3,1] => 52
[4,5,3,1,2,6] => 36
[4,5,3,1,6,2] => 44
[4,5,3,2,1,6] => 38
[4,5,3,2,6,1] => 48
[4,5,3,6,1,2] => 54
[4,5,3,6,2,1] => 56
[4,5,6,1,2,3] => 54
[4,5,6,1,3,2] => 56
[4,5,6,2,1,3] => 56
[4,5,6,2,3,1] => 60
[4,5,6,3,1,2] => 60
[4,5,6,3,2,1] => 62
[4,6,1,2,3,5] => 38
[4,6,1,2,5,3] => 42
[4,6,1,3,2,5] => 40
[4,6,1,3,5,2] => 46
[4,6,1,5,2,3] => 48
[4,6,1,5,3,2] => 50
[4,6,2,1,3,5] => 40
[4,6,2,1,5,3] => 44
[4,6,2,3,1,5] => 44
[4,6,2,3,5,1] => 52
[4,6,2,5,1,3] => 52
[4,6,2,5,3,1] => 56
[4,6,3,1,2,5] => 44
[4,6,3,1,5,2] => 50
[4,6,3,2,1,5] => 46
[4,6,3,2,5,1] => 54
[4,6,3,5,1,2] => 58
[4,6,3,5,2,1] => 60
[4,6,5,1,2,3] => 56
[4,6,5,1,3,2] => 58
[4,6,5,2,1,3] => 58
[4,6,5,2,3,1] => 62
[4,6,5,3,1,2] => 62
[4,6,5,3,2,1] => 64
[5,1,2,3,4,6] => 20
[5,1,2,3,6,4] => 24
[5,1,2,4,3,6] => 22
[5,1,2,4,6,3] => 28
[5,1,2,6,3,4] => 30
[5,1,2,6,4,3] => 32
[5,1,3,2,4,6] => 22
[5,1,3,2,6,4] => 26
[5,1,3,4,2,6] => 26
[5,1,3,4,6,2] => 34
[5,1,3,6,2,4] => 34
[5,1,3,6,4,2] => 38
[5,1,4,2,3,6] => 26
[5,1,4,2,6,3] => 32
[5,1,4,3,2,6] => 28
[5,1,4,3,6,2] => 36
[5,1,4,6,2,3] => 40
[5,1,4,6,3,2] => 42
[5,1,6,2,3,4] => 38
[5,1,6,2,4,3] => 40
[5,1,6,3,2,4] => 40
[5,1,6,3,4,2] => 44
[5,1,6,4,2,3] => 44
[5,1,6,4,3,2] => 46
[5,2,1,3,4,6] => 22
[5,2,1,3,6,4] => 26
[5,2,1,4,3,6] => 24
[5,2,1,4,6,3] => 30
[5,2,1,6,3,4] => 32
[5,2,1,6,4,3] => 34
[5,2,3,1,4,6] => 26
[5,2,3,1,6,4] => 30
[5,2,3,4,1,6] => 32
[5,2,3,4,6,1] => 42
[5,2,3,6,1,4] => 40
[5,2,3,6,4,1] => 46
[5,2,4,1,3,6] => 30
[5,2,4,1,6,3] => 36
[5,2,4,3,1,6] => 34
[5,2,4,3,6,1] => 44
[5,2,4,6,1,3] => 46
[5,2,4,6,3,1] => 50
[5,2,6,1,3,4] => 42
[5,2,6,1,4,3] => 44
[5,2,6,3,1,4] => 46
[5,2,6,3,4,1] => 52
[5,2,6,4,1,3] => 50
[5,2,6,4,3,1] => 54
[5,3,1,2,4,6] => 26
[5,3,1,2,6,4] => 30
[5,3,1,4,2,6] => 30
[5,3,1,4,6,2] => 38
[5,3,1,6,2,4] => 38
[5,3,1,6,4,2] => 42
[5,3,2,1,4,6] => 28
[5,3,2,1,6,4] => 32
[5,3,2,4,1,6] => 34
[5,3,2,4,6,1] => 44
[5,3,2,6,1,4] => 42
[5,3,2,6,4,1] => 48
[5,3,4,1,2,6] => 36
[5,3,4,1,6,2] => 44
[5,3,4,2,1,6] => 38
[5,3,4,2,6,1] => 48
[5,3,4,6,1,2] => 54
[5,3,4,6,2,1] => 56
[5,3,6,1,2,4] => 48
[5,3,6,1,4,2] => 52
[5,3,6,2,1,4] => 50
[5,3,6,2,4,1] => 56
[5,3,6,4,1,2] => 58
[5,3,6,4,2,1] => 60
[5,4,1,2,3,6] => 32
[5,4,1,2,6,3] => 38
[5,4,1,3,2,6] => 34
[5,4,1,3,6,2] => 42
[5,4,1,6,2,3] => 46
[5,4,1,6,3,2] => 48
[5,4,2,1,3,6] => 34
[5,4,2,1,6,3] => 40
[5,4,2,3,1,6] => 38
[5,4,2,3,6,1] => 48
[5,4,2,6,1,3] => 50
[5,4,2,6,3,1] => 54
[5,4,3,1,2,6] => 38
[5,4,3,1,6,2] => 46
[5,4,3,2,1,6] => 40
[5,4,3,2,6,1] => 50
[5,4,3,6,1,2] => 56
[5,4,3,6,2,1] => 58
[5,4,6,1,2,3] => 56
[5,4,6,1,3,2] => 58
[5,4,6,2,1,3] => 58
[5,4,6,2,3,1] => 62
[5,4,6,3,1,2] => 62
[5,4,6,3,2,1] => 64
[5,6,1,2,3,4] => 48
[5,6,1,2,4,3] => 50
[5,6,1,3,2,4] => 50
[5,6,1,3,4,2] => 54
[5,6,1,4,2,3] => 54
[5,6,1,4,3,2] => 56
[5,6,2,1,3,4] => 50
[5,6,2,1,4,3] => 52
[5,6,2,3,1,4] => 54
[5,6,2,3,4,1] => 60
[5,6,2,4,1,3] => 58
[5,6,2,4,3,1] => 62
[5,6,3,1,2,4] => 54
[5,6,3,1,4,2] => 58
[5,6,3,2,1,4] => 56
[5,6,3,2,4,1] => 62
[5,6,3,4,1,2] => 64
[5,6,3,4,2,1] => 66
[5,6,4,1,2,3] => 60
[5,6,4,1,3,2] => 62
[5,6,4,2,1,3] => 62
[5,6,4,2,3,1] => 66
[5,6,4,3,1,2] => 66
[5,6,4,3,2,1] => 68
[6,1,2,3,4,5] => 30
[6,1,2,3,5,4] => 32
[6,1,2,4,3,5] => 32
[6,1,2,4,5,3] => 36
[6,1,2,5,3,4] => 36
[6,1,2,5,4,3] => 38
[6,1,3,2,4,5] => 32
[6,1,3,2,5,4] => 34
[6,1,3,4,2,5] => 36
[6,1,3,4,5,2] => 42
[6,1,3,5,2,4] => 40
[6,1,3,5,4,2] => 44
[6,1,4,2,3,5] => 36
[6,1,4,2,5,3] => 40
[6,1,4,3,2,5] => 38
[6,1,4,3,5,2] => 44
[6,1,4,5,2,3] => 46
[6,1,4,5,3,2] => 48
[6,1,5,2,3,4] => 42
[6,1,5,2,4,3] => 44
[6,1,5,3,2,4] => 44
[6,1,5,3,4,2] => 48
[6,1,5,4,2,3] => 48
[6,1,5,4,3,2] => 50
[6,2,1,3,4,5] => 32
[6,2,1,3,5,4] => 34
[6,2,1,4,3,5] => 34
[6,2,1,4,5,3] => 38
[6,2,1,5,3,4] => 38
[6,2,1,5,4,3] => 40
[6,2,3,1,4,5] => 36
[6,2,3,1,5,4] => 38
[6,2,3,4,1,5] => 42
[6,2,3,4,5,1] => 50
[6,2,3,5,1,4] => 46
[6,2,3,5,4,1] => 52
[6,2,4,1,3,5] => 40
[6,2,4,1,5,3] => 44
[6,2,4,3,1,5] => 44
[6,2,4,3,5,1] => 52
[6,2,4,5,1,3] => 52
[6,2,4,5,3,1] => 56
[6,2,5,1,3,4] => 46
[6,2,5,1,4,3] => 48
[6,2,5,3,1,4] => 50
[6,2,5,3,4,1] => 56
[6,2,5,4,1,3] => 54
[6,2,5,4,3,1] => 58
[6,3,1,2,4,5] => 36
[6,3,1,2,5,4] => 38
[6,3,1,4,2,5] => 40
[6,3,1,4,5,2] => 46
[6,3,1,5,2,4] => 44
[6,3,1,5,4,2] => 48
[6,3,2,1,4,5] => 38
[6,3,2,1,5,4] => 40
[6,3,2,4,1,5] => 44
[6,3,2,4,5,1] => 52
[6,3,2,5,1,4] => 48
[6,3,2,5,4,1] => 54
[6,3,4,1,2,5] => 46
[6,3,4,1,5,2] => 52
[6,3,4,2,1,5] => 48
[6,3,4,2,5,1] => 56
[6,3,4,5,1,2] => 60
[6,3,4,5,2,1] => 62
[6,3,5,1,2,4] => 52
[6,3,5,1,4,2] => 56
[6,3,5,2,1,4] => 54
[6,3,5,2,4,1] => 60
[6,3,5,4,1,2] => 62
[6,3,5,4,2,1] => 64
[6,4,1,2,3,5] => 42
[6,4,1,2,5,3] => 46
[6,4,1,3,2,5] => 44
[6,4,1,3,5,2] => 50
[6,4,1,5,2,3] => 52
[6,4,1,5,3,2] => 54
[6,4,2,1,3,5] => 44
[6,4,2,1,5,3] => 48
[6,4,2,3,1,5] => 48
[6,4,2,3,5,1] => 56
[6,4,2,5,1,3] => 56
[6,4,2,5,3,1] => 60
[6,4,3,1,2,5] => 48
[6,4,3,1,5,2] => 54
[6,4,3,2,1,5] => 50
[6,4,3,2,5,1] => 58
[6,4,3,5,1,2] => 62
[6,4,3,5,2,1] => 64
[6,4,5,1,2,3] => 60
[6,4,5,1,3,2] => 62
[6,4,5,2,1,3] => 62
[6,4,5,2,3,1] => 66
[6,4,5,3,1,2] => 66
[6,4,5,3,2,1] => 68
[6,5,1,2,3,4] => 50
[6,5,1,2,4,3] => 52
[6,5,1,3,2,4] => 52
[6,5,1,3,4,2] => 56
[6,5,1,4,2,3] => 56
[6,5,1,4,3,2] => 58
[6,5,2,1,3,4] => 52
[6,5,2,1,4,3] => 54
[6,5,2,3,1,4] => 56
[6,5,2,3,4,1] => 62
[6,5,2,4,1,3] => 60
[6,5,2,4,3,1] => 64
[6,5,3,1,2,4] => 56
[6,5,3,1,4,2] => 60
[6,5,3,2,1,4] => 58
[6,5,3,2,4,1] => 64
[6,5,3,4,1,2] => 66
[6,5,3,4,2,1] => 68
[6,5,4,1,2,3] => 62
[6,5,4,1,3,2] => 64
[6,5,4,2,1,3] => 64
[6,5,4,2,3,1] => 68
[6,5,4,3,1,2] => 68
[6,5,4,3,2,1] => 70
[1,2,3,4,5,6,7] => 0
[1,2,3,4,5,7,6] => 2
[1,2,3,4,6,5,7] => 2
[1,2,3,4,6,7,5] => 6
[1,2,3,4,7,5,6] => 6
[1,2,3,4,7,6,5] => 8
[1,2,3,5,4,6,7] => 2
[1,2,3,5,4,7,6] => 4
[1,2,3,5,6,4,7] => 6
[1,2,3,5,6,7,4] => 12
[1,2,3,5,7,4,6] => 10
[1,2,3,5,7,6,4] => 14
[1,2,3,6,4,5,7] => 6
[1,2,3,6,4,7,5] => 10
[1,2,3,6,5,4,7] => 8
[1,2,3,6,5,7,4] => 14
[1,2,3,6,7,4,5] => 16
[1,2,3,6,7,5,4] => 18
[1,2,3,7,4,5,6] => 12
[1,2,3,7,4,6,5] => 14
[1,2,3,7,5,4,6] => 14
[1,2,3,7,5,6,4] => 18
[1,2,3,7,6,4,5] => 18
[1,2,3,7,6,5,4] => 20
[1,2,4,3,5,6,7] => 2
[1,2,4,3,5,7,6] => 4
[1,2,4,3,6,5,7] => 4
[1,2,4,3,6,7,5] => 8
[1,2,4,3,7,5,6] => 8
[1,2,4,3,7,6,5] => 10
[1,2,4,5,3,6,7] => 6
[1,2,4,5,3,7,6] => 8
[1,2,4,5,6,3,7] => 12
[1,2,4,5,6,7,3] => 20
[1,2,4,5,7,3,6] => 16
[1,2,4,5,7,6,3] => 22
[1,2,4,6,3,5,7] => 10
[1,2,4,6,3,7,5] => 14
[1,2,4,6,5,3,7] => 14
[1,2,4,6,5,7,3] => 22
[1,2,4,6,7,3,5] => 22
[1,2,4,6,7,5,3] => 26
[1,2,4,7,3,5,6] => 16
[1,2,4,7,3,6,5] => 18
[1,2,4,7,5,3,6] => 20
[1,2,4,7,5,6,3] => 26
[1,2,4,7,6,3,5] => 24
[1,2,4,7,6,5,3] => 28
[1,2,5,3,4,6,7] => 6
[1,2,5,3,4,7,6] => 8
[1,2,5,3,6,4,7] => 10
[1,2,5,3,6,7,4] => 16
[1,2,5,3,7,4,6] => 14
[1,2,5,3,7,6,4] => 18
[1,2,5,4,3,6,7] => 8
[1,2,5,4,3,7,6] => 10
[1,2,5,4,6,3,7] => 14
[1,2,5,4,6,7,3] => 22
[1,2,5,4,7,3,6] => 18
[1,2,5,4,7,6,3] => 24
[1,2,5,6,3,4,7] => 16
[1,2,5,6,3,7,4] => 22
[1,2,5,6,4,3,7] => 18
[1,2,5,6,4,7,3] => 26
[1,2,5,6,7,3,4] => 30
[1,2,5,6,7,4,3] => 32
[1,2,5,7,3,4,6] => 22
[1,2,5,7,3,6,4] => 26
[1,2,5,7,4,3,6] => 24
[1,2,5,7,4,6,3] => 30
[1,2,5,7,6,3,4] => 32
[1,2,5,7,6,4,3] => 34
[1,2,6,3,4,5,7] => 12
[1,2,6,3,4,7,5] => 16
[1,2,6,3,5,4,7] => 14
[1,2,6,3,5,7,4] => 20
[1,2,6,3,7,4,5] => 22
[1,2,6,3,7,5,4] => 24
[1,2,6,4,3,5,7] => 14
[1,2,6,4,3,7,5] => 18
[1,2,6,4,5,3,7] => 18
[1,2,6,4,5,7,3] => 26
[1,2,6,4,7,3,5] => 26
[1,2,6,4,7,5,3] => 30
[1,2,6,5,3,4,7] => 18
[1,2,6,5,3,7,4] => 24
[1,2,6,5,4,3,7] => 20
[1,2,6,5,4,7,3] => 28
[1,2,6,5,7,3,4] => 32
[1,2,6,5,7,4,3] => 34
[1,2,6,7,3,4,5] => 30
[1,2,6,7,3,5,4] => 32
[1,2,6,7,4,3,5] => 32
[1,2,6,7,4,5,3] => 36
[1,2,6,7,5,3,4] => 36
[1,2,6,7,5,4,3] => 38
[1,2,7,3,4,5,6] => 20
[1,2,7,3,4,6,5] => 22
[1,2,7,3,5,4,6] => 22
[1,2,7,3,5,6,4] => 26
[1,2,7,3,6,4,5] => 26
[1,2,7,3,6,5,4] => 28
[1,2,7,4,3,5,6] => 22
[1,2,7,4,3,6,5] => 24
[1,2,7,4,5,3,6] => 26
[1,2,7,4,5,6,3] => 32
[1,2,7,4,6,3,5] => 30
[1,2,7,4,6,5,3] => 34
[1,2,7,5,3,4,6] => 26
[1,2,7,5,3,6,4] => 30
[1,2,7,5,4,3,6] => 28
[1,2,7,5,4,6,3] => 34
[1,2,7,5,6,3,4] => 36
[1,2,7,5,6,4,3] => 38
[1,2,7,6,3,4,5] => 32
[1,2,7,6,3,5,4] => 34
[1,2,7,6,4,3,5] => 34
[1,2,7,6,4,5,3] => 38
[1,2,7,6,5,3,4] => 38
[1,2,7,6,5,4,3] => 40
[1,3,2,4,5,6,7] => 2
[1,3,2,4,5,7,6] => 4
[1,3,2,4,6,5,7] => 4
[1,3,2,4,6,7,5] => 8
[1,3,2,4,7,5,6] => 8
[1,3,2,4,7,6,5] => 10
[1,3,2,5,4,6,7] => 4
[1,3,2,5,4,7,6] => 6
[1,3,2,5,6,4,7] => 8
[1,3,2,5,6,7,4] => 14
[1,3,2,5,7,4,6] => 12
[1,3,2,5,7,6,4] => 16
[1,3,2,6,4,5,7] => 8
[1,3,2,6,4,7,5] => 12
[1,3,2,6,5,4,7] => 10
[1,3,2,6,5,7,4] => 16
[1,3,2,6,7,4,5] => 18
[1,3,2,6,7,5,4] => 20
[1,3,2,7,4,5,6] => 14
[1,3,2,7,4,6,5] => 16
[1,3,2,7,5,4,6] => 16
[1,3,2,7,5,6,4] => 20
[1,3,2,7,6,4,5] => 20
[1,3,2,7,6,5,4] => 22
[1,3,4,2,5,6,7] => 6
[1,3,4,2,5,7,6] => 8
[1,3,4,2,6,5,7] => 8
[1,3,4,2,6,7,5] => 12
[1,3,4,2,7,5,6] => 12
[1,3,4,2,7,6,5] => 14
[1,3,4,5,2,6,7] => 12
[1,3,4,5,2,7,6] => 14
[1,3,4,5,6,2,7] => 20
[1,3,4,5,6,7,2] => 30
[1,3,4,5,7,2,6] => 24
[1,3,4,5,7,6,2] => 32
[1,3,4,6,2,5,7] => 16
[1,3,4,6,2,7,5] => 20
[1,3,4,6,5,2,7] => 22
[1,3,4,6,5,7,2] => 32
[1,3,4,6,7,2,5] => 30
[1,3,4,6,7,5,2] => 36
[1,3,4,7,2,5,6] => 22
[1,3,4,7,2,6,5] => 24
[1,3,4,7,5,2,6] => 28
[1,3,4,7,5,6,2] => 36
[1,3,4,7,6,2,5] => 32
[1,3,4,7,6,5,2] => 38
[1,3,5,2,4,6,7] => 10
[1,3,5,2,4,7,6] => 12
[1,3,5,2,6,4,7] => 14
[1,3,5,2,6,7,4] => 20
[1,3,5,2,7,4,6] => 18
[1,3,5,2,7,6,4] => 22
[1,3,5,4,2,6,7] => 14
[1,3,5,4,2,7,6] => 16
[1,3,5,4,6,2,7] => 22
[1,3,5,4,6,7,2] => 32
[1,3,5,4,7,2,6] => 26
[1,3,5,4,7,6,2] => 34
[1,3,5,6,2,4,7] => 22
[1,3,5,6,2,7,4] => 28
[1,3,5,6,4,2,7] => 26
[1,3,5,6,4,7,2] => 36
[1,3,5,6,7,2,4] => 38
[1,3,5,6,7,4,2] => 42
[1,3,5,7,2,4,6] => 28
[1,3,5,7,2,6,4] => 32
[1,3,5,7,4,2,6] => 32
[1,3,5,7,4,6,2] => 40
[1,3,5,7,6,2,4] => 40
[1,3,5,7,6,4,2] => 44
[1,3,6,2,4,5,7] => 16
[1,3,6,2,4,7,5] => 20
[1,3,6,2,5,4,7] => 18
[1,3,6,2,5,7,4] => 24
[1,3,6,2,7,4,5] => 26
[1,3,6,2,7,5,4] => 28
[1,3,6,4,2,5,7] => 20
[1,3,6,4,2,7,5] => 24
[1,3,6,4,5,2,7] => 26
[1,3,6,4,5,7,2] => 36
[1,3,6,4,7,2,5] => 34
[1,3,6,4,7,5,2] => 40
[1,3,6,5,2,4,7] => 24
[1,3,6,5,2,7,4] => 30
[1,3,6,5,4,2,7] => 28
[1,3,6,5,4,7,2] => 38
[1,3,6,5,7,2,4] => 40
[1,3,6,5,7,4,2] => 44
[1,3,6,7,2,4,5] => 36
[1,3,6,7,2,5,4] => 38
[1,3,6,7,4,2,5] => 40
[1,3,6,7,4,5,2] => 46
[1,3,6,7,5,2,4] => 44
[1,3,6,7,5,4,2] => 48
[1,3,7,2,4,5,6] => 24
[1,3,7,2,4,6,5] => 26
[1,3,7,2,5,4,6] => 26
[1,3,7,2,5,6,4] => 30
[1,3,7,2,6,4,5] => 30
[1,3,7,2,6,5,4] => 32
[1,3,7,4,2,5,6] => 28
[1,3,7,4,2,6,5] => 30
[1,3,7,4,5,2,6] => 34
[1,3,7,4,5,6,2] => 42
[1,3,7,4,6,2,5] => 38
[1,3,7,4,6,5,2] => 44
[1,3,7,5,2,4,6] => 32
[1,3,7,5,2,6,4] => 36
[1,3,7,5,4,2,6] => 36
[1,3,7,5,4,6,2] => 44
[1,3,7,5,6,2,4] => 44
[1,3,7,5,6,4,2] => 48
[1,3,7,6,2,4,5] => 38
[1,3,7,6,2,5,4] => 40
[1,3,7,6,4,2,5] => 42
[1,3,7,6,4,5,2] => 48
[1,3,7,6,5,2,4] => 46
[1,3,7,6,5,4,2] => 50
[1,4,2,3,5,6,7] => 6
[1,4,2,3,5,7,6] => 8
[1,4,2,3,6,5,7] => 8
[1,4,2,3,6,7,5] => 12
[1,4,2,3,7,5,6] => 12
[1,4,2,3,7,6,5] => 14
[1,4,2,5,3,6,7] => 10
[1,4,2,5,3,7,6] => 12
[1,4,2,5,6,3,7] => 16
[1,4,2,5,6,7,3] => 24
[1,4,2,5,7,3,6] => 20
[1,4,2,5,7,6,3] => 26
[1,4,2,6,3,5,7] => 14
[1,4,2,6,3,7,5] => 18
[1,4,2,6,5,3,7] => 18
[1,4,2,6,5,7,3] => 26
[1,4,2,6,7,3,5] => 26
[1,4,2,6,7,5,3] => 30
[1,4,2,7,3,5,6] => 20
[1,4,2,7,3,6,5] => 22
[1,4,2,7,5,3,6] => 24
[1,4,2,7,5,6,3] => 30
[1,4,2,7,6,3,5] => 28
[1,4,2,7,6,5,3] => 32
[1,4,3,2,5,6,7] => 8
[1,4,3,2,5,7,6] => 10
[1,4,3,2,6,5,7] => 10
[1,4,3,2,6,7,5] => 14
[1,4,3,2,7,5,6] => 14
[1,4,3,2,7,6,5] => 16
[1,4,3,5,2,6,7] => 14
[1,4,3,5,2,7,6] => 16
[1,4,3,5,6,2,7] => 22
[1,4,3,5,6,7,2] => 32
[1,4,3,5,7,2,6] => 26
[1,4,3,5,7,6,2] => 34
[1,4,3,6,2,5,7] => 18
[1,4,3,6,2,7,5] => 22
[1,4,3,6,5,2,7] => 24
[1,4,3,6,5,7,2] => 34
[1,4,3,6,7,2,5] => 32
[1,4,3,6,7,5,2] => 38
[1,4,3,7,2,5,6] => 24
[1,4,3,7,2,6,5] => 26
[1,4,3,7,5,2,6] => 30
[1,4,3,7,5,6,2] => 38
[1,4,3,7,6,2,5] => 34
[1,4,3,7,6,5,2] => 40
[1,4,5,2,3,6,7] => 16
[1,4,5,2,3,7,6] => 18
[1,4,5,2,6,3,7] => 22
[1,4,5,2,6,7,3] => 30
[1,4,5,2,7,3,6] => 26
[1,4,5,2,7,6,3] => 32
[1,4,5,3,2,6,7] => 18
[1,4,5,3,2,7,6] => 20
[1,4,5,3,6,2,7] => 26
[1,4,5,3,6,7,2] => 36
[1,4,5,3,7,2,6] => 30
[1,4,5,3,7,6,2] => 38
[1,4,5,6,2,3,7] => 30
[1,4,5,6,2,7,3] => 38
[1,4,5,6,3,2,7] => 32
[1,4,5,6,3,7,2] => 42
[1,4,5,6,7,2,3] => 48
[1,4,5,6,7,3,2] => 50
[1,4,5,7,2,3,6] => 36
[1,4,5,7,2,6,3] => 42
[1,4,5,7,3,2,6] => 38
[1,4,5,7,3,6,2] => 46
[1,4,5,7,6,2,3] => 50
[1,4,5,7,6,3,2] => 52
[1,4,6,2,3,5,7] => 22
[1,4,6,2,3,7,5] => 26
[1,4,6,2,5,3,7] => 26
[1,4,6,2,5,7,3] => 34
[1,4,6,2,7,3,5] => 34
[1,4,6,2,7,5,3] => 38
[1,4,6,3,2,5,7] => 24
[1,4,6,3,2,7,5] => 28
[1,4,6,3,5,2,7] => 30
[1,4,6,3,5,7,2] => 40
[1,4,6,3,7,2,5] => 38
[1,4,6,3,7,5,2] => 44
[1,4,6,5,2,3,7] => 32
[1,4,6,5,2,7,3] => 40
[1,4,6,5,3,2,7] => 34
[1,4,6,5,3,7,2] => 44
click to show generating function       
Description
The spearman's rho of a permutation and the identity permutation.
This is, for a permutation $\pi$ of $n$, given by $\sum_{i=1}^n (\pi(i)−i)^2$.
References
[1] Chatterjee, S., Diaconis, P. A central limit theorem for a new statistic on permutations arXiv:1608.01666
Code
def statistic(pi):
    return sum( (pi(i) - i)^2 for i in [1 .. len(pi)])

Created
May 31, 2017 at 10:52 by Christian Stump
Updated
May 31, 2017 at 10:52 by Christian Stump