New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-known-mersenne

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-known-mersenne

checks if a number is a known mersenne prime

1.1.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

Is Known Mersenne

Quickly determines if a number is a known mersenne prime. Returns boolean value

openbits logo This package is also served through OpenBits (http://openbits.world)

Prerequisites

Node 10.4 or later

Installation

npm install is-known-mersenne

Usage

Input must be in BigInt format. Simply add n after all integers.

const isKnownMersenne = require('is-known-mersenne');

isKnownMersenne(7n); => true
isKnownMersenne(2n**2n-1n) => true
isKnownMersenne(10n); => false
isKnownMersenne(2n**10n-1n); => false


Running the tests

npm test

Author

  • Cristian Perez Ramirez

License

This project is licensed under the MIT License - see the LICENSE file for details

FAQs

Package last updated on 28 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts