Function Repository Resource:

DurfeeSquare

Source Notebook

Compute the side length of the Durfee square of an integer partition

Contributed by: George Beck

ResourceFunction["DurfeeSquare"][f]

gives the side-length of the largest square of dots in the Ferrers diagram of an integer partition.

Details

A partition of n is a list of weakly decreasing positive integers that add up to n. For instance, written compactly, these are the five partitions of 4: 4, 31, 2, 2 211, 1111.

Examples

Basic Examples (5) 

Here is an integer partition:

In[1]:=
\[Lambda] = {6, 4, 4, 4, 2, 1};

This is its Ferrers diagram. The first row has 6 dots, and so on:

In[2]:=
ResourceFunction["FerrersDiagram"][\[Lambda]]
Out[2]=

The largest square of dots is 4×4:

In[3]:=
ResourceFunction["DurfeeSquare"][\[Lambda]]
Out[3]=

The Ferrers diagram of the conjugate partition of λ switches the rows and columns of the Ferrers diagram of λ:

In[4]:=
ResourceFunction["FerrersDiagram"][
 ResourceFunction["ConjugatePartition"][\[Lambda]]]
Out[4]=

Clearly, the Durfee square of a partition is the same as its conjugate:

In[5]:=
ResourceFunction["DurfeeSquare"][
 ResourceFunction["ConjugatePartition"][\[Lambda]]]
Out[5]=

Applications (1) 

Remarkably, the sum of the Durfee squares of the partitions of n equals the sum of the positive cranks of the partitions of n:

In[6]:=
Table[Total[
  ResourceFunction["DurfeeSquare"] /@ IntegerPartitions[n]], {n, 16}]
Out[6]=
In[7]:=
Table[Total[
  Select[Map[ResourceFunction["PartitionCrank"], IntegerPartitions[n]], Positive]], {n, 16}]
Out[7]=

Publisher

George Beck

Requirements

Wolfram Language 12.3 (May 2021) or above

Version History

  • 1.0.0 – 22 January 2024

Source Metadata

Related Resources

License Information