is-harshad
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Harshad Number

A positive integer which is divisible by the sum of its digits, also called a Niven number (Kennedy et al. 1980) or a multidigital number (Kaprekar 1955). read more

Usage

const { isHarshad } = require('is-harshad')

console.log(isHarshad(100)) // true
console.log(isHarshad(104)) // false
console.log(isHarshad(1)) // true
console.log(isHarshad(-1)) // false

Readme

Keywords

Package Sidebar

Install

npm i is-harshad

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

2.68 kB

Total Files

5

Last publish

Collaborators

  • fibii