***************************************************************************** * www.FindStat.org - The Combinatorial Statistic Finder * * * * Copyright (C) 2019 The FindStatCrew * * * * This information is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * ***************************************************************************** ----------------------------------------------------------------------------- Statistic identifier: St000324 ----------------------------------------------------------------------------- Collection: Permutations ----------------------------------------------------------------------------- Description: The shape of the tree associated to a permutation. A permutation can be mapped to a rooted tree with vertices {0,1,2,…,n} and root 0 in the following way. Entries of the permutations are inserted one after the other, each child is larger than its parent and the children are in strict order from left to right. Details of the construction are found in [1]. The statistic is given by \$2^w 3^h\$, where \$w\$ is the width [[St000325]] and \$h\$ is the height [[St000308]] of this tree. ----------------------------------------------------------------------------- References: [1] [[http://oeis.org/wiki/User:Peter_Luschny/PermutationTrees]] ----------------------------------------------------------------------------- Code: def statistic(pi): if pi == []: return (0, 0) h, w, i, branch, next = 0, 0, len(pi), [0], pi[0] while true: while next < branch[len(branch)-1]: branch.pop() current = 0 w += 1 while next > current: i -= 1 h = max(h, len(branch)) if i == 0: return 2^w*3^h branch.append(next) current, next = next, pi[i] ----------------------------------------------------------------------------- Statistic values: [1] => 6 [1,2] => 18 [2,1] => 12 [1,2,3] => 54 [1,3,2] => 36 [2,1,3] => 36 [2,3,1] => 36 [3,1,2] => 36 [3,2,1] => 24 [1,2,3,4] => 162 [1,2,4,3] => 108 [1,3,2,4] => 108 [1,3,4,2] => 108 [1,4,2,3] => 108 [1,4,3,2] => 72 [2,1,3,4] => 108 [2,1,4,3] => 72 [2,3,1,4] => 36 [2,3,4,1] => 108 [2,4,1,3] => 36 [2,4,3,1] => 72 [3,1,2,4] => 108 [3,1,4,2] => 72 [3,2,1,4] => 72 [3,2,4,1] => 72 [3,4,1,2] => 36 [3,4,2,1] => 72 [4,1,2,3] => 108 [4,1,3,2] => 72 [4,2,1,3] => 72 [4,2,3,1] => 72 [4,3,1,2] => 72 [4,3,2,1] => 48 [1,2,3,4,5] => 486 [1,2,3,5,4] => 324 [1,2,4,3,5] => 324 [1,2,4,5,3] => 324 [1,2,5,3,4] => 324 [1,2,5,4,3] => 216 [1,3,2,4,5] => 324 [1,3,2,5,4] => 216 [1,3,4,2,5] => 108 [1,3,4,5,2] => 324 [1,3,5,2,4] => 108 [1,3,5,4,2] => 216 [1,4,2,3,5] => 324 [1,4,2,5,3] => 216 [1,4,3,2,5] => 216 [1,4,3,5,2] => 216 [1,4,5,2,3] => 108 [1,4,5,3,2] => 216 [1,5,2,3,4] => 324 [1,5,2,4,3] => 216 [1,5,3,2,4] => 216 [1,5,3,4,2] => 216 [1,5,4,2,3] => 216 [1,5,4,3,2] => 144 [2,1,3,4,5] => 324 [2,1,3,5,4] => 216 [2,1,4,3,5] => 216 [2,1,4,5,3] => 216 [2,1,5,3,4] => 216 [2,1,5,4,3] => 144 [2,3,1,4,5] => 108 [2,3,1,5,4] => 72 [2,3,4,1,5] => 108 [2,3,4,5,1] => 324 [2,3,5,1,4] => 108 [2,3,5,4,1] => 216 [2,4,1,3,5] => 108 [2,4,1,5,3] => 72 [2,4,3,1,5] => 72 [2,4,3,5,1] => 216 [2,4,5,1,3] => 108 [2,4,5,3,1] => 216 [2,5,1,3,4] => 108 [2,5,1,4,3] => 72 [2,5,3,1,4] => 72 [2,5,3,4,1] => 216 [2,5,4,1,3] => 72 [2,5,4,3,1] => 144 [3,1,2,4,5] => 324 [3,1,2,5,4] => 216 [3,1,4,2,5] => 216 [3,1,4,5,2] => 216 [3,1,5,2,4] => 216 [3,1,5,4,2] => 144 [3,2,1,4,5] => 216 [3,2,1,5,4] => 144 [3,2,4,1,5] => 72 [3,2,4,5,1] => 216 [3,2,5,1,4] => 72 [3,2,5,4,1] => 144 [3,4,1,2,5] => 108 [3,4,1,5,2] => 72 [3,4,2,1,5] => 72 [3,4,2,5,1] => 72 [3,4,5,1,2] => 108 [3,4,5,2,1] => 216 [3,5,1,2,4] => 108 [3,5,1,4,2] => 72 [3,5,2,1,4] => 72 [3,5,2,4,1] => 72 [3,5,4,1,2] => 72 [3,5,4,2,1] => 144 [4,1,2,3,5] => 324 [4,1,2,5,3] => 216 [4,1,3,2,5] => 216 [4,1,3,5,2] => 216 [4,1,5,2,3] => 216 [4,1,5,3,2] => 144 [4,2,1,3,5] => 216 [4,2,1,5,3] => 144 [4,2,3,1,5] => 72 [4,2,3,5,1] => 216 [4,2,5,1,3] => 72 [4,2,5,3,1] => 144 [4,3,1,2,5] => 216 [4,3,1,5,2] => 144 [4,3,2,1,5] => 144 [4,3,2,5,1] => 144 [4,3,5,1,2] => 72 [4,3,5,2,1] => 144 [4,5,1,2,3] => 108 [4,5,1,3,2] => 72 [4,5,2,1,3] => 72 [4,5,2,3,1] => 72 [4,5,3,1,2] => 72 [4,5,3,2,1] => 144 [5,1,2,3,4] => 324 [5,1,2,4,3] => 216 [5,1,3,2,4] => 216 [5,1,3,4,2] => 216 [5,1,4,2,3] => 216 [5,1,4,3,2] => 144 [5,2,1,3,4] => 216 [5,2,1,4,3] => 144 [5,2,3,1,4] => 72 [5,2,3,4,1] => 216 [5,2,4,1,3] => 72 [5,2,4,3,1] => 144 [5,3,1,2,4] => 216 [5,3,1,4,2] => 144 [5,3,2,1,4] => 144 [5,3,2,4,1] => 144 [5,3,4,1,2] => 72 [5,3,4,2,1] => 144 [5,4,1,2,3] => 216 [5,4,1,3,2] => 144 [5,4,2,1,3] => 144 [5,4,2,3,1] => 144 [5,4,3,1,2] => 144 [5,4,3,2,1] => 96 [1,2,3,4,5,6] => 1458 [1,2,3,4,6,5] => 972 [1,2,3,5,4,6] => 972 [1,2,3,5,6,4] => 972 [1,2,3,6,4,5] => 972 [1,2,3,6,5,4] => 648 [1,2,4,3,5,6] => 972 [1,2,4,3,6,5] => 648 [1,2,4,5,3,6] => 324 [1,2,4,5,6,3] => 972 [1,2,4,6,3,5] => 324 [1,2,4,6,5,3] => 648 [1,2,5,3,4,6] => 972 [1,2,5,3,6,4] => 648 [1,2,5,4,3,6] => 648 [1,2,5,4,6,3] => 648 [1,2,5,6,3,4] => 324 [1,2,5,6,4,3] => 648 [1,2,6,3,4,5] => 972 [1,2,6,3,5,4] => 648 [1,2,6,4,3,5] => 648 [1,2,6,4,5,3] => 648 [1,2,6,5,3,4] => 648 [1,2,6,5,4,3] => 432 [1,3,2,4,5,6] => 972 [1,3,2,4,6,5] => 648 [1,3,2,5,4,6] => 648 [1,3,2,5,6,4] => 648 [1,3,2,6,4,5] => 648 [1,3,2,6,5,4] => 432 [1,3,4,2,5,6] => 324 [1,3,4,2,6,5] => 216 [1,3,4,5,2,6] => 324 [1,3,4,5,6,2] => 972 [1,3,4,6,2,5] => 324 [1,3,4,6,5,2] => 648 [1,3,5,2,4,6] => 324 [1,3,5,2,6,4] => 216 [1,3,5,4,2,6] => 216 [1,3,5,4,6,2] => 648 [1,3,5,6,2,4] => 324 [1,3,5,6,4,2] => 648 [1,3,6,2,4,5] => 324 [1,3,6,2,5,4] => 216 [1,3,6,4,2,5] => 216 [1,3,6,4,5,2] => 648 [1,3,6,5,2,4] => 216 [1,3,6,5,4,2] => 432 [1,4,2,3,5,6] => 972 [1,4,2,3,6,5] => 648 [1,4,2,5,3,6] => 648 [1,4,2,5,6,3] => 648 [1,4,2,6,3,5] => 648 [1,4,2,6,5,3] => 432 [1,4,3,2,5,6] => 648 [1,4,3,2,6,5] => 432 [1,4,3,5,2,6] => 216 [1,4,3,5,6,2] => 648 [1,4,3,6,2,5] => 216 [1,4,3,6,5,2] => 432 [1,4,5,2,3,6] => 324 [1,4,5,2,6,3] => 216 [1,4,5,3,2,6] => 216 [1,4,5,3,6,2] => 216 [1,4,5,6,2,3] => 324 [1,4,5,6,3,2] => 648 [1,4,6,2,3,5] => 324 [1,4,6,2,5,3] => 216 [1,4,6,3,2,5] => 216 [1,4,6,3,5,2] => 216 [1,4,6,5,2,3] => 216 [1,4,6,5,3,2] => 432 [1,5,2,3,4,6] => 972 [1,5,2,3,6,4] => 648 [1,5,2,4,3,6] => 648 [1,5,2,4,6,3] => 648 [1,5,2,6,3,4] => 648 [1,5,2,6,4,3] => 432 [1,5,3,2,4,6] => 648 [1,5,3,2,6,4] => 432 [1,5,3,4,2,6] => 216 [1,5,3,4,6,2] => 648 [1,5,3,6,2,4] => 216 [1,5,3,6,4,2] => 432 [1,5,4,2,3,6] => 648 [1,5,4,2,6,3] => 432 [1,5,4,3,2,6] => 432 [1,5,4,3,6,2] => 432 [1,5,4,6,2,3] => 216 [1,5,4,6,3,2] => 432 [1,5,6,2,3,4] => 324 [1,5,6,2,4,3] => 216 [1,5,6,3,2,4] => 216 [1,5,6,3,4,2] => 216 [1,5,6,4,2,3] => 216 [1,5,6,4,3,2] => 432 [1,6,2,3,4,5] => 972 [1,6,2,3,5,4] => 648 [1,6,2,4,3,5] => 648 [1,6,2,4,5,3] => 648 [1,6,2,5,3,4] => 648 [1,6,2,5,4,3] => 432 [1,6,3,2,4,5] => 648 [1,6,3,2,5,4] => 432 [1,6,3,4,2,5] => 216 [1,6,3,4,5,2] => 648 [1,6,3,5,2,4] => 216 [1,6,3,5,4,2] => 432 [1,6,4,2,3,5] => 648 [1,6,4,2,5,3] => 432 [1,6,4,3,2,5] => 432 [1,6,4,3,5,2] => 432 [1,6,4,5,2,3] => 216 [1,6,4,5,3,2] => 432 [1,6,5,2,3,4] => 648 [1,6,5,2,4,3] => 432 [1,6,5,3,2,4] => 432 [1,6,5,3,4,2] => 432 [1,6,5,4,2,3] => 432 [1,6,5,4,3,2] => 288 [2,1,3,4,5,6] => 972 [2,1,3,4,6,5] => 648 [2,1,3,5,4,6] => 648 [2,1,3,5,6,4] => 648 [2,1,3,6,4,5] => 648 [2,1,3,6,5,4] => 432 [2,1,4,3,5,6] => 648 [2,1,4,3,6,5] => 432 [2,1,4,5,3,6] => 216 [2,1,4,5,6,3] => 648 [2,1,4,6,3,5] => 216 [2,1,4,6,5,3] => 432 [2,1,5,3,4,6] => 648 [2,1,5,3,6,4] => 432 [2,1,5,4,3,6] => 432 [2,1,5,4,6,3] => 432 [2,1,5,6,3,4] => 216 [2,1,5,6,4,3] => 432 [2,1,6,3,4,5] => 648 [2,1,6,3,5,4] => 432 [2,1,6,4,3,5] => 432 [2,1,6,4,5,3] => 432 [2,1,6,5,3,4] => 432 [2,1,6,5,4,3] => 288 [2,3,1,4,5,6] => 324 [2,3,1,4,6,5] => 216 [2,3,1,5,4,6] => 216 [2,3,1,5,6,4] => 216 [2,3,1,6,4,5] => 216 [2,3,1,6,5,4] => 144 [2,3,4,1,5,6] => 108 [2,3,4,1,6,5] => 216 [2,3,4,5,1,6] => 324 [2,3,4,5,6,1] => 972 [2,3,4,6,1,5] => 324 [2,3,4,6,5,1] => 648 [2,3,5,1,4,6] => 108 [2,3,5,1,6,4] => 216 [2,3,5,4,1,6] => 216 [2,3,5,4,6,1] => 648 [2,3,5,6,1,4] => 324 [2,3,5,6,4,1] => 648 [2,3,6,1,4,5] => 108 [2,3,6,1,5,4] => 216 [2,3,6,4,1,5] => 216 [2,3,6,4,5,1] => 648 [2,3,6,5,1,4] => 216 [2,3,6,5,4,1] => 432 [2,4,1,3,5,6] => 324 [2,4,1,3,6,5] => 216 [2,4,1,5,3,6] => 216 [2,4,1,5,6,3] => 216 [2,4,1,6,3,5] => 216 [2,4,1,6,5,3] => 144 [2,4,3,1,5,6] => 216 [2,4,3,1,6,5] => 144 [2,4,3,5,1,6] => 216 [2,4,3,5,6,1] => 648 [2,4,3,6,1,5] => 216 [2,4,3,6,5,1] => 432 [2,4,5,1,3,6] => 108 [2,4,5,1,6,3] => 216 [2,4,5,3,1,6] => 216 [2,4,5,3,6,1] => 216 [2,4,5,6,1,3] => 324 [2,4,5,6,3,1] => 648 [2,4,6,1,3,5] => 108 [2,4,6,1,5,3] => 216 [2,4,6,3,1,5] => 216 [2,4,6,3,5,1] => 216 [2,4,6,5,1,3] => 216 [2,4,6,5,3,1] => 432 [2,5,1,3,4,6] => 324 [2,5,1,3,6,4] => 216 [2,5,1,4,3,6] => 216 [2,5,1,4,6,3] => 216 [2,5,1,6,3,4] => 216 [2,5,1,6,4,3] => 144 [2,5,3,1,4,6] => 216 [2,5,3,1,6,4] => 144 [2,5,3,4,1,6] => 216 [2,5,3,4,6,1] => 648 [2,5,3,6,1,4] => 216 [2,5,3,6,4,1] => 432 [2,5,4,1,3,6] => 216 [2,5,4,1,6,3] => 144 [2,5,4,3,1,6] => 144 [2,5,4,3,6,1] => 432 [2,5,4,6,1,3] => 216 [2,5,4,6,3,1] => 432 [2,5,6,1,3,4] => 108 [2,5,6,1,4,3] => 216 [2,5,6,3,1,4] => 216 [2,5,6,3,4,1] => 216 [2,5,6,4,1,3] => 216 [2,5,6,4,3,1] => 432 [2,6,1,3,4,5] => 324 [2,6,1,3,5,4] => 216 [2,6,1,4,3,5] => 216 [2,6,1,4,5,3] => 216 [2,6,1,5,3,4] => 216 [2,6,1,5,4,3] => 144 [2,6,3,1,4,5] => 216 [2,6,3,1,5,4] => 144 [2,6,3,4,1,5] => 216 [2,6,3,4,5,1] => 648 [2,6,3,5,1,4] => 216 [2,6,3,5,4,1] => 432 [2,6,4,1,3,5] => 216 [2,6,4,1,5,3] => 144 [2,6,4,3,1,5] => 144 [2,6,4,3,5,1] => 432 [2,6,4,5,1,3] => 216 [2,6,4,5,3,1] => 432 [2,6,5,1,3,4] => 216 [2,6,5,1,4,3] => 144 [2,6,5,3,1,4] => 144 [2,6,5,3,4,1] => 432 [2,6,5,4,1,3] => 144 [2,6,5,4,3,1] => 288 [3,1,2,4,5,6] => 972 [3,1,2,4,6,5] => 648 [3,1,2,5,4,6] => 648 [3,1,2,5,6,4] => 648 [3,1,2,6,4,5] => 648 [3,1,2,6,5,4] => 432 [3,1,4,2,5,6] => 648 [3,1,4,2,6,5] => 432 [3,1,4,5,2,6] => 216 [3,1,4,5,6,2] => 648 [3,1,4,6,2,5] => 216 [3,1,4,6,5,2] => 432 [3,1,5,2,4,6] => 648 [3,1,5,2,6,4] => 432 [3,1,5,4,2,6] => 432 [3,1,5,4,6,2] => 432 [3,1,5,6,2,4] => 216 [3,1,5,6,4,2] => 432 [3,1,6,2,4,5] => 648 [3,1,6,2,5,4] => 432 [3,1,6,4,2,5] => 432 [3,1,6,4,5,2] => 432 [3,1,6,5,2,4] => 432 [3,1,6,5,4,2] => 288 [3,2,1,4,5,6] => 648 [3,2,1,4,6,5] => 432 [3,2,1,5,4,6] => 432 [3,2,1,5,6,4] => 432 [3,2,1,6,4,5] => 432 [3,2,1,6,5,4] => 288 [3,2,4,1,5,6] => 216 [3,2,4,1,6,5] => 144 [3,2,4,5,1,6] => 216 [3,2,4,5,6,1] => 648 [3,2,4,6,1,5] => 216 [3,2,4,6,5,1] => 432 [3,2,5,1,4,6] => 216 [3,2,5,1,6,4] => 144 [3,2,5,4,1,6] => 144 [3,2,5,4,6,1] => 432 [3,2,5,6,1,4] => 216 [3,2,5,6,4,1] => 432 [3,2,6,1,4,5] => 216 [3,2,6,1,5,4] => 144 [3,2,6,4,1,5] => 144 [3,2,6,4,5,1] => 432 [3,2,6,5,1,4] => 144 [3,2,6,5,4,1] => 288 [3,4,1,2,5,6] => 324 [3,4,1,2,6,5] => 216 [3,4,1,5,2,6] => 216 [3,4,1,5,6,2] => 216 [3,4,1,6,2,5] => 216 [3,4,1,6,5,2] => 144 [3,4,2,1,5,6] => 216 [3,4,2,1,6,5] => 144 [3,4,2,5,1,6] => 72 [3,4,2,5,6,1] => 216 [3,4,2,6,1,5] => 72 [3,4,2,6,5,1] => 144 [3,4,5,1,2,6] => 108 [3,4,5,1,6,2] => 216 [3,4,5,2,1,6] => 216 [3,4,5,2,6,1] => 216 [3,4,5,6,1,2] => 324 [3,4,5,6,2,1] => 648 [3,4,6,1,2,5] => 108 [3,4,6,1,5,2] => 216 [3,4,6,2,1,5] => 216 [3,4,6,2,5,1] => 216 [3,4,6,5,1,2] => 216 [3,4,6,5,2,1] => 432 [3,5,1,2,4,6] => 324 [3,5,1,2,6,4] => 216 [3,5,1,4,2,6] => 216 [3,5,1,4,6,2] => 216 [3,5,1,6,2,4] => 216 [3,5,1,6,4,2] => 144 [3,5,2,1,4,6] => 216 [3,5,2,1,6,4] => 144 [3,5,2,4,1,6] => 72 [3,5,2,4,6,1] => 216 [3,5,2,6,1,4] => 72 [3,5,2,6,4,1] => 144 [3,5,4,1,2,6] => 216 [3,5,4,1,6,2] => 144 [3,5,4,2,1,6] => 144 [3,5,4,2,6,1] => 144 [3,5,4,6,1,2] => 216 [3,5,4,6,2,1] => 432 [3,5,6,1,2,4] => 108 [3,5,6,1,4,2] => 216 [3,5,6,2,1,4] => 216 [3,5,6,2,4,1] => 216 [3,5,6,4,1,2] => 216 [3,5,6,4,2,1] => 432 [3,6,1,2,4,5] => 324 [3,6,1,2,5,4] => 216 [3,6,1,4,2,5] => 216 [3,6,1,4,5,2] => 216 [3,6,1,5,2,4] => 216 [3,6,1,5,4,2] => 144 [3,6,2,1,4,5] => 216 [3,6,2,1,5,4] => 144 [3,6,2,4,1,5] => 72 [3,6,2,4,5,1] => 216 [3,6,2,5,1,4] => 72 [3,6,2,5,4,1] => 144 [3,6,4,1,2,5] => 216 [3,6,4,1,5,2] => 144 [3,6,4,2,1,5] => 144 [3,6,4,2,5,1] => 144 [3,6,4,5,1,2] => 216 [3,6,4,5,2,1] => 432 [3,6,5,1,2,4] => 216 [3,6,5,1,4,2] => 144 [3,6,5,2,1,4] => 144 [3,6,5,2,4,1] => 144 [3,6,5,4,1,2] => 144 [3,6,5,4,2,1] => 288 [4,1,2,3,5,6] => 972 [4,1,2,3,6,5] => 648 [4,1,2,5,3,6] => 648 [4,1,2,5,6,3] => 648 [4,1,2,6,3,5] => 648 [4,1,2,6,5,3] => 432 [4,1,3,2,5,6] => 648 [4,1,3,2,6,5] => 432 [4,1,3,5,2,6] => 216 [4,1,3,5,6,2] => 648 [4,1,3,6,2,5] => 216 [4,1,3,6,5,2] => 432 [4,1,5,2,3,6] => 648 [4,1,5,2,6,3] => 432 [4,1,5,3,2,6] => 432 [4,1,5,3,6,2] => 432 [4,1,5,6,2,3] => 216 [4,1,5,6,3,2] => 432 [4,1,6,2,3,5] => 648 [4,1,6,2,5,3] => 432 [4,1,6,3,2,5] => 432 [4,1,6,3,5,2] => 432 [4,1,6,5,2,3] => 432 [4,1,6,5,3,2] => 288 [4,2,1,3,5,6] => 648 [4,2,1,3,6,5] => 432 [4,2,1,5,3,6] => 432 [4,2,1,5,6,3] => 432 [4,2,1,6,3,5] => 432 [4,2,1,6,5,3] => 288 [4,2,3,1,5,6] => 216 [4,2,3,1,6,5] => 144 [4,2,3,5,1,6] => 216 [4,2,3,5,6,1] => 648 [4,2,3,6,1,5] => 216 [4,2,3,6,5,1] => 432 [4,2,5,1,3,6] => 216 [4,2,5,1,6,3] => 144 [4,2,5,3,1,6] => 144 [4,2,5,3,6,1] => 432 [4,2,5,6,1,3] => 216 [4,2,5,6,3,1] => 432 [4,2,6,1,3,5] => 216 [4,2,6,1,5,3] => 144 [4,2,6,3,1,5] => 144 [4,2,6,3,5,1] => 432 [4,2,6,5,1,3] => 144 [4,2,6,5,3,1] => 288 [4,3,1,2,5,6] => 648 [4,3,1,2,6,5] => 432 [4,3,1,5,2,6] => 432 [4,3,1,5,6,2] => 432 [4,3,1,6,2,5] => 432 [4,3,1,6,5,2] => 288 [4,3,2,1,5,6] => 432 [4,3,2,1,6,5] => 288 [4,3,2,5,1,6] => 144 [4,3,2,5,6,1] => 432 [4,3,2,6,1,5] => 144 [4,3,2,6,5,1] => 288 [4,3,5,1,2,6] => 216 [4,3,5,1,6,2] => 144 [4,3,5,2,1,6] => 144 [4,3,5,2,6,1] => 144 [4,3,5,6,1,2] => 216 [4,3,5,6,2,1] => 432 [4,3,6,1,2,5] => 216 [4,3,6,1,5,2] => 144 [4,3,6,2,1,5] => 144 [4,3,6,2,5,1] => 144 [4,3,6,5,1,2] => 144 [4,3,6,5,2,1] => 288 [4,5,1,2,3,6] => 324 [4,5,1,2,6,3] => 216 [4,5,1,3,2,6] => 216 [4,5,1,3,6,2] => 216 [4,5,1,6,2,3] => 216 [4,5,1,6,3,2] => 144 [4,5,2,1,3,6] => 216 [4,5,2,1,6,3] => 144 [4,5,2,3,1,6] => 72 [4,5,2,3,6,1] => 216 [4,5,2,6,1,3] => 72 [4,5,2,6,3,1] => 144 [4,5,3,1,2,6] => 216 [4,5,3,1,6,2] => 144 [4,5,3,2,1,6] => 144 [4,5,3,2,6,1] => 144 [4,5,3,6,1,2] => 72 [4,5,3,6,2,1] => 144 [4,5,6,1,2,3] => 108 [4,5,6,1,3,2] => 216 [4,5,6,2,1,3] => 216 [4,5,6,2,3,1] => 216 [4,5,6,3,1,2] => 216 [4,5,6,3,2,1] => 432 [4,6,1,2,3,5] => 324 [4,6,1,2,5,3] => 216 [4,6,1,3,2,5] => 216 [4,6,1,3,5,2] => 216 [4,6,1,5,2,3] => 216 [4,6,1,5,3,2] => 144 [4,6,2,1,3,5] => 216 [4,6,2,1,5,3] => 144 [4,6,2,3,1,5] => 72 [4,6,2,3,5,1] => 216 [4,6,2,5,1,3] => 72 [4,6,2,5,3,1] => 144 [4,6,3,1,2,5] => 216 [4,6,3,1,5,2] => 144 [4,6,3,2,1,5] => 144 [4,6,3,2,5,1] => 144 [4,6,3,5,1,2] => 72 [4,6,3,5,2,1] => 144 [4,6,5,1,2,3] => 216 [4,6,5,1,3,2] => 144 [4,6,5,2,1,3] => 144 [4,6,5,2,3,1] => 144 [4,6,5,3,1,2] => 144 [4,6,5,3,2,1] => 288 [5,1,2,3,4,6] => 972 [5,1,2,3,6,4] => 648 [5,1,2,4,3,6] => 648 [5,1,2,4,6,3] => 648 [5,1,2,6,3,4] => 648 [5,1,2,6,4,3] => 432 [5,1,3,2,4,6] => 648 [5,1,3,2,6,4] => 432 [5,1,3,4,2,6] => 216 [5,1,3,4,6,2] => 648 [5,1,3,6,2,4] => 216 [5,1,3,6,4,2] => 432 [5,1,4,2,3,6] => 648 [5,1,4,2,6,3] => 432 [5,1,4,3,2,6] => 432 [5,1,4,3,6,2] => 432 [5,1,4,6,2,3] => 216 [5,1,4,6,3,2] => 432 [5,1,6,2,3,4] => 648 [5,1,6,2,4,3] => 432 [5,1,6,3,2,4] => 432 [5,1,6,3,4,2] => 432 [5,1,6,4,2,3] => 432 [5,1,6,4,3,2] => 288 [5,2,1,3,4,6] => 648 [5,2,1,3,6,4] => 432 [5,2,1,4,3,6] => 432 [5,2,1,4,6,3] => 432 [5,2,1,6,3,4] => 432 [5,2,1,6,4,3] => 288 [5,2,3,1,4,6] => 216 [5,2,3,1,6,4] => 144 [5,2,3,4,1,6] => 216 [5,2,3,4,6,1] => 648 [5,2,3,6,1,4] => 216 [5,2,3,6,4,1] => 432 [5,2,4,1,3,6] => 216 [5,2,4,1,6,3] => 144 [5,2,4,3,1,6] => 144 [5,2,4,3,6,1] => 432 [5,2,4,6,1,3] => 216 [5,2,4,6,3,1] => 432 [5,2,6,1,3,4] => 216 [5,2,6,1,4,3] => 144 [5,2,6,3,1,4] => 144 [5,2,6,3,4,1] => 432 [5,2,6,4,1,3] => 144 [5,2,6,4,3,1] => 288 [5,3,1,2,4,6] => 648 [5,3,1,2,6,4] => 432 [5,3,1,4,2,6] => 432 [5,3,1,4,6,2] => 432 [5,3,1,6,2,4] => 432 [5,3,1,6,4,2] => 288 [5,3,2,1,4,6] => 432 [5,3,2,1,6,4] => 288 [5,3,2,4,1,6] => 144 [5,3,2,4,6,1] => 432 [5,3,2,6,1,4] => 144 [5,3,2,6,4,1] => 288 [5,3,4,1,2,6] => 216 [5,3,4,1,6,2] => 144 [5,3,4,2,1,6] => 144 [5,3,4,2,6,1] => 144 [5,3,4,6,1,2] => 216 [5,3,4,6,2,1] => 432 [5,3,6,1,2,4] => 216 [5,3,6,1,4,2] => 144 [5,3,6,2,1,4] => 144 [5,3,6,2,4,1] => 144 [5,3,6,4,1,2] => 144 [5,3,6,4,2,1] => 288 [5,4,1,2,3,6] => 648 [5,4,1,2,6,3] => 432 [5,4,1,3,2,6] => 432 [5,4,1,3,6,2] => 432 [5,4,1,6,2,3] => 432 [5,4,1,6,3,2] => 288 [5,4,2,1,3,6] => 432 [5,4,2,1,6,3] => 288 [5,4,2,3,1,6] => 144 [5,4,2,3,6,1] => 432 [5,4,2,6,1,3] => 144 [5,4,2,6,3,1] => 288 [5,4,3,1,2,6] => 432 [5,4,3,1,6,2] => 288 [5,4,3,2,1,6] => 288 [5,4,3,2,6,1] => 288 [5,4,3,6,1,2] => 144 [5,4,3,6,2,1] => 288 [5,4,6,1,2,3] => 216 [5,4,6,1,3,2] => 144 [5,4,6,2,1,3] => 144 [5,4,6,2,3,1] => 144 [5,4,6,3,1,2] => 144 [5,4,6,3,2,1] => 288 [5,6,1,2,3,4] => 324 [5,6,1,2,4,3] => 216 [5,6,1,3,2,4] => 216 [5,6,1,3,4,2] => 216 [5,6,1,4,2,3] => 216 [5,6,1,4,3,2] => 144 [5,6,2,1,3,4] => 216 [5,6,2,1,4,3] => 144 [5,6,2,3,1,4] => 72 [5,6,2,3,4,1] => 216 [5,6,2,4,1,3] => 72 [5,6,2,4,3,1] => 144 [5,6,3,1,2,4] => 216 [5,6,3,1,4,2] => 144 [5,6,3,2,1,4] => 144 [5,6,3,2,4,1] => 144 [5,6,3,4,1,2] => 72 [5,6,3,4,2,1] => 144 [5,6,4,1,2,3] => 216 [5,6,4,1,3,2] => 144 [5,6,4,2,1,3] => 144 [5,6,4,2,3,1] => 144 [5,6,4,3,1,2] => 144 [5,6,4,3,2,1] => 288 [6,1,2,3,4,5] => 972 [6,1,2,3,5,4] => 648 [6,1,2,4,3,5] => 648 [6,1,2,4,5,3] => 648 [6,1,2,5,3,4] => 648 [6,1,2,5,4,3] => 432 [6,1,3,2,4,5] => 648 [6,1,3,2,5,4] => 432 [6,1,3,4,2,5] => 216 [6,1,3,4,5,2] => 648 [6,1,3,5,2,4] => 216 [6,1,3,5,4,2] => 432 [6,1,4,2,3,5] => 648 [6,1,4,2,5,3] => 432 [6,1,4,3,2,5] => 432 [6,1,4,3,5,2] => 432 [6,1,4,5,2,3] => 216 [6,1,4,5,3,2] => 432 [6,1,5,2,3,4] => 648 [6,1,5,2,4,3] => 432 [6,1,5,3,2,4] => 432 [6,1,5,3,4,2] => 432 [6,1,5,4,2,3] => 432 [6,1,5,4,3,2] => 288 [6,2,1,3,4,5] => 648 [6,2,1,3,5,4] => 432 [6,2,1,4,3,5] => 432 [6,2,1,4,5,3] => 432 [6,2,1,5,3,4] => 432 [6,2,1,5,4,3] => 288 [6,2,3,1,4,5] => 216 [6,2,3,1,5,4] => 144 [6,2,3,4,1,5] => 216 [6,2,3,4,5,1] => 648 [6,2,3,5,1,4] => 216 [6,2,3,5,4,1] => 432 [6,2,4,1,3,5] => 216 [6,2,4,1,5,3] => 144 [6,2,4,3,1,5] => 144 [6,2,4,3,5,1] => 432 [6,2,4,5,1,3] => 216 [6,2,4,5,3,1] => 432 [6,2,5,1,3,4] => 216 [6,2,5,1,4,3] => 144 [6,2,5,3,1,4] => 144 [6,2,5,3,4,1] => 432 [6,2,5,4,1,3] => 144 [6,2,5,4,3,1] => 288 [6,3,1,2,4,5] => 648 [6,3,1,2,5,4] => 432 [6,3,1,4,2,5] => 432 [6,3,1,4,5,2] => 432 [6,3,1,5,2,4] => 432 [6,3,1,5,4,2] => 288 [6,3,2,1,4,5] => 432 [6,3,2,1,5,4] => 288 [6,3,2,4,1,5] => 144 [6,3,2,4,5,1] => 432 [6,3,2,5,1,4] => 144 [6,3,2,5,4,1] => 288 [6,3,4,1,2,5] => 216 [6,3,4,1,5,2] => 144 [6,3,4,2,1,5] => 144 [6,3,4,2,5,1] => 144 [6,3,4,5,1,2] => 216 [6,3,4,5,2,1] => 432 [6,3,5,1,2,4] => 216 [6,3,5,1,4,2] => 144 [6,3,5,2,1,4] => 144 [6,3,5,2,4,1] => 144 [6,3,5,4,1,2] => 144 [6,3,5,4,2,1] => 288 [6,4,1,2,3,5] => 648 [6,4,1,2,5,3] => 432 [6,4,1,3,2,5] => 432 [6,4,1,3,5,2] => 432 [6,4,1,5,2,3] => 432 [6,4,1,5,3,2] => 288 [6,4,2,1,3,5] => 432 [6,4,2,1,5,3] => 288 [6,4,2,3,1,5] => 144 [6,4,2,3,5,1] => 432 [6,4,2,5,1,3] => 144 [6,4,2,5,3,1] => 288 [6,4,3,1,2,5] => 432 [6,4,3,1,5,2] => 288 [6,4,3,2,1,5] => 288 [6,4,3,2,5,1] => 288 [6,4,3,5,1,2] => 144 [6,4,3,5,2,1] => 288 [6,4,5,1,2,3] => 216 [6,4,5,1,3,2] => 144 [6,4,5,2,1,3] => 144 [6,4,5,2,3,1] => 144 [6,4,5,3,1,2] => 144 [6,4,5,3,2,1] => 288 [6,5,1,2,3,4] => 648 [6,5,1,2,4,3] => 432 [6,5,1,3,2,4] => 432 [6,5,1,3,4,2] => 432 [6,5,1,4,2,3] => 432 [6,5,1,4,3,2] => 288 [6,5,2,1,3,4] => 432 [6,5,2,1,4,3] => 288 [6,5,2,3,1,4] => 144 [6,5,2,3,4,1] => 432 [6,5,2,4,1,3] => 144 [6,5,2,4,3,1] => 288 [6,5,3,1,2,4] => 432 [6,5,3,1,4,2] => 288 [6,5,3,2,1,4] => 288 [6,5,3,2,4,1] => 288 [6,5,3,4,1,2] => 144 [6,5,3,4,2,1] => 288 [6,5,4,1,2,3] => 432 [6,5,4,1,3,2] => 288 [6,5,4,2,1,3] => 288 [6,5,4,2,3,1] => 288 [6,5,4,3,1,2] => 288 [6,5,4,3,2,1] => 192 ----------------------------------------------------------------------------- Created: Dec 11, 2015 at 11:05 by Peter Luschny ----------------------------------------------------------------------------- Last Updated: Feb 25, 2022 at 16:54 by Nadia Lafreniere