aUCBLogo Demos and Tests / partitions
be partitions [:n 100]
if not name? "p [make "p Table 1021]
show h_p :n 1
be h_p :n :k
if or :n==0 :n==1[op 1]
if :k*(3*:k-1)/2>:n [op 0]
(if empty? p.n
[ p.n=(1-2*remainder :k-1 2)*
((h_p :n-:k*(3*:k-1)/2 1)+
h_p :n-:k*(3*:k+1)/2 1)+h_p :n :k+1
])
op p.n
end
end