Monday 26 December 2022

Numbers Within Numbers

As sometimes happens, the number associated with my diurnal age seems to contain nothing much of interest. Today the number was 26930 and I was temporarily stuck. However, I noticed something in Numbers Aplenty. See Figure 1.


Figure 1

The hexadecimal representation of 26930 is 6932. All the digits in the hexadecimal representation are contained within the decimal representation, each in the same proportion. I thought that this would be an interesting criterion to apply to the numbers from 10 to 40000. The numbers from 0 to 9 trivially satisfy the criterion. 

It turns out that there are only 90 decimal numbers that satisfy. This is the list (Permalink):

Hex     Decimal

35 --- 53
173 --- 371
391 --- 913
411 --- 1041
412 --- 1042
413 --- 1043
414 --- 1044
415 --- 1045
416 --- 1046
417 --- 1047
418 --- 1048
419 --- 1049
541 --- 1345
791 --- 1937
821 --- 2081
822 --- 2082
823 --- 2083
824 --- 2084
825 --- 2085
826 --- 2086
827 --- 2087
828 --- 2088
829 --- 2089
1004 --- 4100
1415 --- 5141
1524 --- 5412
1826 --- 6182
2008 --- 8200
2419 --- 9241
3012 --- 12306
4010 --- 16400
4011 --- 16401
4012 --- 16402
4013 --- 16403
4014 --- 16404
4015 --- 16405
4017 --- 16407
4018 --- 16408
4019 --- 16409
4167 --- 16743
4815 --- 18453
5021 --- 20513
5042 --- 20546
5221 --- 21025
6251 --- 25169
6528 --- 25896
6582 --- 25986
6702 --- 26370
6872 --- 26738
6921 --- 26913
6932 --- 26930
7221 --- 29217
7412 --- 29714
7830 --- 30768
7840 --- 30784
8020 --- 32800
8021 --- 32801
8022 --- 32802
8024 --- 32804
8025 --- 32805
8026 --- 32806
8027 --- 32807
8028 --- 32808
8029 --- 32809
8052 --- 32850
8335 --- 33589
8834 --- 34868
8840 --- 34880
8841 --- 34881
8842 --- 34882
8844 --- 34884
8845 --- 34885
8846 --- 34886
8847 --- 34887
8848 --- 34888
8849 --- 34889
9026 --- 36902
9056 --- 36950
9274 --- 37492
9830 --- 38960
9831 --- 38961
9832 --- 38962
9833 --- 38963
9834 --- 38964
9835 --- 38965
9837 --- 38967
9838 --- 38968
9839 --- 38969
9848 --- 38984
9982 --- 39298

The hexadecimal numbers will have the same or fewer digits than the decimal ones. Here is the list of decimal numbers on their own:

53, 371, 913, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1345, 1937, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 4100, 5141, 5412, 6182, 8200, 9241, 12306, 16400, 16401, 16402, 16403, 16404, 16405, 16407, 16408, 16409, 16743, 18453, 20513, 20546, 21025, 25169, 25896, 25986, 26370, 26738, 26913, 26930, 29217, 29714, 30768, 30784, 32800, 32801, 32802, 32804, 32805, 32806, 32807, 32808, 32809, 32850, 33589, 34868, 34880, 34881, 34882, 34884, 34885, 34886, 34887, 34888, 34889, 36902, 36950, 37492, 38960, 38961, 38962, 38963, 38964, 38965, 38967, 38968, 38969, 38984, 39298

The algorithm can  be easily modified to accommodate bases up to 36 and the range can be extended, let's say to 100,000. Here are the results for base 36 in the range up to 100,000 (Permalink):

Base 36 Decimal

41 --- 145
75 --- 257
185 --- 1589
213 --- 2631
247 --- 2743
268 --- 2816
291 --- 2917
340 --- 4032
573 --- 6735
659 --- 7965
680 --- 8064
814 --- 10408
850 --- 10548
896 --- 10698
1357 --- 50731
1504 --- 53140
1875 --- 57281

There are only 17 decimal numbers that satisfy in this range. These are listed below in decimal form only:

145, 257, 1589, 2631, 2743, 2816, 2917, 4032, 6735, 7965, 8064, 10408, 10548, 10698, 50731, 53140, 57281

If we wish to look at bases below 10 then the numbers will have the same or more digits and so the algorithm will need to be modified. We will require all the digits in base 10 format to be contained within the number in the lower base format and these digits need to be in the same proportion. Here are the results for base 8 in range from 8 to 40,000 (Permalink):

Base 8 Decimal

107 --- 71
1347 --- 743
1357 --- 751
2371 --- 1273
3165 --- 1653
4152 --- 2154
6130 --- 3160
6131 --- 3161
6132 --- 3162
6133 --- 3163
6134 --- 3164
6135 --- 3165
6136 --- 3166
6137 --- 3167
6232 --- 3226
12765 --- 5621
13620 --- 6032
14562 --- 6514
15713 --- 7115
15720 --- 7120
15721 --- 7121
15722 --- 7122
15723 --- 7123
15724 --- 7124
15726 --- 7126
15727 --- 7127
15764 --- 7156
17074 --- 7740
37621 --- 16273
52371 --- 21753
73560 --- 30576
75341 --- 31457
102345 --- 34021
102473 --- 34107
103462 --- 34610
104365 --- 35061
105436 --- 35614
106273 --- 36027
106347 --- 36071

There are only 39 numbers that satisfy. Here is the list in decimal format only:

71, 743, 751, 1273, 1653, 2154, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3226, 5621, 6032, 6514, 7115, 7120, 7121, 7122, 7123, 7124, 7126, 7127, 7156, 7740, 16273, 21753, 30576, 31457, 34021, 34107, 34610, 35061, 35614, 36027, 36071

Thus it can be seen that whenever a number seems boring, there is always something of interest that remains to be discovered and that property can often be generalised, as was done here, to find interesting properties of other numbers.

Getting back to comparing decimal numbers to their hexadecimal equivalents we can make conditions more stringent by requiring that the lengths of both numbers be the same so that the digits of both are simply permutations of the other. In the range up to 100,000, there are 24 numbers that qualify. These are (Permalink):

Hex Decimal

35 --- 53
173 --- 371
391 --- 913
1004 --- 4100
1415 --- 5141
1524 --- 5412
1826 --- 6182
2008 --- 8200
2419 --- 9241
12570 --- 75120
12571 --- 75121
12572 --- 75122
12573 --- 75123
12574 --- 75124
12575 --- 75125
12576 --- 75126
12577 --- 75127
12578 --- 75128
12579 --- 75129
12765 --- 75621
15086 --- 86150
16549 --- 91465
18197 --- 98711
18499 --- 99481

The numbers in decimal format only are:

53, 371, 913, 4100, 5141, 5412, 6182, 8200, 9241, 75120, 75121, 75122, 75123, 75124, 75125, 75126, 75127, 75128, 75129, 75621, 86150, 91465, 98711, 99481

Similarly in the range up to 100,000, there are only 16 numbers in base 8 format that have the same digits as their decimal equivalants (Permalink):

Base 8 Decimal

2371 --- 1273
3165 --- 1653
4152 --- 2154
6130 --- 3160
6131 --- 3161
6132 --- 3162
6133 --- 3163
6134 --- 3164
6135 --- 3165
6136 --- 3166
6137 --- 3167
6232 --- 3226
37621 --- 16273
52371 --- 21753
73560 --- 30576
75341 --- 31457

Here are the numbers in decimal format only:

1273, 1653, 2154, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3226, 16273, 21753, 30576, 31457

Lightweight mathematics of course but sometimes it's good just to have fun with numbers. The table below shows the number of decimal numbers whose value in another base is an anagram of its digits. The bases range from 4 to 28. For bases 2 and 3 and for 29 and beyond, there are no such numbers.


Base 26 is interesting because the ten decimal numbers that satisfy are consecutive and the hexadecimal numbers formed from them are similarly consecutive and formed simply by moving the leading 9 of the decimal number one place to the right. Thus 910 in decimal becomes 190 in hexadecimal, 911 becomes 191 and so on until 919 that becomes 199.

Base 26 Decimal

190 --- 910
191 --- 911
192 --- 912
193 --- 913
194 --- 914
195 --- 915
196 --- 916
197 --- 917
198 --- 918
199 --- 919

All this can be explored via this permalink.

No comments:

Post a Comment