in reply to Re: Generator of integer partitionts of n

in thread Generator of integer partitionts of n

Changing $integer to 6 for example gives:
~~You can check how many partitions of N exist for the first many values of N at this site. For N=10, for instance, there should be 77 and your script returns less than 50 (many of them even adding up to more than 10).~~
**Update:** Other than an extra 1 on a few partitions here and there, it seems to get all of them though.

6 5 1 4 2 4 1 1 3 3 1 # oops 3 2 1 3 1 1 1 2 2 2 1 # oops 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1

blokhead

In Section
Seekers of Perl Wisdom

Comment onRe^2: Generator of integer partitionts of nDownloadCode