{"_id":"@danilosampaio/numbers","_rev":"3-e455ed64fb09aa9fb0702e1c7635a12f","name":"@danilosampaio/numbers","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@danilosampaio/numbers","description":"A lib for math calculations.","version":"1.0.0","author":{"name":"Danilo Sampaio","email":"danilo.sampaio@gmail.com","url":"https://github.com/danilosampaio"},"repository":{"url":"git+ssh://git@github.com/danilosampaio/numbers.git","type":"git"},"main":"index.js","keywords":["math","binomial coefficient","factorial","great common divisor","least common multiple","triangular number"],"scripts":{"test":"jest","lint":"eslint index.js lib/*"},"devDependencies":{"eslint":"^7.16.0","jest":"^26.6.3"},"license":"MIT","gitHead":"ed9457a49e7471d0285eb6c33b36db64b931f6e2","bugs":{"url":"https://github.com/danilosampaio/numbers/issues"},"homepage":"https://github.com/danilosampaio/numbers#readme","_id":"@danilosampaio/numbers@1.0.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"integrity":"sha512-ixrkL6+rHK4wdxake1SHUs3k1uEBpUqPlsUh6ge4MTT0D4h1VABn+meIjU3z/keeq71DMAO4xcQphvsj8IY3GQ==","shasum":"a772c53f21e83c2d9da5f47e63413bd8c730d3f1","tarball":"https://registry.npmjs.org/@danilosampaio/numbers/-/numbers-1.0.0.tgz","fileCount":12,"unpackedSize":6376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6mNDCRA9TVsSAnZWagAANCwP/je4d/UQXS9uviVrwsAc\na8nf6X63beGcr8XgeKkjaxQdnopbz3tXmx1S7RVNMYbRfKcd6CJZqZUP670Y\ndTLrdjq1ZSzlONNXHu5J30kTDBdk3ktISMdKoGNgxce6RgL+WD5ExC9jABo4\nl1JHzLSQn3ECJUgYvN8UUh49KRZ4ax9dbrwF9J+E8sHclsyBio93cUPsQbYv\nN8gw/N5SquuD7t1hcsE40kXAK2nqiKONeu4lSs/nDWBBdnSA8pqZhe8riAtz\nOc7wUTakesuCDIeMWnT0Is4G15tnVIoApYwwQUXzfeiZOknNsD4uEWmQk+L9\nRsMyH3cCJZfRAuWvjBrHrRMoTZxJxHgAucIaHP6Zk7tG8PdtsuJsPJS3IgUw\nVqyeENAp61rn5pnA6VdK3uPsxEBOvY2XVGKpOFcYhr9UTsUn2g1XHgcK6muH\nc6PAiFIF+MOPsTqgQfn75fFPZnxgCeQY2NkLHGxjgUbPp2T5KC1437G1fyuT\nsVogBB61RLisNyKSE+6LoqPlpaMoYMEopJg5KKTUV/4unA0zAdlvCiVFF7J+\nNOBzXq83RQeFzUuLstpjUw6wOUrwI/u4g2xh+8aThIc4dlyD9BZrO2s/AFXR\npme4uf47K8CntoRehfc4QDhaXT+cUJiT0pORVIv8HGwQvN6c+hRFlHHA+29F\n1lZP\r\n=4Lbz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE8PJgdEBRMaLD6GOrEIdZ0rGgKogkQj31Eqp2pFJXEeAiEA7jNBnGD77Aq3zeySjeXgSYt6lcnuqR122deJ0S32yP0="}]},"_npmUser":{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"},"directories":{},"maintainers":[{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/numbers_1.0.0_1609196355098_0.3503055245069471"},"_hasShrinkwrap":false},"1.0.1":{"name":"@danilosampaio/numbers","description":"A lib for math calculations.","version":"1.0.1","author":{"name":"Danilo Sampaio","email":"danilo.sampaio@gmail.com","url":"https://github.com/danilosampaio"},"repository":{"url":"git+ssh://git@github.com/danilosampaio/numbers.git","type":"git"},"main":"index.js","keywords":["math","binomial coefficient","factorial","great common divisor","least common multiple","triangular number"],"scripts":{"test":"jest","lint":"eslint index.js lib/*"},"devDependencies":{"eslint":"^7.16.0","jest":"^26.6.3"},"license":"MIT","gitHead":"97fd4375c87aa9fc46dfe6a84629416e4b02b991","bugs":{"url":"https://github.com/danilosampaio/numbers/issues"},"homepage":"https://github.com/danilosampaio/numbers#readme","_id":"@danilosampaio/numbers@1.0.1","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"integrity":"sha512-qIi3S9Fq7qqmUaEe/BCgKEnZAJpQ67yNxJeSi0PLuHz/Xe/XikcOf9MK26P2YRclpDkbjOkKk3aS5IRGs+eYhw==","shasum":"642d4b1ba718f8cc482a06f4fc55a29f1b00d3c3","tarball":"https://registry.npmjs.org/@danilosampaio/numbers/-/numbers-1.0.1.tgz","fileCount":12,"unpackedSize":6448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6mRICRA9TVsSAnZWagAAv+EP/3I/BK7aGxmNqgCgtUYK\nY7jh2cx09vB3ttOsMMLZ29Yiiqu0kRYzeBOnGAIRFNxf7eVsz7OPxKGfS0HK\nWBQbw8nFse3bzpTQ67Uefkk8nX9MawHjVaTKe6itoYdhyll8MxfFoBQNCY3m\njdUR7DBQ4Qu3fIPTSCKpMbJANsu7KghmGw/WRR/A1g1HZFCR/D3O2xP7acrL\njBfLk2YlxhD2nIBgQBKXVeX1/eUkP5xPWYAI6NZE9w/ZMtwdBIbxFjEYFkwE\n03byvINJLTZCfHkygpsg8y4+AmJQJrayVP7ahCbgNwFpnonb+/9U9luNZeHj\ngpRGLAVQsl0o5z5WhNkxbkT6rdwBx7RuoFfU5A6cFdKSvv47DkXKTcNUtQ6+\n4fyvU2V0ENGU6u+qSsITegp3OejdA6fLrf15S3PtSFQe+8ChIXJDOt1aDeIs\nu1ov4t8LIP6WWwDp/R0BvN9TgkBwqvIZ/KpMUbExys20ra4gGk6AVcjCbClz\n7KU7NBa/wuLufEvlkUxvJAzYiU42ktUBMPQZeEjAS3U8PmPP4f+4OLqd7GXw\noOad4ClsfjCIXCkj2kR06oYaL4b7BLLJvPVvaQrkiPWjraRLlgJA/F5tQ98p\nZrF127h3cELl3IQy0Kk5x/WIhOOcSPY20l2+6HiJvRDMzEcqMYB7MXd6WRe7\nKZaN\r\n=Tl7j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxRk7FghWYtp5Xu1190wpBv+e8AZLviocoDVwLFshVeAiEA5mFGhUxUzkfDLzRUbh4lgw2n+NWP64qAWZTUk5zBLNA="}]},"_npmUser":{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"},"directories":{},"maintainers":[{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/numbers_1.0.1_1609196615658_0.5627474689694731"},"_hasShrinkwrap":false},"1.0.2":{"name":"@danilosampaio/numbers","description":"A lib for math calculations.","version":"1.0.2","author":{"name":"Danilo Sampaio","email":"danilo.sampaio@gmail.com","url":"https://github.com/danilosampaio"},"repository":{"url":"git+ssh://git@github.com/danilosampaio/numbers.git","type":"git"},"main":"index.js","keywords":["math","binomial coefficient","congruences","diophantine equations","factorial","great common divisor","least common multiple","primes","triangular number"],"scripts":{"test":"jest","lint":"eslint index.js lib/*"},"devDependencies":{"eslint":"^7.16.0","jest":"^26.6.3"},"license":"MIT","gitHead":"bd5008d8686436aa6dc2cabef16dc409ea259d22","bugs":{"url":"https://github.com/danilosampaio/numbers/issues"},"homepage":"https://github.com/danilosampaio/numbers#readme","_id":"@danilosampaio/numbers@1.0.2","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"integrity":"sha512-c68K3lH4DJAEvCIhCHX6QsYQZxYa98pdYwaF7jQyQB/fwUcT6OJ24ntEYY7uAlXrI+BqhUVb6RwCzAc9AMVwEA==","shasum":"4d9b4aeda60575e847eeb46f5ee88eee15ed48bc","tarball":"https://registry.npmjs.org/@danilosampaio/numbers/-/numbers-1.0.2.tgz","fileCount":12,"unpackedSize":6516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6yPYCRA9TVsSAnZWagAAWRUP/Ro+/XD8nFy0UV95PTC4\nSox8949qehd4QpfUzDeIVyz9bc2AgEp644IUVDlMNTCgQhSldbIDjkT7t+iz\nCxQTgfYw8zFh1HSAESJAF4tbgFK3LroNz8dfb8gQ5km405B6bbomRApDxHXb\nEyygPJz0p54WtpnYgM9fvQ+pjlOmXgq5npS1G15GmRa2aBZisJc5O/GCDXbZ\ncqMtINqQcC9zfaRJGs7dais5itySlgJ55wI/m2DikOcF3yOmIb0xlnPX71if\n7/PrP92ogIeoaBZ6780Tri2x3Iy2FCT7FVbS+wlAXzsFbhiKe5falCsK4lz3\n+hwfbh45N45TzulCYuSIDu7YZOFWF/Y6/4IqcFPWNGsx3b5oOyjM+cWYA70K\niWRSNK74u2HPeTy1Ci5fWKmWs1BPNZAneWyzBJBr0QnWBEikE+GAdKhmsDJ9\nzLgszNnyyYu0sg8hFXUafMSGxLK5TshYI8sZ0423+acFpPDoI76Q9ZcR6lzR\naiZhFS+B2N1jGXyT7EuxzemEkHQCRncar2RLzBHN1LQxFWZ/92MRlFWvgqxE\nCcCBIg102KsgDhIYHAvYTh534Dng6yEQbMyeIkLRTrYID0cCIvvXDzArpIuj\nNYyN9FPudyb/UWiIAIUbEbMDD90JW+TWWzmTqNK1MbOdS8KpolL24lINRRqw\nTIAL\r\n=hsQ/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGLbIs/pzBV1I1urx+XOvE/AbQI/sIr+JVK+R84t117IAiBXpr3ELynkOjfVwfdZ+qaY8ofTFIuKW07gTPg1gJbZUg=="}]},"_npmUser":{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"},"directories":{},"maintainers":[{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/numbers_1.0.2_1609245655938_0.8848483959077578"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-28T22:59:15.041Z","1.0.0":"2020-12-28T22:59:15.249Z","modified":"2022-04-05T02:41:46.834Z","1.0.1":"2020-12-28T23:03:35.781Z","1.0.2":"2020-12-29T12:40:56.083Z"},"maintainers":[{"name":"danilosampaio","email":"danilo.sampaio@gmail.com"}],"description":"A lib for math calculations.","homepage":"https://github.com/danilosampaio/numbers#readme","keywords":["math","binomial coefficient","congruences","diophantine equations","factorial","great common divisor","least common multiple","primes","triangular number"],"repository":{"url":"git+ssh://git@github.com/danilosampaio/numbers.git","type":"git"},"author":{"name":"Danilo Sampaio","email":"danilo.sampaio@gmail.com","url":"https://github.com/danilosampaio"},"bugs":{"url":"https://github.com/danilosampaio/numbers/issues"},"license":"MIT","readme":"# Numbers\n> A library for math calculations. \n\n## Summary\n- Binomial Coefficient\n- Congruences\n- Diophantine Equations\n- Factorial\n- Great common divisor\n- Least common multiple\n- Primes\n- Triangular numbers\n\n\n## Install\n```sh\nnpm install @danilosampaio/numbers\n```\n\n## Binomial coefficient\n> [Binomial coefficient](https://en.wikipedia.org/wiki/Binomial_coefficient)\n\n### Usage\n```js\nconst { binomialCoefficient } = require('@danilosampaio/numbers');\n\n// a = 4, b = 2\nbinomialCoefficient(4, 2);\n// => 6\n\n```\n\n## Congruences\n> [Congruences](https://en.wikibooks.org/wiki/Number_Theory/Congruences)\n\n### Usage\n```js\nconst { congruences } = require('@danilosampaio/numbers');\n\n// 3 ≡ 24 (mod 7)\ncongruences(3, 24, 7);\n// => true\n\n```\n\n## Diophantine Equations\n> [Diophantine Equations](https://en.wikipedia.org/wiki/Diophantine_equation)\n\n### Usage\n```js\nconst { diophantineEquation } = require('@danilosampaio/numbers');\n\n// 3x + 6y = 18\ndiophantineEquation.hasSolution(3, 6, 18);\n// => true\n\n// The nth solution for 172x + 20b = 1000 | x0 = 500, y0 = -4250, t = 1\ndiophantineEquation.nthSolution(172, 20, 1000, 500, -4250, 1);\n// => [505, -4293]\n\n```\n\n\n## Factorial\n> [Factorial](https://en.wikipedia.org/wiki/Factorial)\n\n### Usage\n```js\nconst { factorial } = require('@danilosampaio/numbers');\n\n// 5!\nfactorial(5);\n// => 120\n\n```\n\n\n## Great common divisor\n> [Greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor)\n\n### Usage\n```js\nconst { greatCommonDivisor } = require('@danilosampaio/numbers');\n\n// a = 12378, b = 3054\ngreatCommonDivisor(12378, 3054);\n// => 6\n\n```\n\n\n## Least common multiple\n> [Least common multiple](https://en.wikipedia.org/wiki/Least_common_multiple)\n\n### Usage\n```js\nconst { leastCommonMultiple } = require('@danilosampaio/numbers');\n\n// a = 4, b = 6\nleastCommonMultiple(4, 6);\n// => 12\n\n```\n\n\n## Primes\n> [Primes](https://en.wikipedia.org/wiki/Prime_number)\n\n### Usage\n```js\nconst { primes } = require('@danilosampaio/numbers');\n\n// p = 5\nprimes.isPrime(5);\n// => true\n\n```\n\n\n\n## Triangular numbers\n> [Triangular number](https://en.wikipedia.org/wiki/Triangular_number)\n\n### Usage\n```js\nconst { triangularNumber } = require('@danilosampaio/numbers');\n\n// n = 6\ntriangularNumber.isTriangularNumber(6);\n// => true\n\n// The sixth triangular number\ntriangularNumber.nth(6);\n// => 21\n\n```\n\n\n## License\nMIT","readmeFilename":"readme.md"}