Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the next partition of an integer in reverse lexicographic order
ResourceFunction["NextIntegerPartition"][p] gives the integer partition following p in reverse lexicographic order. |
The partition of an integer following the given one in the reverse lexicographic order:
In[1]:= |
Out[1]= |
NextIntegerPartition[p] gives the successor to p in the list returned by IntegerPartitions:
In[2]:= |
Out[2]= |
In[3]:= |
Out[3]= |
This work is licensed under a Creative Commons Attribution 4.0 International License