Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get Dyson's crank of an integer partition
| ResourceFunction["PartitionCrank"][x] gives Dyson's crank of the partition x. | 
Here is a basic example:
| In[1]:= | ![ResourceFunction["PartitionCrank"][{5, 3, 1, 1, 1}]](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/6e86b0878bba2b43.png) | 
| Out[1]= |  | 
Here are the partitions of 9 in compact form:
| In[2]:= | ![Row /@ IntegerPartitions[9]](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/28651c762c5cde4b.png) | 
| Out[2]= |  | 
The crank of the partitions of 9:
| In[3]:= | ![ResourceFunction["PartitionCrank"] /@ IntegerPartitions[9]](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/190d76b71ea8a992.png) | 
| Out[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]]](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/3d2f2291412a9531.png) | 
| Out[4]= |  | 
| In[5]:= | ![Mod[#, 11] == 0 & /@ %](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/178062b9bbc37986.png) | 
| 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] &]](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/453cd4fbe734a2d3.png) | 
| Out[6]= |  | 
Here is an example using a different value of m:
| In[7]:= | ![Length /@ GatherBy[IntegerPartitions[28], Mod[ ResourceFunction["PartitionCrank"]@#, 11] &]](https://www.wolframcloud.com/obj/resourcesystem/images/cdc/cdc58240-f298-4640-a630-36f53c9ef52d/1b4d32915be19c1a.png) | 
| Out[7]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License