iskaprekar
Version:
Is the integer a Kaprekar number
20 lines (11 loc) • 501 B
Markdown
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.
```javascript
var isKaprekar = require('iskaprekar');
isKaprekar(4950);
// -> true
```
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details