Wolfram Function Repository
Instantuse addon functions for the Wolfram Language
Function Repository Resource:
The largest part minus the number of parts of a partition
ResourceFunction["PartitionRank"][x] gives the difference of the largest part of the partition x and the number of parts of x. 
The largest part is 4 and there are 3 parts; 43=1:
In[1]:= 

Out[1]= 

The largest part and the number of parts are both 5; 55=0:
In[2]:= 

Out[2]= 

Ramanujan discovered and proved analytically that the number of partitions of 5m+4 is divisible by 5:
In[3]:= 

Out[3]= 

Dyson conjectured and Atkins–Swinnerton–Dyer proved that the partitions of a number of the form 5m+4 can be split into five sets of equal size according to the rank mod 5:
In[4]:= 

Out[4]= 

Here is another example:
In[5]:= 

Out[5]= 

A similar result holds for 7; in this case the partitions of a number of the form 7m+5 can be split into 7 sets of equal size, according to the rank mod 7:
In[6]:= 

Out[6]= 

This work is licensed under a Creative Commons Attribution 4.0 International License