curiousn

0.2.7 • Public • Published

Curious/Automorphic Numbers

An N-digit number X, such that the last N-digits of X² == X

e.g. 2-digit "25", 25² is "625".

Usage

const cn = require('curiousn').curiousn;

const ansArray = cn(2);

// there are always 2 curious numbers of length N, so you get an array

// because the curious numbers get big quick, we use "big-integer" // which means you need toString() to see the value

console.log( ansArray[0].toString() );

Notes

See

Readme

Keywords

none

Package Sidebar

Install

npm i curiousn

Weekly Downloads

0

Version

0.2.7

License

Beerware

Last publish

Collaborators

  • netrc