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
Contents
Definition
Stated mathematically, let
If there exists an integer
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
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
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.
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, obviously, it 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 hexadecimal the number 11 may be represented as "B", the sum of whose digits is also B and clearly B is divisible by B, thus it is harshad in base 16.
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.
Smallest
Smallest
Other bases
The harshad numbers in base 12 are:
1, 2, 3, 4, 5, 6, 7, 8, 9, ᘔ, Ɛ, 10, 1ᘔ, 20, 29, 30, 38, 40, 47, 50, 56, 60, 65, 70, 74, 80, 83, 90, 92, ᘔ0, ᘔ1, Ɛ0, 100, 10ᘔ, 110, 115, 119, 120, 122, 128, 130, 134, 137, 146, 150, 153, 155, 164, 172, 173, 182, 191, 1ᘔ0, 1Ɛ0, 1Ɛᘔ, 200, ...Smallest
Smallest
Maximal runs of consecutive harshad numbers
Cooper and Kennedy proved in 1993 that no 21 consecutive integers are all harshad numbers in base 10. They also constructed infinitely many 20-tuples of consecutive integers that are all 10-harshad numbers, the smallest of which exceeds 1044363342786.
H. G. Grundman (1994) extended the Cooper and Kennedy result to show that there are 2b but not 2b + 1 consecutive b-harshad numbers. This result was strengthened to show that there are infinitely many runs of 2b consecutive b-harshad numbers for b = 2 or 3 by T. Cai (1996) and for arbitrary b by Brad Wilson in 1997.
In binary, there are thus infinitely many runs of four consecutive harshad numbers and in ternary infinitely many runs of six.
In general, such maximal sequences run from N·bk − b to N·bk + (b − 1), where b is the base, k is a relatively large power, and N is a constant. Given one such suitably chosen sequence, we can convert it to a larger one as follows:
Thus our initial sequence yields an infinite set of solutions.
First runs of exactly n {\displaystyle n} consecutive 10-harshad numbers
The smallest naturals starting runs of exactly
By the previous section, no such
Estimating the density of harshad numbers
If we let
as shown by Jean-Marie De Koninck and Nicolas Doyon; furthermore, De Koninck, Doyon and Kátai proved that
where
Nivenmorphic numbers
A Nivenmorphic number or harshadmorphic number for a given number base is an integer
For example, 18 is a Nivenmorphic number for base 10:
16218 is a harshad number 16218 has 18 as digit sum 18 terminates 16218Sandro Boscaro determined that for base 10 all positive integers are Nivenmorphic numbers except 11.
Multiple harshad numbers
Bloem (2005) defines a multiple harshad number as a harshad number that, when divided by the sum of its digits, produces another harshad number. He states that 6804 is "MHN-3" on the grounds that
and went on to show that 2016502858579884466176 is MHN-12. The number 10080000000000 = 1008·1010, which is smaller, is also MHN-12. In general, 1008·10n is MHN-(n+2).