cached-primes
v1.0.7
Published
first 1 million prime numbers
Downloads
17
Maintainers
Readme
This package provides O(1) lookup for the first 1 million prime numbers.
Install
npm install cached-primes
Usage
var cp = require('cached-primes');
// check if a number is a prime number
cp.isPrime(97127); // true
// get the kth prime number
cp.getPrime(1); // 2
cp.getPrime(1000000); // 15485863