Skip to content

quicbit-js/qb-factors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qb-factors

Calculate primes and factors with caching.

install

npm install qb-factors

usage

primes(x) returns up to and including the value passed in:

let qbf = require('qb-factors')
qbf.primes(37)
> [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37 ]

factors(x) returns prime factors other than 1 and the value passed in:

qbf.factors(37)
> []

qbf.factors(88)
> [ 2, 11 ] 

About

Calculate primes and factors with caching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published