Partition function by pooq

n:100;a:[:];n.times{|i|s:0;n.times{|j|a[i*n+j]=j>0&&j<i?a[(i-j-1)*n+j]+a[(i-1)*n+j-1]:i<j?0:1;s+=a[i*n+j];}%f"p(%d)=%d"(i+1,s).p;}

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

download

return to the top page