***************************************************************************** * 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: St000770 ----------------------------------------------------------------------------- Collection: Integer partitions ----------------------------------------------------------------------------- Description: The major index of an integer partition when read from bottom to top. This is the sum of the positions of the corners of the shape of an integer partition when reading from bottom to top. For example, the partition $\lambda = (8,6,6,4,3,3)$ has corners at positions 3,6,9, and 13, giving a major index of 31. ----------------------------------------------------------------------------- References: ----------------------------------------------------------------------------- Code: def statistic(L): L = list(L) + [0] return sum( len(L)-i-2+L[i] for i in range(len(L)-1) if L[i] > L[i+1] ) ----------------------------------------------------------------------------- Statistic values: [2] => 2 [1,1] => 1 [3] => 3 [2,1] => 4 [1,1,1] => 1 [4] => 4 [3,1] => 5 [2,2] => 2 [2,1,1] => 5 [1,1,1,1] => 1 [5] => 5 [4,1] => 6 [3,2] => 6 [3,1,1] => 6 [2,2,1] => 4 [2,1,1,1] => 6 [1,1,1,1,1] => 1 [6] => 6 [5,1] => 7 [4,2] => 7 [4,1,1] => 7 [3,3] => 3 [3,2,1] => 9 [3,1,1,1] => 7 [2,2,2] => 2 [2,2,1,1] => 5 [2,1,1,1,1] => 7 [1,1,1,1,1,1] => 1 [7] => 7 [6,1] => 8 [5,2] => 8 [5,1,1] => 8 [4,3] => 8 [4,2,1] => 10 [4,1,1,1] => 8 [3,3,1] => 5 [3,2,2] => 7 [3,2,1,1] => 11 [3,1,1,1,1] => 8 [2,2,2,1] => 4 [2,2,1,1,1] => 6 [2,1,1,1,1,1] => 8 [1,1,1,1,1,1,1] => 1 [8] => 8 [7,1] => 9 [6,2] => 9 [6,1,1] => 9 [5,3] => 9 [5,2,1] => 11 [5,1,1,1] => 9 [4,4] => 4 [4,3,1] => 11 [4,2,2] => 8 [4,2,1,1] => 12 [4,1,1,1,1] => 9 [3,3,2] => 6 [3,3,1,1] => 6 [3,2,2,1] => 10 [3,2,1,1,1] => 13 [3,1,1,1,1,1] => 9 [2,2,2,2] => 2 [2,2,2,1,1] => 5 [2,2,1,1,1,1] => 7 [2,1,1,1,1,1,1] => 9 [1,1,1,1,1,1,1,1] => 1 [9] => 9 [8,1] => 10 [7,2] => 10 [7,1,1] => 10 [6,3] => 10 [6,2,1] => 12 [6,1,1,1] => 10 [5,4] => 10 [5,3,1] => 12 [5,2,2] => 9 [5,2,1,1] => 13 [5,1,1,1,1] => 10 [4,4,1] => 6 [4,3,2] => 12 [4,3,1,1] => 13 [4,2,2,1] => 11 [4,2,1,1,1] => 14 [4,1,1,1,1,1] => 10 [3,3,3] => 3 [3,3,2,1] => 9 [3,3,1,1,1] => 7 [3,2,2,2] => 8 [3,2,2,1,1] => 12 [3,2,1,1,1,1] => 15 [3,1,1,1,1,1,1] => 10 [2,2,2,2,1] => 4 [2,2,2,1,1,1] => 6 [2,2,1,1,1,1,1] => 8 [2,1,1,1,1,1,1,1] => 10 [1,1,1,1,1,1,1,1,1] => 1 [10] => 10 [9,1] => 11 [8,2] => 11 [8,1,1] => 11 [7,3] => 11 [7,2,1] => 13 [7,1,1,1] => 11 [6,4] => 11 [6,3,1] => 13 [6,2,2] => 10 [6,2,1,1] => 14 [6,1,1,1,1] => 11 [5,5] => 5 [5,4,1] => 13 [5,3,2] => 13 [5,3,1,1] => 14 [5,2,2,1] => 12 [5,2,1,1,1] => 15 [5,1,1,1,1,1] => 11 [4,4,2] => 7 [4,4,1,1] => 7 [4,3,3] => 9 [4,3,2,1] => 16 [4,3,1,1,1] => 15 [4,2,2,2] => 9 [4,2,2,1,1] => 13 [4,2,1,1,1,1] => 16 [4,1,1,1,1,1,1] => 11 [3,3,3,1] => 5 [3,3,2,2] => 7 [3,3,2,1,1] => 11 [3,3,1,1,1,1] => 8 [3,2,2,2,1] => 11 [3,2,2,1,1,1] => 14 [3,2,1,1,1,1,1] => 17 [3,1,1,1,1,1,1,1] => 11 [2,2,2,2,2] => 2 [2,2,2,2,1,1] => 5 [2,2,2,1,1,1,1] => 7 [2,2,1,1,1,1,1,1] => 9 [2,1,1,1,1,1,1,1,1] => 11 [1,1,1,1,1,1,1,1,1,1] => 1 [11] => 11 [10,1] => 12 [9,2] => 12 [9,1,1] => 12 [8,3] => 12 [8,2,1] => 14 [8,1,1,1] => 12 [7,4] => 12 [7,3,1] => 14 [7,2,2] => 11 [7,2,1,1] => 15 [7,1,1,1,1] => 12 [6,5] => 12 [6,4,1] => 14 [6,3,2] => 14 [6,3,1,1] => 15 [6,2,2,1] => 13 [6,2,1,1,1] => 16 [6,1,1,1,1,1] => 12 [5,5,1] => 7 [5,4,2] => 14 [5,4,1,1] => 15 [5,3,3] => 10 [5,3,2,1] => 17 [5,3,1,1,1] => 16 [5,2,2,2] => 10 [5,2,2,1,1] => 14 [5,2,1,1,1,1] => 17 [5,1,1,1,1,1,1] => 12 [4,4,3] => 8 [4,4,2,1] => 10 [4,4,1,1,1] => 8 [4,3,3,1] => 12 [4,3,2,2] => 14 [4,3,2,1,1] => 19 [4,3,1,1,1,1] => 17 [4,2,2,2,1] => 12 [4,2,2,1,1,1] => 15 [4,2,1,1,1,1,1] => 18 [4,1,1,1,1,1,1,1] => 12 [3,3,3,2] => 6 [3,3,3,1,1] => 6 [3,3,2,2,1] => 10 [3,3,2,1,1,1] => 13 [3,3,1,1,1,1,1] => 9 [3,2,2,2,2] => 9 [3,2,2,2,1,1] => 13 [3,2,2,1,1,1,1] => 16 [3,2,1,1,1,1,1,1] => 19 [3,1,1,1,1,1,1,1,1] => 12 [2,2,2,2,2,1] => 4 [2,2,2,2,1,1,1] => 6 [2,2,2,1,1,1,1,1] => 8 [2,2,1,1,1,1,1,1,1] => 10 [2,1,1,1,1,1,1,1,1,1] => 12 [1,1,1,1,1,1,1,1,1,1,1] => 1 [12] => 12 [11,1] => 13 [10,2] => 13 [10,1,1] => 13 [9,3] => 13 [9,2,1] => 15 [9,1,1,1] => 13 [8,4] => 13 [8,3,1] => 15 [8,2,2] => 12 [8,2,1,1] => 16 [8,1,1,1,1] => 13 [7,5] => 13 [7,4,1] => 15 [7,3,2] => 15 [7,3,1,1] => 16 [7,2,2,1] => 14 [7,2,1,1,1] => 17 [7,1,1,1,1,1] => 13 [6,6] => 6 [6,5,1] => 15 [6,4,2] => 15 [6,4,1,1] => 16 [6,3,3] => 11 [6,3,2,1] => 18 [6,3,1,1,1] => 17 [6,2,2,2] => 11 [6,2,2,1,1] => 15 [6,2,1,1,1,1] => 18 [6,1,1,1,1,1,1] => 13 [5,5,2] => 8 [5,5,1,1] => 8 [5,4,3] => 15 [5,4,2,1] => 18 [5,4,1,1,1] => 17 [5,3,3,1] => 13 [5,3,2,2] => 15 [5,3,2,1,1] => 20 [5,3,1,1,1,1] => 18 [5,2,2,2,1] => 13 [5,2,2,1,1,1] => 16 [5,2,1,1,1,1,1] => 19 [5,1,1,1,1,1,1,1] => 13 [4,4,4] => 4 [4,4,3,1] => 11 [4,4,2,2] => 8 [4,4,2,1,1] => 12 [4,4,1,1,1,1] => 9 [4,3,3,2] => 13 [4,3,3,1,1] => 14 [4,3,2,2,1] => 18 [4,3,2,1,1,1] => 22 [4,3,1,1,1,1,1] => 19 [4,2,2,2,2] => 10 [4,2,2,2,1,1] => 14 [4,2,2,1,1,1,1] => 17 [4,2,1,1,1,1,1,1] => 20 [4,1,1,1,1,1,1,1,1] => 13 [3,3,3,3] => 3 [3,3,3,2,1] => 9 [3,3,3,1,1,1] => 7 [3,3,2,2,2] => 8 [3,3,2,2,1,1] => 12 [3,3,2,1,1,1,1] => 15 [3,3,1,1,1,1,1,1] => 10 [3,2,2,2,2,1] => 12 [3,2,2,2,1,1,1] => 15 [3,2,2,1,1,1,1,1] => 18 [3,2,1,1,1,1,1,1,1] => 21 [3,1,1,1,1,1,1,1,1,1] => 13 [2,2,2,2,2,2] => 2 [2,2,2,2,2,1,1] => 5 [2,2,2,2,1,1,1,1] => 7 [2,2,2,1,1,1,1,1,1] => 9 [2,2,1,1,1,1,1,1,1,1] => 11 [2,1,1,1,1,1,1,1,1,1,1] => 13 [1,1,1,1,1,1,1,1,1,1,1,1] => 1 ----------------------------------------------------------------------------- Created: Apr 10, 2017 at 15:37 by Christian Stump ----------------------------------------------------------------------------- Last Updated: Apr 10, 2017 at 15:37 by Christian Stump