***************************************************************************** * 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: St000143 ----------------------------------------------------------------------------- Collection: Integer partitions ----------------------------------------------------------------------------- Description: The largest repeated part of a partition. If the parts of the partition are all distinct, the value of the statistic is defined to be zero. ----------------------------------------------------------------------------- References: ----------------------------------------------------------------------------- Code: def statistic(L): current = -1 for i in range(len(L)): prev = current current = L[i] if current == prev: return current return 0 ----------------------------------------------------------------------------- Statistic values: [] => 0 [1] => 0 [2] => 0 [1,1] => 1 [3] => 0 [2,1] => 0 [1,1,1] => 1 [4] => 0 [3,1] => 0 [2,2] => 2 [2,1,1] => 1 [1,1,1,1] => 1 [5] => 0 [4,1] => 0 [3,2] => 0 [3,1,1] => 1 [2,2,1] => 2 [2,1,1,1] => 1 [1,1,1,1,1] => 1 [6] => 0 [5,1] => 0 [4,2] => 0 [4,1,1] => 1 [3,3] => 3 [3,2,1] => 0 [3,1,1,1] => 1 [2,2,2] => 2 [2,2,1,1] => 2 [2,1,1,1,1] => 1 [1,1,1,1,1,1] => 1 [7] => 0 [6,1] => 0 [5,2] => 0 [5,1,1] => 1 [4,3] => 0 [4,2,1] => 0 [4,1,1,1] => 1 [3,3,1] => 3 [3,2,2] => 2 [3,2,1,1] => 1 [3,1,1,1,1] => 1 [2,2,2,1] => 2 [2,2,1,1,1] => 2 [2,1,1,1,1,1] => 1 [1,1,1,1,1,1,1] => 1 [8] => 0 [7,1] => 0 [6,2] => 0 [6,1,1] => 1 [5,3] => 0 [5,2,1] => 0 [5,1,1,1] => 1 [4,4] => 4 [4,3,1] => 0 [4,2,2] => 2 [4,2,1,1] => 1 [4,1,1,1,1] => 1 [3,3,2] => 3 [3,3,1,1] => 3 [3,2,2,1] => 2 [3,2,1,1,1] => 1 [3,1,1,1,1,1] => 1 [2,2,2,2] => 2 [2,2,2,1,1] => 2 [2,2,1,1,1,1] => 2 [2,1,1,1,1,1,1] => 1 [1,1,1,1,1,1,1,1] => 1 [9] => 0 [8,1] => 0 [7,2] => 0 [7,1,1] => 1 [6,3] => 0 [6,2,1] => 0 [6,1,1,1] => 1 [5,4] => 0 [5,3,1] => 0 [5,2,2] => 2 [5,2,1,1] => 1 [5,1,1,1,1] => 1 [4,4,1] => 4 [4,3,2] => 0 [4,3,1,1] => 1 [4,2,2,1] => 2 [4,2,1,1,1] => 1 [4,1,1,1,1,1] => 1 [3,3,3] => 3 [3,3,2,1] => 3 [3,3,1,1,1] => 3 [3,2,2,2] => 2 [3,2,2,1,1] => 2 [3,2,1,1,1,1] => 1 [3,1,1,1,1,1,1] => 1 [2,2,2,2,1] => 2 [2,2,2,1,1,1] => 2 [2,2,1,1,1,1,1] => 2 [2,1,1,1,1,1,1,1] => 1 [1,1,1,1,1,1,1,1,1] => 1 [10] => 0 [9,1] => 0 [8,2] => 0 [8,1,1] => 1 [7,3] => 0 [7,2,1] => 0 [7,1,1,1] => 1 [6,4] => 0 [6,3,1] => 0 [6,2,2] => 2 [6,2,1,1] => 1 [6,1,1,1,1] => 1 [5,5] => 5 [5,4,1] => 0 [5,3,2] => 0 [5,3,1,1] => 1 [5,2,2,1] => 2 [5,2,1,1,1] => 1 [5,1,1,1,1,1] => 1 [4,4,2] => 4 [4,4,1,1] => 4 [4,3,3] => 3 [4,3,2,1] => 0 [4,3,1,1,1] => 1 [4,2,2,2] => 2 [4,2,2,1,1] => 2 [4,2,1,1,1,1] => 1 [4,1,1,1,1,1,1] => 1 [3,3,3,1] => 3 [3,3,2,2] => 3 [3,3,2,1,1] => 3 [3,3,1,1,1,1] => 3 [3,2,2,2,1] => 2 [3,2,2,1,1,1] => 2 [3,2,1,1,1,1,1] => 1 [3,1,1,1,1,1,1,1] => 1 [2,2,2,2,2] => 2 [2,2,2,2,1,1] => 2 [2,2,2,1,1,1,1] => 2 [2,2,1,1,1,1,1,1] => 2 [2,1,1,1,1,1,1,1,1] => 1 [1,1,1,1,1,1,1,1,1,1] => 1 [5,4,2] => 0 [5,4,1,1] => 1 [5,3,3] => 3 [5,3,2,1] => 0 [5,3,1,1,1] => 1 [5,2,2,2] => 2 [5,2,2,1,1] => 2 [4,4,3] => 4 [4,4,2,1] => 4 [4,4,1,1,1] => 4 [4,3,3,1] => 3 [4,3,2,2] => 2 [4,3,2,1,1] => 1 [4,2,2,2,1] => 2 [3,3,3,2] => 3 [3,3,3,1,1] => 3 [3,3,2,2,1] => 3 [6,4,2] => 0 [5,4,3] => 0 [5,4,2,1] => 0 [5,4,1,1,1] => 1 [5,3,3,1] => 3 [5,3,2,2] => 2 [5,3,2,1,1] => 1 [5,2,2,2,1] => 2 [4,4,3,1] => 4 [4,4,2,2] => 4 [4,4,2,1,1] => 4 [4,3,3,2] => 3 [4,3,3,1,1] => 3 [4,3,2,2,1] => 2 [3,3,3,2,1] => 3 [3,3,2,2,1,1] => 3 [5,4,3,1] => 0 [5,4,2,2] => 2 [5,4,2,1,1] => 1 [5,3,3,2] => 3 [5,3,3,1,1] => 3 [5,3,2,2,1] => 2 [4,4,3,2] => 4 [4,4,3,1,1] => 4 [4,4,2,2,1] => 4 [4,3,3,2,1] => 3 [5,4,3,2] => 0 [5,4,3,1,1] => 1 [5,4,2,2,1] => 2 [5,3,3,2,1] => 3 [4,4,3,2,1] => 4 [5,4,3,2,1] => 0 ----------------------------------------------------------------------------- Created: Jun 30, 2013 at 01:20 by anonymous ----------------------------------------------------------------------------- Last Updated: Dec 30, 2017 at 22:04 by Martin Rubey