RosettaCodeData/Task/Partition-function-P/J/partition-function-p-1.j

3 lines
117 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
pn =: -/@(+/)@:($:"0)@rec ` (x:@(0&=)) @. (0>:]) M.
rec=: - (-: (*"1) _1 1 +/ 3 * ]) @ (>:@i.@>.@%:@((2%3)&*))