ArticleslgStudy

mathematics

Harshad number

Harshad number is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Harshad number rather than just read about it. In short: In recreational mathematics, a Harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digits when written in that base. Harshad numbers in base n are also known as n-harshad (or n-Niven) numbers.

Key takeaways

  • Harshad number belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Harshad number to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Harshad number from memory before moving on to harder problems.

Reference excerpt

In recreational mathematics, a Harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digits when written in that base. Harshad numbers in base n are also known as n-harshad (or n-Niven) numbers. Because being a harshad number is determined according to the base the number is expressed in, a number can be a Harshad number many times over. So-called Trans-harshad numerals are sequences of the digits 0-9 which, in every base which uses all their digits, represent a Harshad number in that base. Harshad numbers were defined by D. R. Kaprekar, a mathematician from India. The word "harshad" comes from the Sanskrit harṣa (joy) + da (give), meaning joy-giver. The term "Niven number" arose from a paper delivered by Ivan M. Niven at a conference on number theory in 1977.

Definition Stated mathematically, let X be a positive integer with m digits when written in base n, and let the digits be a i {\displaystyle a_{i}} ( i = 0 , 1 , … , m − 1 {\displaystyle i=0,1,\ldots ,m-1} ). (It follows that a i {\displaystyle a_{i}} must be either zero or a positive integer up to ⁠ n − 1 {\displaystyle n-1} ⁠.) X can be expressed as

X = ∑ i = 0 m − 1 a i n i . {\displaystyle X=\sum _{i=0}^{m-1}a_{i}n^{i}.}

X is a Harshad number in base n if:

X ≡ 0 mod ∑ i = 0 m − 1 a i . {\displaystyle X\equiv 0{\bmod {\sum _{i=0}^{m-1}a_{i}}}.}

A number which is a Harshad number in every number base is called an all-Harshad number, or an all-Niven number. There are only four all-Harshad numbers: 1, 2, 4, and 6. The number 12 is a Harshad number in all bases except octal.

Examples The number 18 is a Harshad number in base 10, because the sum of the digits 1 and 8 is 9, and 18 is divisible by 9. The Hardy–Ramanujan number (1729) is a Harshad number in base 10, since it is divisible by 19, the sum of its digits (1729 = 19 × 91). The number 19 is not a Harshad number in base 10, because the sum of the digits 1 and 9 is 10, and 19 is not divisible by 10. In base 10, every natural number expressible in the form 9Rnan, where the number Rn consists of n copies of the single digit 1, n > 0, and an is a positive integer less than 10n and multiple of n, is a Harshad number. (R. D’Amico, 2019). The number 9R3a3 = 521478, where R3 = 111, n = 3 and a3 = 3×174 = 522, is a Harshad number; in fact, we have: 521478/(5+2+1+4+7+8) = 521478/27 = 19314. Harshad numbers in base 10 form the sequence: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 100, 102, 108, 110, 111, 112, 114, 117, 120, 126, 132, 133, 135, 140, 144, 150, 152, 153, 156, 162, 171, 180, 190, 192, 195, 198, 200, ... (sequence A005349 in the OEIS). All integers between zero and n are n-Harshad numbers.

Properties Given the divisibility test for 9, one might be tempted to generalize that all numbers divisible by 9 are also Harshad numbers. But for the purpose of determining the harshadness of n, the digits of n can only be added up once and n must be divisible by that sum; otherwise, it is not a Harshad number. For example, 99 is not a Harshad number, since 9 + 9 = 18, and 99 is not divisible by 18. The base number (and furthermore, its powers) will always be a Harshad number in its own base, since it will be represented as "10" and 1 + 0 = 1. All numbers whose base b digit sum divides b−1 are Harshad numbers in base b. For a prime number to also be a Harshad number it must be less than or equal to the base number, otherwise the digits of the prime will add up to a number that is more than 1, but less than the prime, and will not be divisible. For example: 11 is not Harshad in base 10 because the sum of its digits “11” is 1 + 1 = 2, and 11 is not divisible by 2; while in base 12 the number 11 may be represented as “B”, the sum of whose digits is also B. Since B is divisible by itself, it is Harshad in base 12. Every number with a single digit in a base will be a Harshad number in said base. This is because the sum of the number's digits will be the number itself, and every number regardless of base or digits is divisible by themselves. Although the sequence of factorials starts with Harshad numbers in base 10, not all factorials are Harshad numbers. 432! is the first that is not. (432! has digit sum 3897 = 32 × 433 in base 10, thus not dividing 432!) The smallest k such that k ⋅ n {\displaystyle k\cdot n} is a Harshad number are

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 9, 3, 2, 3, 6, 1, 6, 1, 1, 5, 9, 1, 2, 6, 1, 3, 9, 1, 12, 6, 4, 3, 2, 1, 3, 3, 3, 1, 10, 1, 12, 3, 1, 5, 9, 1, 8, 1, 2, 3, 18, 1, 2, 2, 2, 9, 9, 1, 12, 6, 1, 3, 3, 2, 3, 3, 3, 1, 18, 1, 7, 3, 2, 2, 4, 2, 9, 1, ... (sequence A144261 in the OEIS). The smallest k such that k ⋅ n {\displaystyle k\cdot n} is not a Harshad number are

11, 7, 5, 4, 3, 11, 2, 2, 11, 13, 1, 8, 1, 1, 1, 1, 1, 161, 1, 8, 5, 1, 1, 4, 1, 1, 7, 1, 1, 13, 1, 1, 1, 1, 1, 83, 1, 1, 1, 4, 1, 4, 1, 1, 11, 1, 1, 2, 1, 5, 1, 1, 1, 537, 1, 1, 1, 1, 1, 83, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 1, 68, 1, 1, 1, 1, 1, 1, 1, 2, ... (sequence A144262 in the OEIS).

Other bases The Harshad numbers in base 12 are:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Harshad number

Start with the simplest possible case. Write down what Harshad number claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Harshad number before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Harshad number ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Harshad number

In research
Harshad number appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Harshad number in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Harshad number is common in secondary-school and first-year university syllabi. It links to neighbouring topics Base-dependent integer sequences, so understanding it makes those chapters shorter.
In everyday life
Look for Harshad number outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Harshad number” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Harshad number in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Harshad number means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Harshad number out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Harshad number in simple terms?

In recreational mathematics, a Harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digits when written in that base. Harshad numbers in base n are also known as n-harshad (or n-Niven) numbers.

Why does Harshad number matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Harshad number?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Harshad number.

Tags

  • Base-dependent integer sequences

Keep exploring