sieve-set
v1.0.3
Published
Generate a Sieve of Eratosthenes with constant time lookup
Downloads
3,613
Maintainers
Readme
sieve-set
Generate a Sieve of Eratosthenes with constant time lookup. For testing primes in constant time, see quick-is-prime.
Install
$ npm install sieve-set
var sieveSet = require('sieve-set');
Usage
console.log(sieveSet(100));
{ '2': true,
'3': true,
'5': true,
'7': true,
'11': true,
'13': true,
'17': true,
'19': true,
'23': true,
'29': true,
'31': true,
'37': true,
'41': true,
'43': true,
'47': true,
'53': true,
'59': true,
'61': true,
'67': true,
'71': true,
'73': true,
'79': true,
'83': true,
'89': true,
'97': true }