Harshad number facts for kids
A harshad number (also known as a Niven number) is a special kind of integer (a whole number). What makes it special? A harshad number can be perfectly divided by the sum of its own digits. This idea works differently depending on the number system (or "base") you are using. For example, in our everyday number system (base 10), the number 18 is a harshad number. Why? Because its digits are 1 and 8. If you add them up (1 + 8), you get 9. And 18 can be divided by 9 (18 ÷ 9 = 2). So, 18 is a harshad number!
Contents
Understanding Harshad Numbers
A harshad number is a number that is exactly divisible by the sum of its digits. The word "harshad" comes from Sanskrit, meaning "great joy." These numbers are also sometimes called "Niven numbers" after Ivan Niven, a mathematician who gave a talk about them in 1997.
How to Find a Harshad Number
To check if a number is a harshad number, follow these simple steps:
- Step 1: Add up all the digits of the number.
- Step 2: Divide the original number by the sum you just found.
- Step 3: If the division results in a whole number (with no remainder), then it's a harshad number!
Examples in Base 10
Let's look at some examples using our usual number system (base 10):
- Number 12:
- Digits are 1 and 2.
- Sum of digits: 1 + 2 = 3.
- Is 12 divisible by 3? Yes, 12 ÷ 3 = 4.
- So, 12 is a harshad number.
- Number 21:
- Digits are 2 and 1.
- Sum of digits: 2 + 1 = 3.
- Is 21 divisible by 3? Yes, 21 ÷ 3 = 7.
- So, 21 is a harshad number.
- Number 108:
- Digits are 1, 0, and 8.
- Sum of digits: 1 + 0 + 8 = 9.
- Is 108 divisible by 9? Yes, 108 ÷ 9 = 12.
- So, 108 is a harshad number.
- Number 17:
- Digits are 1 and 7.
- Sum of digits: 1 + 7 = 8.
- Is 17 divisible by 8? No, 17 ÷ 8 is 2 with a remainder of 1.
- So, 17 is NOT a harshad number.
Harshad Numbers in Different Bases
The definition of a harshad number depends on the "base" or number system you are using. Most of the time, when we talk about numbers, we use base 10 (because we have 10 fingers!). But numbers can exist in other bases, like base 2 (binary, used by computers) or base 16 (hexadecimal).
For example, the number 6 in base 10 is written as 110 in base 2.
- In base 10: Sum of digits of 6 is 6. 6 ÷ 6 = 1. So 6 is a harshad number in base 10.
- In base 2: The number 6 is written as 110. Sum of digits (1 + 1 + 0) = 2. Is 6 divisible by 2? Yes, 6 ÷ 2 = 3. So 6 (or 110 in base 2) is a harshad number in base 2.
A number that is a harshad number in base n is called an n-harshad number.
Interesting Facts About Harshad Numbers
- All numbers from 1 to 9 are harshad numbers in any base. This is because the sum of their digits is the number itself, and any number is divisible by itself.
- There are no harshad numbers that are prime numbers (except for the single-digit prime numbers like 2, 3, 5, 7). This is because a prime number (greater than 9) is only divisible by 1 and itself. If it were a harshad number, it would also have to be divisible by the sum of its digits.
- There are infinitely many harshad numbers.