Function Repository Resource:

PartitionCrank

Source Notebook

Get Dyson's crank of an integer partition

Contributed by: George Beck

ResourceFunction["PartitionCrank"][x]

gives Dyson's crank of the partition x.

Details and Options

A partition of a positive integer n is a weakly decreasing list of positive integers that add up to to n.
The crank of a partition is defined via a somewhat complicated piecewise function as discussed on the corresponding Wikipedia entry.
The crank is a partition statistic useful in studying congruence properties of the partition function p(n), given by PartitionsP in the Wolfram Language.

Examples

Basic Examples (2) 

Here is a basic example:

In[1]:=
ResourceFunction["PartitionCrank"][{5, 3, 1, 1, 1}]
Out[1]=

Here are the partitions of 9 in compact form:

In[2]:=
Row /@ IntegerPartitions[9]
Out[2]=

The crank of the partitions of 9:

In[3]:=
ResourceFunction["PartitionCrank"] /@ IntegerPartitions[9]
Out[3]=

Neat Examples (3) 

Ramanujan discovered and proved analytically that the number of partitions of 11m+6 is divisible by 11:

In[4]:=
PartitionsP[Range[6, 100, 11]]
Out[4]=
In[5]:=
Mod[#, 11] == 0 & /@ %
Out[5]=

Andrews and Garvan proved that the partitions of a number of the form 11m+6 can be split into 11 sets of equal size according to the crank mod 11:

In[6]:=
Length /@ GatherBy[IntegerPartitions[17], Mod[ ResourceFunction["PartitionCrank"]@#, 11] &]
Out[6]=

Here is an example using a different value of m:

In[7]:=
Length /@ GatherBy[IntegerPartitions[28], Mod[ ResourceFunction["PartitionCrank"]@#, 11] &]
Out[7]=

Publisher

George Beck

Version History

  • 1.0.0 – 07 June 2019

Source Metadata

Related Resources

Author Notes

May 23, 2019: I fixed some styling.

License Information