let partition_count n =
  let dp = Array.make (n + 1) 0 in
  dp.(0) <- 1;
  for k = 1 to n do
    for i = k to n do
      dp.(i) <- dp.(i) + dp.(i - k)
    done
  done;
  dp.(n)

;;

partition_count 15
