An open API service indexing awesome lists of open source software.

https://github.com/alexvcasillas/erat-o

Eratosthenes primality test implementation
https://github.com/alexvcasillas/erat-o

algorithm eratosthenes javascript math numbers primes

Last synced: about 2 months ago
JSON representation

Eratosthenes primality test implementation

Awesome Lists containing this project

README

          

# Erat-O

[![CircleCI](https://circleci.com/gh/alexvcasillas/erat-o.svg?style=svg)](https://circleci.com/gh/alexvcasillas/erat-o)

**Erat-O** is the primality test algorithm implementation.

## Installation

NPM

```
npm install @alexvcasillas/erat-o
```

YARN

```
yarn add @alexvcasillas/erat-o
```

## Usage

```
import { erat } from '@alexvcasillas/erat-o';
const result = erat(20);
console.log(result); // [2, 3, 5, 7, 11, 13, 17, 19]
```