#358
The Riddle of Partitions
 

Difficulty:Medium
Topics:Math and numbers


Mission: "The Riddle of Partitions" meminta elo untuk menghitung berapa banyak cara sebuah bilangan n dapat dibagi menjadi jumlah dari bilangan bulat positif, tanpa mempertimbangkan urutan. Ini adalah fungsi partisi p(n).
test not run
(= (__ 4) 5) ; 4, 3+1, 2+2, 2+1+1, 1+1+1+1
test not run
(= (__ 5) 7) ; 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 1+1+1+1+1
test not run
(= (__ 0) 1) ; By convention p(0) = 1
test not run
(= (__ 3) 3) ; 3, 2+1, 1+1+1


Code which fills in the blank: