0.0.1 • Published 5 years ago

pfuns v0.0.1

Weekly downloads
9
License
-
Repository
github
Last release
5 years ago

pfuns

Partition functions, number theory.

Install

npm install pfuns

Usage

const pfuns = require('pfuns');

Functions

Number of partitions of n (natural number)

console.log(pfuns.p(n));

See Sequence A000041

Partitions of n

console.log(pfuns.ps(n));

It returns an array. Each element is an array representing the partition.

Number of partitions of n with k elements:

console.log(pfuns.pk(n, k))

Version

  • 0.0.1 Initial version

References

License

MIT

Contribution

Feel free to file issues and submit pull requests — contributions are welcome.

If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that npm test continues to pass.