partition-integer
v1.0.0
Published
Integer partitions
Downloads
2
Readme
partition-integer
Integer partitions, see https://zh.wikipedia.org/wiki/%E6%95%B4%E6%95%B8%E5%88%86%E6%8B%86.
usage
$ npm install partition-integer --save
var partitionInteger = require('partition-integer').partitionInteger;
partitionInteger(3)//4, due to 3=(3)=(1+1+2)=(2+2)=(1+1+1+1)
partitionInteger(4, 2)//, due to (4)=(2+2)=(1+3)
author
license
Apache License 2.0