Dozenal Wiki
Advertisement

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.

Examples[]

The number 134 is Harshad number since 134 is divisible by 1+3+4 = 8 (134/8 = 1E, which is integer).

The number 140 is not Harshad number since 140 is not divisible by 1+4+0 = 5 (140/5 = 32.497249724972..., which is not integer) (it can be noted that 140 is the smallest multiple of 10 that is not Harshad number)

The Harshad numbers up to 1000[]

1, 2, 3, 4, 5, 6, 7, 8, 9, X, E, 10, 1X, 20, 29, 30, 38, 40, 47, 50, 56, 60, 65, 70, 74, 80, 83, 90, 92, X0, X1, E0, 100, 10X, 110, 115, 119, 120, 122, 128, 130, 134, 137, 146, 150, 153, 155, 164, 172, 173, 182, 191, 1X0, 1E0, 1EX, 200, 209, 20E, 210, 216, 218, 220, 223, 227, 22X, 236, 240, 244, 245, 249, 254, 260, 263, 268, 272, 281, 287, 290, 2X0, 2X6, 2XX, 300, 308, 30X, 310, 311, 314, 316, 317, 326, 330, 331, 335, 338, 344, 353, 360, 362, 366, 371, 380, 390, 394, 39X, 3E8, 3EE, 400, 407, 409, 416, 420, 423, 425, 434, 440, 443, 446, 452, 45X, 461, 470, 480, 483, 488, 48X, 4X8, 4E6, 500, 506, 508, 510, 515, 524, 533, 539, 542, 550, 551, 554, 560, 570, 576, 57X, 598, 5X0, 5XX, 5E3, 5E6, 600, 605, 607, 614, 620, 622, 623, 628, 630, 632, 641, 650, 660, 662, 669, 66X, 674, 688, 6X6, 700, 704, 706, 713, 722, 731, 740, 748, 750, 754, 75X, 770, 778, 794, 796, 799, 7E4, 800, 803, 805, 812, 816, 821, 830, 840, 846, 84X, 868, 880, 886, 8X1, 8X4, 8E4, 900, 902, 904, 911, 920, 926, 930, 933, 938, 93X, 958, 976, 988, 990, 993, 994, 9E2, X00, X01, X03, X10, X20, X2X, X36, X48, X50, X61, X66, X84, X85, XX0, XX2, XX8, E00, E02, E10, E14, E16, E1X, E38, E46, E56, E74, E77, E92, EE0, 1000

Properties[]

Smallest k such that k×n is Harshad number are

+1 +2 +3 +4 +5 +6 +7 +8 +9 +X +E +10
0+ 1 1 1 1 1 1 1 1 1 1 1 1
10+ 10 6 4 3 X 2 E 3 4 1 7 1
20+ 10 6 4 3 E 2 E 3 1 5 9 1
30+ 10 E 4 3 E 2 E 1 4 4 E 1
40+ 14 6 4 3 E 2 1 3 E E E 1
50+ 10 E 5 7 9 1 7 3 3 9 E 1
60+ 1X 6 4 E 1 2 E 9 X E E 1
70+ 2 E 18 1 5 2 8 2 E E 9 1
80+ 1X 8 1 3 1X 2 19 3 3 E E 1
90+ 1X 1 4 3 1X E 2 E 4 E 4 1
X0+ 1 6 1X E 9 4 12 7 1X 6 E 1
E0+ 8 6 4 3 1X 2 1X 6 14 E 2 1
100+ 10 E 10 3 10 2 1X 7 2 1 10 1
110+ 10 E E 7 1 5 E E 1 E E 1
120+ 6 1 5 E E X 8 1 X 5 E 1
130+ 1X 4 4 1 E X 1 X 5 E E 3
140+ 10 E 3 4 E 1 9 3 3 E E 1
150+ 1X E 1 3 1 3 E E E E E 2
160+ X E 8 1 2 2 E 2 2 E E 7
170+ 56 1 1 9 1X 2 8 9 8 2 E 3
180+ 1X 1 8 3 10 E 6 X 8 6 E 2
190+ 1 7 2 E 1X E 12 3 8 E E 1
1X0+ 10 4 4 3 1X 2 1X 2 4 E 2 1
1E0+ 1X E X 3 18 8 1X E 3 1 17 1

Smallest k such that k×n is not Harshad number are

+1 +2 +3 +4 +5 +6 +7 +8 +9 +X +E +10
0+ 11 7 5 4 3 3 2 2 2 2 11 14
10+ 1 1 1 1 1 1 1 1 1 111 1 8
20+ 1 1 1 1 1 1 1 1 11 1 1 6
30+ 1 1 1 1 1 1 1 111 1 1 1 4
40+ 1 1 1 1 1 1 5 1 1 1 1 4
50+ 1 1 1 1 1 1111 1 1 1 1 1 3
60+ 1 1 1 1 7 1 1 1 1 1 1 3
70+ 1 1 1 82 1 1 1 1 1 1 1 2
80+ 1 1 7 1 1 1 1 1 1 1 1 2
90+ 1 3E 1 1 1 1 1 1 1 1 1 2
X0+ 7 1 1 1 1 1 1 1 1 1 1 11111
E0+ 1 1 1 1 1 1 1 1 1 1 1 14
100+ 1 1 1 1 1 1 1 1 1 37 1 13
110+ 1 1 1 1 3 1 1 1 5 1 1 7
120+ 1 6 1 1 1 1 1 41 1 1 1 6
130+ 1 1 1 3 1 1 3 1 1 1 1 1
140+ 1 1 1 1 1 511 1 1 1 1 1 3
150+ 1 1 3 1 7 1 1 1 1 1 1 1
160+ 1 1 1 3E 1 1 1 1 1 1 1 1
170+ 1 2 3 1 1 1 1 1 1 1 1 1
180+ 1 2E 1 1 1 1 1 1 1 1 1 1
190+ 5 1 1 1 1 1 1 1 1 1 1 11111
1X0+ 1 1 1 1 1 1 1 1 1 1 1 2
1E0+ 1 1 1 1 1 1 1 1 1 101 1 8

Given the divisibility test for E, one might be tempted to generalize that all numbers divisible by E 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, EE is not a harshad number, since E + E = 1X, and EE is not divisible by 1X.

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, 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.

The natural density of the harshad numbers is about 0.0925 or 9.25% (there are 92481 harshad numbers ≤ 106).

Although the sequence of factorials starts with Harshad numbers, not all factorials are Harshad numbers, after 7! (=2E00, whose digit sum is 11), the next counterexample is 8X4! (whose digit sum is 8275 = E*8E7, thus not divide 8X4!).

There are no 21 consecutive integers that are all Harshad numbers, but there are infinitely many 20-tuples of consecutive integers that are all Harshad numbers, this is proved by Cooper and Kennedy in 11X1. H. G. Grundman 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 and for arbitrary b by Brad Wilson in 11X5.

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 10 is a harshad number in all bases except octal (base 8), however, we can note that 10 is the least common multiple of the only four all-harshad numbers).

Nivenmorphic number[]

Nivenmorphic number or harshadmorphic number for a given number base is an integer t such that there exists some harshad number N whose digit sum is t, and t, written in that base, terminates N written in the same base.

For example, 16 is a Nivenmorphic number for base 10:

  7416 is a harshad number
  7416 has 16 as digit sum
    16 terminates 7416

Sandro Boscaro determined that for base 10 all positive integers are Nivenmorphic numbers except 11.

Super harshad numbers[]

A super harshad number (or super Niven number) is a number divisible by the sums of all the nonempty subsets of their nonzero digits, the first few in dozenal are:

1, 2, 3, 4, 5, 6, 7, 8, 9, X, E, 10, 20, 30, 40, 50, 60, 70, 80, 90, X0, E0, 100, 110, 120, 130, 200, 210, 220, 240, 260, 290, 300, 310, 330, 360, 380, 390, 400, 420, 440, 480, 500, 550, 5X0, 600, 620, 630, 660, 700, 770, 800, 840, 880, 900, 930, 990, X00, X50, XX0, E00, EE0, 1000, ...

Not all super harshad numbers ≥10 end with 0, the first few counterexamples are

10004, 20008, 1000006, 100000004, 200000008, 1000000000004, 1000000000006, ... (these 7 numbers seem to be the only counterexamples ≤1010+10)

However, all super harshad numbers ≥10 contain at least one digit 0.

A primitive super harshad number (or primitive super Niven number) is a super harshad number n such that, either n does not end with 0 (i.e. n is not divisible by 10), or n/10 is not super harshad number, the first few primitive super harshad numbers are:

1, 2, 3, 4, 5, 6, 7, 8, 9, X, E, 110, 120, 130, 210, 220, 240, 260, 290, 310, 330, 360, 380, 390, 420, 440, 480, 550, 5X0, 620, 630, 660, 770, 840, 880, 930, 990, X50, XX0, EE0, 1010, 1020, 1030, 1110, 1120, 1140, 1190, 1210, 1220, 1800, 2010, 2020, 2040, 2060, 2090, 2110, 2220, 2230, 2240, 2280, 2310, 2360, 2420, 2440, 3010, 3030, 3060, 3080, 3090, 3110, 3310, 3320, 3330, 3360, 3630, 3660, 4020, 4040, 4080, 4090, 4220, 4340, 4440, 4460, 4480, 4620, 4840, 4880, 5050, 50X0, 5550, 55X0, 5X50, 5XX0, 6020, 6030, 6060, 6220, 6330, 6620, 6640, 6660, 6690, 6930, 7070, 7770, 8040, 8080, 8100, 8300, 8440, 8680, 8880, 9030, 9090, 9200, 9330, 9930, 9960, 9990, X050, X0X0, X550, XXX0, E0E0, EEE0, ...

Zuckerman numbers[]

A Zuckerman number (or multiplication-harshad number or multiplication-Niven number) in a given number base, is an integer that is divisible by the product of its digits when written in that base, Zuckerman numbers are hence Nude numbers (number divisible by all of its digits), a Zuckerman numbers cannot contain the zero digit (0), since no nonzero numbers are divisible by 0.

Zuckerman number is a generalization of Harshad number, "Zuckerman number" to "product" is "Harshad number" to "sum".

The Zuckerman numbers are:

1, 2, 3, 4, 5, 6, 7, 8, 9, X, E, 11, 12, 13, 14, 16, 28, 111, 112, 113, 114, 116, 128, 139, 151, 156, 173, 214, 228, 316, 353, 414, 454, 513, 571, 712, 8X8, E56, 1111, 1112, 1113, 1114, 1116, 1128, 1139, 1153, 1174, 11X8, 1214, 1228, 1254, 1316, 1414, 1528, 1713, 1754, 1X28, 1E28, 2114, 2214, 2228, 2714, 3116, 3176, 3739, 4114, 4154, 5114, 5156, 5228, 5316, 5513, 5576, 7139, 8114, 8514, 9116, X114, X228, E128, E254, ...

Sum-product numbers is a subset of both Harshad numbers and Zuckerman numbers, a number n is sum-product number iff n = (sum of digits of n) * (product of digits of n), there are only 5 such numbers: 0, 1, 128, 173, 353

Fiven numbers[]

A Fiven number (or harshad number in factorial base or Niven number in factorial base) is a number which is divisible by the sum of their factorial base digits, the first few Fiven numbers are: (written in dozenal)

1, 2, 4, 6, 8, 9, 10, 14, 16, 18, 20, 22, 23, 26, 2E, 30, 34, 40, 44, 46, 48, 50, 5X, 60, 63, 68, 76, 77, 80, 89, 90, 94, 99, X0, X2, X3, X6, E0, E3, E8, 100, 104, 106, 108, 110, 115, 120, 127, 130, 136, 140, 150, 154, 156, 166, 168, 180, 184, 185, 186, 188, 18X, 190, 1X0, 1E4, 1E6, 200, 202, 210, 211, 214, 223, 226, 240, 248, 260, 26E, 276, 280, 281, 286, 290, 294, 299, 2X6, 2E0, 2E3, 2EX, 300, 302, 308, 309, 316, 323, 330, 332, 340, 34X, 350, 354, 366, 367, 380, 388, 39X, 3E6, 3E8, 400, 404, 416, 41X, 420, 426, 440, 446, 448, 454, 480, 488, 48X, 495, 4X8, 4E7, 500, 502, 503, 506, 510, 513, 518, 520, 524, 526, 528, 530, 540, 547, 550, 554, 556, 560, 570, 571, 574, 583, 586, 5X0, 5X4, 5X5, 5X6, 5X8, 5XX, 5E0, 5E9, 600, 60E, 616, 620, 622, 630, 634, 639, 646, 650, 653, 65E, 660, 662, 668, 669, 676, 679, 680, 696, 698, 6X0, 6X1, 6X6, 6XX, 6E0, 6E4, 706, 707, 71X, 720, 728, 74E, 752, 75E, 760, 765, 770, 774, 786, 7X0, 7X6, 7X8, 816, 820, 824, 840, 844, 846, 853, 860, 861, 868, 869, 874, 876, 883, 890, 8X0, 8X6, 8X8, 900, 920, 928, 938, 93X, 940, 958, 960, 970, 976, 99X, 9E0, 9E2, X00, X04, X05, X06, X08, X0X, X10, X20, X36, X38, X40, X42, X4X, X50, X54, X66, X67, X80, X88, XX0, XE3, XE6, E00, E01, E05, E06, E10, E14, E26, E3X, E40, E46, E48, E72, E74, E80, E90, E92, E94, E99, EX4, EX6, EE3, EEE, 1000, ...

Written in factorial base, they are:

1, 10, 20, 100, 110, 111, 200, 220, 300, 310, 1000, 1010, 1011, 1100, 1121, 1200, 1220, 2000, 2020, 2100, 2110, 2200, 2320, 3000, 3011, 3110, 3300, 3301, 4000, 4111, 4200, 4220, 4311, 10000, 10010, 10011, 10100, 10200, 10211, 10310, 11000, 11020, 11100, 11110, 11200, 11221, 12000, 12101, 12200, 12300, 13000, 13200, 13220, 13300, 14100, 14110, 20000, 20020, 20021, 20100, 20110, 20120, 20200, 21000, 21220, 21300, 22000, 22010, 22200, 22201, 22220, 23011, 23100, 24000, 24110, 30000, 30121, 30300, 31000, 31001, 31100, 31200, 31220, 31311, 32100, 32200, 32211, 32320, 33000, 33010, 33110, 33111, 33300, 34011, 34200, 34210, 40000, 40120, 40200, 40220, 41100, 41101, 42000, 42110, 42320, 43300, 43310, 44000, 44020, 44300, 44320, 50000, 50100, 51000, 51100, 51110, 51220, 53000, 53110, 53120, 53221, 54110, 54301, 100000, 100010, 100011, 100100, 100200, 100211, 100310, 101000, 101020, 101100, 101110, 101200, 102000, 102101, 102200, 102220, 102300, 103000, 103200, 103201, 103220, 104011, 104100, 110000, 110020, 110021, 110100, 110110, 110120, 110200, 110311, 111000, 111121, 111300, 112000, 112010, 112200, 112220, 112311, 113100, 113200, 113211, 113321, 114000, 114010, 114110, 114111, 114300, 114311, 120000, 120300, 120310, 121000, 121001, 121100, 121120, 121200, 121220, 122100, 122101, 122320, 123000, 123110, 124121, 124210, 124321, 130000, 130021, 130200, 130220, 131100, 132000, 132100, 132110, 133300, 134000, 134020, 140000, 140020, 140100, 140211, 141000, 141001, 141110, 141111, 141220, 141300, 142011, 142200, 143000, 143100, 143110, 144000, 150000, 150110, 150310, 150320, 151000, 151310, 152000, 152200, 152300, 153320, 154200, 154210, 200000, 200020, 200021, 200100, 200110, 200120, 200200, 201000, 201300, 201310, 202000, 202010, 202120, 202200, 202220, 203100, 203101, 204000, 204110, 210000, 210211, 210300, 211000, 211001, 211021, 211100, 211200, 211220, 212100, 212320, 213000, 213100, 213110, 214210, 214220, 220000, 220200, 220210, 220220, 220311, 221020, 221100, 221211, 221321, 222000, ...

There are 187 Niven numbers (in dozenal) ≤1000, while there are 1X9 Fiven numbers ≤1000, the density of Fiven numbers seems to be a few more than the density of Niven numbers (in dozenal).

Mod n[]

Pictorial representation of remainders (mod 1, 2, 3, ...,10) frequency for such numbers ≤ 106:

modulo
1 92481
2 6E424 23059
3 58075 17868 1X760
4 46859 1153E 24787 1171X
5 27990 17884 176EX 17725 17806
6 3EEX7 3X01 17592 1808X 13X67 318X
7 1X9E3 1272E 12730 1270E 126XX 126X4 1274X
8 27770 6X5X 12614 695E 1E0X9 66X1 12173 697E
9 234X3 6783 7857 1829E 6720 7825 184E3 6585 72X0
X 1EE81 49X5 12994 4950 12X17 7X0E 12X9E 4926 12995 49XE
E 48056 58E0 62E3 4447 5688 5942 5024 5724 5536 5332 53E7
10 27514 2368 8397 X734 1014X 1839 14693 1655 E1E7 9556 3919 1551
remainder 0 1 2 3 4 5 6 7 8 9 X E

A list for how many such numbers ≤ 106 are multiples of the numbers from 1 to 100.

+1 +2 +3 +4 +5 +6 +7 +8 +9 +X +E +10
0+ 92481 6E424 58075 46859 27990 3EEX7 1X9E3 27770 234X3 1EE81 48056 27514
10+ 10498 15359 1717E 15E94 9713 17676 8686 13X4X 11840 35289 704E 16632
20+ 8288 X203 XX77 E857 6187 12008 5E9E X26X 30X12 7694 7584 11352
30+ 4X65 6767 713X 9351 3E24 9X81 3619 21045 777E 50X1 2975 X3X2
40+ 35X7 5X26 5199 64E8 21E0 7594 E742 65E9 458X 40X6 1X59 9120
50+ 1998 3XE4 52E5 5147 3201 1XE9X 17X9 4692 3857 52E4 167E 7998
60+ 1626 3204 459E 4014 8008 5320 1463 5116 3760 2730 1368 6636
70+ 2606 2478 31E0 1051E 12E6 5612 23X1 3155 3021 1E80 22X0 5655
80+ 1177 268X 10528 3898 1103 3927 1100 3735 4034 1722 1032 4EEE
90+ 1013 84E5 2545 3698 E96 3328 1X18 2609 2964 14X8 195E 5262
X0+ 5111 1458 2051 249E 17X6 3991 X61 2689 1X34 2726 X01 11110
E0+ 1718 1305 2X86 2681 970 26X8 989 3494 16X2 1213 4306 462E