You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
partitions(n) returns the nth partition number, up to Matlab's largest integer capabilities.
examples: partitions(0) returns 1 and partitions(200) returns 3972999029388.
The algorithm used is due to Euler and is delineated in a video by Mathologer (the inspiration for this code).
Cite As
Douglas Brunson (2026). partitions (https://in.mathworks.com/matlabcentral/fileexchange/86277-partitions), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.1 (1.27 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
