Partition function by nn

p=[:]
1.upto(100){n->a=1;n.times{z=n-it+',';p[z+n]=a+=p[z+it]?:0}
println"p($n)=$a"}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page