Niven Number Checker

n ÷ digitSum(n) = integer

CalculatorsFreeNo Signup
4.4(569 reviews)
All Tools

Loading tool...

About Niven Number Checker

A Niven (Harshad) number checker testing if n is divisible by its digit sum. Shows quotient, consecutive Niven runs, multiple Niven check, and counts in range. All numbers up to 100 that are Niven. Client-side.

Niven Number Checker Features

  • Niven check
  • Digit sum
  • Quotient
  • Consecutive
  • Range count
Niven (Harshad) number: n divisible by sum of its digits. 18: 1+8=9, 18÷9=2 ✓. 21: 2+1=3, 21÷3=7 ✓. About 1/(d·4.5) of d-digit numbers are Niven. The first 20: 1,2,3,4,5,6,7,8,9,10,12,18,20,21,24,27,30,36,40,42.

How to Use

Enter n:

  • Niven?: Is digitSum(n)|n?
  • Quotient: n/digitSum(n)
  • Consecutive: Niven runs near n

Properties

  • All single digits are Niven
  • Density: ~log₁₀(n)/n × constant
  • Max consecutive: 20 (starting at n=10⁹+2)
  • Every Niven number has a multiple that is also Niven

Multiple Harshad

MHN: n such that n/s(n) is also Harshad, and so on. If this chain has length k, n is a k-Harshad number. Connected to Kaprekar and Moran numbers.

Step-by-Step Instructions

  1. 1Enter number.
  2. 2Check Niven.
  3. 3See digit sum.
  4. 4View quotient.
  5. 5Find nearby.

Niven Number Checker — Frequently Asked Questions

How common are Niven numbers?+

About N·ln(ln(N))/ln(N) Niven numbers below N. They thin out but never disappear. Among 1-digit: all 9. Among 2-digit: 33%. Among 3-digit: ~17%. The density decreases roughly as c/log(n).

What is the longest run of consecutive Niven numbers?+

At most 20 consecutive integers can all be Harshad numbers. The smallest such run of 20 starts at 10^(2·(10^18−1)/9). For practical ranges: runs of 7 are common, runs of 10+ are very rare.

What is a Moran number?+

A Harshad number n where n/s(n) is prime. Examples: 18/9=2 (prime), 21/3=7 (prime). Moran numbers are a subset of Harshad numbers. They provide a way to 'extract' primes from composite numbers.

Share this tool: