RNGdle

GuideHarshad

Harshad Numbers

A Harshad number (also called a Niven number) is a positive integer divisible by the sum of its decimal digits. Example: 18, because 1+8 = 9 and 18 ÷ 9 = 2.

95,428 values in 0–1,000,000

Formula

digitSum(n) > 0 and n ≡ 0 (mod digitSum(n)).

How to check

Sum the digits of n. If that sum is positive and divides n with no remainder, n is Harshad.

Example

198

198 → 1+9+8 = 18, and 198 ÷ 18 = 11, so 198 is Harshad. 197 → 1+9+7 = 17, and 197 is not divisible by 17.

Look up EP for this number in the calculator.

In RNGdle

Harshad numbers are common enough to show up often, but still a clean pattern signal. RNGdle awards the Harshad Number badge when the digit-sum rule holds.

  • Harshad Number — Divisible by the sum of its own digits. (+1,048 EP)

Examples across the range

95,428 total · 36 samples spaced from low to high.

FAQ

What are Harshad numbers?
Harshad numbers are integers divisible by the sum of their own digits. They are also known as Niven numbers.
Is 0 a Harshad number?
Under RNGdle’s rule the digit sum must be > 0, so 0 is not treated as Harshad.
Does RNGdle score Harshad numbers?
Yes. Rolls divisible by their digit sum earn the Harshad Number badge.