zaro

What is a number divisible by the sum of their digits?

Published in Number Theory 2 mins read

A number divisible by the sum of its digits is called a harshad number or Niven number.

What is a Harshad Number?

A harshad number, as defined by D.R. Kaprekar, is an integer that is divisible by the sum of its digits when written in a specific number base. The term "harshad" comes from the Sanskrit word meaning "joy-giver." These numbers are also known as Niven numbers.

Key Features of Harshad Numbers

  • Base Dependent: Harshad numbers are defined relative to a given number base (e.g., base 10, base 2). A number can be a harshad number in one base but not in another.
  • Divisibility: The core property of a harshad number is that it is exactly divisible (with no remainder) by the sum of its digits.

Examples

Let's look at some examples to understand how harshad numbers work, focusing on base 10:

  • Example 1: 18
    • Sum of digits: 1 + 8 = 9
    • 18 is divisible by 9 (18 / 9 = 2). Therefore, 18 is a harshad number in base 10.
  • Example 2: 20
    • Sum of digits: 2 + 0 = 2
    • 20 is divisible by 2 (20 / 2 = 10). Therefore, 20 is a harshad number in base 10.
  • Example 3: 25
    • Sum of digits: 2 + 5 = 7
    • 25 is not divisible by 7. Therefore, 25 is not a harshad number in base 10.

n-Harshad Numbers

When we specify the base, n, of a harshad number, we refer to it as an n-harshad number (or n-Niven number). For instance, numbers discussed above are all 10-harshad numbers since they are in base 10.

Base Terminology Explanation
2 2-harshad A number that is divisible by the sum of its digits when written in binary.
10 10-harshad A number that is divisible by the sum of its digits when written in decimal.
n n-harshad A number that is divisible by the sum of its digits when written in base n.

Applications

While harshad numbers don’t have direct practical applications in everyday life, they are interesting mathematical concepts in number theory. They are often used for educational purposes, exploring number patterns, and for computational exercises.

In conclusion, a harshad number is an integer divisible by the sum of its digits in a given number base. These numbers were introduced by D. R. Kaprekar and are also referred to as Niven numbers.