Hahn Number Research Information
Earl M. Rodd
erodd@alumni.rice.edu
earl.rodd.us

Background

The name Hahn number is attributed to a suggestion by Dr. David Hahn of the Malone University Mathematics Department when he noted that his licence plate number, 5120, is unusual in that the digits, 5, 1, 2 and 0 are also the digits which come from the factors (5, and 2 to the 10th) and the powers they are raised to. Thus the factors and powers are:

5
210

which includes the digits 5, 2, 1, and 0, the same as 5120

The question was raised "how many such numbers are there?"

A query was made to investigate if such numbers had been the subject of research. It was discovered that the sequence is known as described at: http://www2.research.att.com/~njas/sequences/A025283
However, this entry lists only a small number of such numbers and does not assign them a name.

Earl Rodd of the Malone University Computer Science Department developed programs to find such numbers with reasonable efficiency. For lack of any other name, for now we call them "Hahn Numbers."

The Java code used and the raw data files listing Hahn numbers and their factors are available from Earl Rodd at erodd@alumni.rice.edu.

Data below cover some simple analysis of the numbers up to 1 trillion. All numbers up to 7 trillion have been found and similar (and further) analysis performed.

Summary Data of Known Hahn Numbers to 1 trillion

Information on Hahn numbers from 1 to 1000000000000 Total Hahn numbers from 1 to 1000000000000 is: 878192 (Largest = 999999961375 )
Number which are product of 2 primes: 623973 Of those both primes > 9 363652
Number which have a factor squared or higher: 205789
Largest prime seen as factor: 99999989741
Largest prime squared or more: 10159
Largest prime cubed or more: 149
Largest prime raised to 4th or more: 23
Largest prime raised to 5th or more: 11
Largest prime raised to 6th or more: 7
Largest prime raised to 7th or more: 5

Click here to see a list of primes which were at least squared in 11 or more Hahn numbers.

Total number of different primes seen: 797201

Click here to see a list of primes which occur in more than 100 Hahn numbers.

Click here to see Primes never seen up to 1000000 (sqrt of 1000000000000 )
Of 78498 primes in range 2 to 1000000 , 50078 were used and 28420 were not.

Click here to see how many Hahn numbers are in each range of one million numbers.

Million range with the most Hahn numbers is 1000001 - 2000000 with 81

Number of million number ranges with this number of Hahn numbers Num Hahn Numbers How many million # ranges have this many ---------------- ---------------------------------------- 0 636759 <5 320110 5<n<10 33888 11<n<25 8775 26<n<50 462 51<n<75> 4 >75 2

Click here to see how many Hahn numbers are in each range of 25 million numbers.

Click here to see how many Hahn numbers are in each range of 100 million numbers.

Click here to see how many Hahn numbers are in each range of 1000 million (billion) numbers.

Distribution of Hahn numbers by 100 billion range. The number in the "Range" column is the 100 billion digit i.e. Range 1 means from 100-200 billion.

Range Hahn-nums %-of-total %-of-range
----- --------- ---------- ----------
  0      145203     16.5%   0.000145%
  1      327703     37.3%   0.000328%
  2      103000     11.7%   0.000103%
  3      122221     13.9%   0.000122%
  4       79833      9.1%   0.000080%
  5       32714      3.7%   0.000033%
  6       24478      2.8%   0.000024%
  7       20617      2.3%   0.000021%
  8       12759      1.5%   0.000013%
  9        9664      1.1%   0.000010%

The most unique factors in any number is 6 for 12843429375
The factors are: 3 5 5 5 5 7 29 41 823 Histogram of number of unique factors:

Number of factors Hahn numbers with this many Unique factors total factors 1 2 0 2 704741 623973 3 121160 51341 4 45108 34844 5 6888 44315 6 293 30297

Occurrance of digits in Hahn numbers.

Digit #with n #with n Times digit Occurs in Unique Factors as first as last occurs(*) factors start with ----- ---------- ---------- ----------- --------- --------- 0 0 7229 758648 754351 0 1 397012 92769 1305206 1326810 39173 2 121735 67585 961687 1373392 63586 3 145213 129510 1281924 1474950 84776 4 95186 34013 895494 845663 57823 5 38753 202264 1043175 1073477 77123 6 29187 57247 885084 857577 123661 7 24484 129764 1180571 1203354 110727 8 15135 35111 853102 846749 113744 9 11487 122700 1197048 1200396 126588 Of Hahn numbers, 201185 are even and 677007 are odd. (*) - total times digit occurs. A single Hahn number might have multiple occurrances and all are counted.

Factors of length n digits. Counts all unique factors in each number, but if factor squared or higher, only counts once.

Length Number of factors ------ ----------------- 1 570427 2 203047 3 140061 4 111685 5 100982 6 97271 7 100649 8 113379 9 144521 10 194204 11 213368

Largest prime which was the smallest factor in a Hahn number:
995381 for number 991935986359

Incidences of small numbers (<300)being the largest factor in a Hahn number

Prime Times-the-largest-factor Largest-number-with 5 2 5120 11 1 121 17 1 12153203712 23 2 62132214375 29 2 271393612992 41 2 39113492625 43 2 21534113792 47 1 4473225 53 3 231239152375 59 4 475381959237 61 2 31721234762 67 11 737921349562 71 12 367935321375 73 5 339251527746 79 9 962171973135 83 9 832141637712 89 20 938475129375 97 15 932911523775 101 10 305797121371 103 15 537392211330 107 10 995540371875 109 17 730713741219 113 4 331314938252 127 6 412972918528 131 5 511374793125 137 1 239177133952 139 13 957133112331 149 11 135222139413 151 7 715793192317 157 6 567547213114 163 6 961172631104 167 16 739316285375 173 8 732231957218 179 6 771846993125 181 12 327168221716 191 6 292137151271 193 17 652137139437 197 7 472938911595 199 14 942357711911 211 7 371979153125 223 2 772145723125 227 5 222315429375 229 5 377252993565 233 3 531730437273 239 5 277923437469 241 6 726448621312 251 5 362512139472 257 7 852493247179 263 10 172625793920 269 12 622863379712 271 6 147917362275 277 3 325774223433 281 15 389229642751 283 11 945372738213 293 9 739272266341

Analysis of Gaps between Hahn Numbers

An analysis was performed on the gaps between Hahn numbers. Instances were found of consecutive numbers being Hahn numbers. The summary of gap information is:

Maximum gap between Hahn numbers: 661169227 for 671998990261 to 672660159488
Minimum gap between Hahn numbers: 1 for 13946687727 to 13946687728
Average gap between Hahn numbers: 1138703.10

Click here to see detailed list of Cases where the gap between Hahn numbers is less than 20.

Hahn Numbers which are Sums of other Hahn Numbers

An analysis was performed to find Hahn numbers which are themselves sums of two other Hahn numbers.

Click here to see a detailed list of all such numbers.

A total of 198321 Hahn numbers were found which are themselves sums of two other Hahn numbers.
The table below shows how many times one of the terms (itself a Hahn number) which add to a Hahn number start with a certain digit and how many times both terms, the sum, and both terms and the sum start with that digit.

The second table shows how many times both or one term and the sum are a certain length.

Starts with Term Both-terms Sum All 1 249742 73083 83494 39386 2 53807 3079 34139 1167 3 44797 2167 38613 1009 4 21445 399 21189 158 5 9579 82 8887 25 6 6827 79 5094 14 7 5670 31 3622 11 8 2443 15 2006 0 9 2332 4 1277 1 Digits Time both One term Sum terms n dig n dig n dig 1 0 0 0 2 0 2 0 3 0 1 0 4 0 12 0 5 0 11 0 6 0 35 0 7 0 286 1 8 2 1012 5 9 9 4795 35 10 288 23915 533 11 5844 104524 9073 12 75804 262049 188674 Min term: 25 Min sum 1286374 Max sum 999961139875

Computational Aspects

Finding Hahn numbers is an interesting computational problem because it requires combining purely mathematical computation (finding factors) with string processing (determining if the factors and powers have the same digits as a number). The initial attempts to find Hahn numbers were programmed in REXX and then in PHP. However, both languages, being interpreted, took so much time that finding a siginificant number of Hahn numbers was not practical.

The Hahn numbers found for this study were found using a Java program. Some optimizations were performed as follows:

Finding the Hahn numbers in the range of 1 to 200 billion required approximately 60 days of compute time on a quad core 2GHz machine.

A version of the Java program was written with instrumentation to measure how much time is spent in factoring versus finding out if the number is a Hahn number. Finding factors is the overwhelming dominant CPU time use of the program. Therefore, further optimizations of comparing digits was not fruitful.

Click here for details of timing experiments

Timing for Different Ranges and Different Machines

Experiements were run to compare the time required to check for Hahn numbers on different ranges of numbers, knowing that factoring large numbers takes longer, and on different machines.

Click here for details of those experiments.

Copyright Earl M. Rodd - 2010, 2013