UNPKG

iskaprekar

Version:
20 lines (11 loc) 501 B
# iskaprekar In mathematics, a Kaprekar number for a given base is a non-negative integer, the representation of whose square in that base can be split into two parts that add up to the original number again. For instance, 45 is a Kaprekar number, because 45^2 = 2025 and 20 + 25 = 45. ## Usage ```javascript var isKaprekar = require('iskaprekar'); isKaprekar(4950); // -> true ``` ## License This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details