Huge News!Announcing our $40M Series B led by Abstract Ventures.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
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc