Partition function P: Difference between revisions

Line 277:
;Stretch goal:
From command line after running the above
<pre>In [2]: %time part(6666)
<pre>(Intermediaries):
Wall time: 243 ms
posd: [1, 3, 2, 5, 3, 7, 4, 9, 5, 11]
Out[2]: 193655306161707661080005073394486091998480950338405932486880600467114423441282418165863
pos_gen: [1, 2, 5, 7, 12, 15, 22, 26, 35, 40]
</pre>
plus_minus: [(-1, 1), (-2, 1), 0, 0, (-5, -1), 0, (-7, -1), 0, 0, 0, 0, (-12, 1), 0, 0, (-15, 1)]
 
Partitions: [1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135]</pre>
 
=={{header|REXX}}==
Anonymous user