*****************************************************************************
*       www.FindStat.org - The Combinatorial Statistic Finder               *
*                                                                           *
*       Copyright (C) 2019 The FindStatCrew <info@findstat.org>             *
*                                                                           *
*    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: St000225

-----------------------------------------------------------------------------
Collection: Integer partitions

-----------------------------------------------------------------------------
Description: Difference between largest and smallest parts in a partition.

-----------------------------------------------------------------------------
References: [1]   Andrews, G. E., Beck, M., Robbins, N. Partitions with fixed differences between largest and smallest parts [[arXiv:1406.3374]]
[2]   Triangle read by rows, 0<=k<n: T(n,k) = number of partitions of n such that the differences between greatest and smallest parts are k. [[OEIS:A097364]]

-----------------------------------------------------------------------------
Code:
def statistic(L):
    return L[0]-L[-1]

-----------------------------------------------------------------------------
Statistic values:

[1]                   => 0
[2]                   => 0
[1,1]                 => 0
[3]                   => 0
[2,1]                 => 1
[1,1,1]               => 0
[4]                   => 0
[3,1]                 => 2
[2,2]                 => 0
[2,1,1]               => 1
[1,1,1,1]             => 0
[5]                   => 0
[4,1]                 => 3
[3,2]                 => 1
[3,1,1]               => 2
[2,2,1]               => 1
[2,1,1,1]             => 1
[1,1,1,1,1]           => 0
[6]                   => 0
[5,1]                 => 4
[4,2]                 => 2
[4,1,1]               => 3
[3,3]                 => 0
[3,2,1]               => 2
[3,1,1,1]             => 2
[2,2,2]               => 0
[2,2,1,1]             => 1
[2,1,1,1,1]           => 1
[1,1,1,1,1,1]         => 0
[7]                   => 0
[6,1]                 => 5
[5,2]                 => 3
[5,1,1]               => 4
[4,3]                 => 1
[4,2,1]               => 3
[4,1,1,1]             => 3
[3,3,1]               => 2
[3,2,2]               => 1
[3,2,1,1]             => 2
[3,1,1,1,1]           => 2
[2,2,2,1]             => 1
[2,2,1,1,1]           => 1
[2,1,1,1,1,1]         => 1
[1,1,1,1,1,1,1]       => 0
[8]                   => 0
[7,1]                 => 6
[6,2]                 => 4
[6,1,1]               => 5
[5,3]                 => 2
[5,2,1]               => 4
[5,1,1,1]             => 4
[4,4]                 => 0
[4,3,1]               => 3
[4,2,2]               => 2
[4,2,1,1]             => 3
[4,1,1,1,1]           => 3
[3,3,2]               => 1
[3,3,1,1]             => 2
[3,2,2,1]             => 2
[3,2,1,1,1]           => 2
[3,1,1,1,1,1]         => 2
[2,2,2,2]             => 0
[2,2,2,1,1]           => 1
[2,2,1,1,1,1]         => 1
[2,1,1,1,1,1,1]       => 1
[1,1,1,1,1,1,1,1]     => 0
[9]                   => 0
[8,1]                 => 7
[7,2]                 => 5
[7,1,1]               => 6
[6,3]                 => 3
[6,2,1]               => 5
[6,1,1,1]             => 5
[5,4]                 => 1
[5,3,1]               => 4
[5,2,2]               => 3
[5,2,1,1]             => 4
[5,1,1,1,1]           => 4
[4,4,1]               => 3
[4,3,2]               => 2
[4,3,1,1]             => 3
[4,2,2,1]             => 3
[4,2,1,1,1]           => 3
[4,1,1,1,1,1]         => 3
[3,3,3]               => 0
[3,3,2,1]             => 2
[3,3,1,1,1]           => 2
[3,2,2,2]             => 1
[3,2,2,1,1]           => 2
[3,2,1,1,1,1]         => 2
[3,1,1,1,1,1,1]       => 2
[2,2,2,2,1]           => 1
[2,2,2,1,1,1]         => 1
[2,2,1,1,1,1,1]       => 1
[2,1,1,1,1,1,1,1]     => 1
[1,1,1,1,1,1,1,1,1]   => 0
[10]                  => 0
[9,1]                 => 8
[8,2]                 => 6
[8,1,1]               => 7
[7,3]                 => 4
[7,2,1]               => 6
[7,1,1,1]             => 6
[6,4]                 => 2
[6,3,1]               => 5
[6,2,2]               => 4
[6,2,1,1]             => 5
[6,1,1,1,1]           => 5
[5,5]                 => 0
[5,4,1]               => 4
[5,3,2]               => 3
[5,3,1,1]             => 4
[5,2,2,1]             => 4
[5,2,1,1,1]           => 4
[5,1,1,1,1,1]         => 4
[4,4,2]               => 2
[4,4,1,1]             => 3
[4,3,3]               => 1
[4,3,2,1]             => 3
[4,3,1,1,1]           => 3
[4,2,2,2]             => 2
[4,2,2,1,1]           => 3
[4,2,1,1,1,1]         => 3
[4,1,1,1,1,1,1]       => 3
[3,3,3,1]             => 2
[3,3,2,2]             => 1
[3,3,2,1,1]           => 2
[3,3,1,1,1,1]         => 2
[3,2,2,2,1]           => 2
[3,2,2,1,1,1]         => 2
[3,2,1,1,1,1,1]       => 2
[3,1,1,1,1,1,1,1]     => 2
[2,2,2,2,2]           => 0
[2,2,2,2,1,1]         => 1
[2,2,2,1,1,1,1]       => 1
[2,2,1,1,1,1,1,1]     => 1
[2,1,1,1,1,1,1,1,1]   => 1
[1,1,1,1,1,1,1,1,1,1] => 0
[5,4,2]               => 3
[5,4,1,1]             => 4
[5,3,3]               => 2
[5,3,2,1]             => 4
[5,3,1,1,1]           => 4
[5,2,2,2]             => 3
[5,2,2,1,1]           => 4
[4,4,3]               => 1
[4,4,2,1]             => 3
[4,4,1,1,1]           => 3
[4,3,3,1]             => 3
[4,3,2,2]             => 2
[4,3,2,1,1]           => 3
[4,2,2,2,1]           => 3
[3,3,3,2]             => 1
[3,3,3,1,1]           => 2
[3,3,2,2,1]           => 2
[6,4,2]               => 4
[5,4,3]               => 2
[5,4,2,1]             => 4
[5,4,1,1,1]           => 4
[5,3,3,1]             => 4
[5,3,2,2]             => 3
[5,3,2,1,1]           => 4
[5,2,2,2,1]           => 4
[4,4,3,1]             => 3
[4,4,2,2]             => 2
[4,4,2,1,1]           => 3
[4,3,3,2]             => 2
[4,3,3,1,1]           => 3
[4,3,2,2,1]           => 3
[3,3,3,2,1]           => 2
[3,3,2,2,1,1]         => 2
[5,4,3,1]             => 4
[5,4,2,2]             => 3
[5,4,2,1,1]           => 4
[5,3,3,2]             => 3
[5,3,3,1,1]           => 4
[5,3,2,2,1]           => 4
[4,4,3,2]             => 2
[4,4,3,1,1]           => 3
[4,4,2,2,1]           => 3
[4,3,3,2,1]           => 3
[5,4,3,2]             => 3
[5,4,3,1,1]           => 4
[5,4,2,2,1]           => 4
[5,3,3,2,1]           => 4
[4,4,3,2,1]           => 3
[5,4,3,2,1]           => 4

-----------------------------------------------------------------------------
Created: Oct 13, 2014 at 14:17 by Matthias Beck

-----------------------------------------------------------------------------
Last Updated: Jun 05, 2020 at 14:05 by Martin Rubey