Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a random partition of an integer
ResourceFunction["RandomIntegerPartition"][n] generates a random partition of the integer n into smaller integers. | |
ResourceFunction["RandomIntegerPartition"][n,k] generates k partitions. |
Generate a random partition of the integer 5:
| In[1]:= |
| Out[1]= |
Generate multiple random partitions:
| In[2]:= |
| Out[2]= |
Generate a random partition of a medium-sized integer:
| In[3]:= |
| Out[3]= |
Generate three partitions of 20000:
| In[4]:= |
| Out[4]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License