Showing posts with label Smith number. Show all posts
Showing posts with label Smith number. Show all posts

Saturday, 23 May 2026

Smith Number Subsets

Smith numbers have the property that the sums of their digits are equal to the sums of the digits of their prime factors with multiplicity. Based on that criterion, the number associated with my diurnal age today, 28174, is a Smith number:$$28174=2 \times 14087$$This number however, has a further property if you look at it closely. The number and its prime factors share the same digits with the exception of the zero. This qualifies it for membership in OEIS A176670:


A176670
: composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.

The initial members of the sequence are:

1111, 1255, 12955, 17482, 25105, 28174, 51295, 81229, 91365, 100255, 101299, 105295, 107329, 110191, 110317, 117067, 124483, 127417, 129595, 132565, 137281, 145273, 146137, 149782, 163797, 171735, 174082, 174298, 174793, 174982, 193117, 208174, 210181, 217894

The table below shows the details:

  number   digit sum   factors         sum of factors' digits

  1111     4           11 * 101        4
  1255     13          5 * 251         13
  12955    22          5 * 2591        22
  17482    22          2 * 8741        22
  25105    13          5 * 5021        13
  28174    22          2 * 14087       22
  51295    22          5 * 10259       22
  81229    22          29 * 2801       22
  91365    24          3 * 5 * 6091    24
  100255   13          5 * 20051       13
  101299   22          11 * 9209       22
  105295   22          5 * 21059       22
  107329   22          29 * 3701       22
  110191   13          101 * 1091      13
  110317   13          107 * 1031      13
  117067   22          167 * 701       22
  124483   22          281 * 443       22
  127417   22          47 * 2711       22
  129595   31          5 * 25919       31
  132565   22          5 * 26513       22
  137281   22          107 * 1283      22
  145273   22          53 * 2741       22
  146137   22          317 * 461       22
  149782   31          2 * 74891       31
  163797   33          3 * 71 * 769    33
  171735   24          3 * 5 * 107^2   24
  174082   22          2 * 87041       22
  174298   31          2 * 87149       31
  174793   31          47 * 3719       31
  174982   31          2 * 87491       31
  193117   22          113 * 1709      22
  208174   22          2 * 104087      22
  210181   13          101 * 2081      13
  217894   31          2 * 108947      31

What's interesting is that these same digits show up several times in the above table:

  • 17482 which is a permutation of the digits of 28174
  • 149782 which has the digit 9 added to the permuted digits
  • 174082 which has the digit 0 added to the permuted digits
  • 174298 which has the digit 9 added to the permuted digits
  • 174982 which has the digit 9 added to the permuted digits
  • 208174 which has the digit 0 inserted after the 2 in 28174

All these numbers are xenodromes meaning that they have no repeated digits.

The obverse of this is to find all Smith numbers that have NO digits in common with their prime factors. There are 72 of these in the range up 40000 (permalink):

4, 27, 58, 166, 454, 576, 588, 627, 648, 654, 666, 690, 706, 729, 1449, 1858, 1908, 2067, 2409, 2839, 4369, 4414, 4464, 4880, 4960, 5458, 5818, 5854, 6084, 6096, 6567, 6583, 6684, 6718, 6760, 6880, 7068, 7078, 7186, 8158, 8568, 8680, 8864, 8901, 9166, 9414, 9849, 10669, 10786, 10966, 14458, 14566, 14958, 15646, 15709, 15984, 16546, 16866, 17496, 17664, 17718, 17840, 18418, 18454, 19818, 20229, 20299, 22509, 26727, 33680, 33760, 33880

The table below shows the details:

  number   digit sum   factors              sum of factors' digits

  4        4           2^2                  4
  27       9           3^3                  9
  58       13          2 * 29               13
  166      13          2 * 83               13
  454      13          2 * 227              13
  576      18          2^6 * 3^2            18
  588      21          2^2 * 3 * 7^2        21
  627      15          3 * 11 * 19          15
  648      18          2^3 * 3^4            18
  654      15          2 * 3 * 109          15
  666      18          2 * 3^2 * 37         18
  690      15          2 * 3 * 5 * 23       15
  706      13          2 * 353              13
  729      18          3^6                  18
  1449     18          3^2 * 7 * 23         18
  1858     22          2 * 929              22
  1908     18          2^2 * 3^2 * 53       18
  2067     15          3 * 13 * 53          15
  2409     15          3 * 11 * 73          15
  2839     22          17 * 167             22
  4369     22          17 * 257             22
  4414     13          2 * 2207             13
  4464     18          2^4 * 3^2 * 31       18
  4880     20          2^4 * 5 * 61         20
  4960     19          2^5 * 5 * 31         19
  5458     22          2 * 2729             22
  5818     22          2 * 2909             22
  5854     22          2 * 2927             22
  6084     18          2^2 * 3^2 * 13^2     18
  6096     21          2^4 * 3 * 127        21
  6567     24          3 * 11 * 199         24
  6583     22          29 * 227             22
  6684     24          2^2 * 3 * 557        24
  6718     22          2 * 3359             22
  6760     19          2^3 * 5 * 13^2       19
  6880     22          2^5 * 5 * 43         22
  7068     21          2^2 * 3 * 19 * 31    21
  7078     22          2 * 3539             22
  7186     22          2 * 3593             22
  8158     22          2 * 4079             22
  8568     27          2^3 * 3^2 * 7 * 17   27
  8680     22          2^3 * 5 * 7 * 31     22
  8864     26          2^5 * 277            26
  8901     18          3^2 * 23 * 43        18
  9166     22          2 * 4583             22
  9414     18          2 * 3^2 * 523        18
  9849     30          3 * 7^2 * 67         30
  10669    22          47 * 227             22
  10786    22          2 * 5393             22
  10966    22          2 * 5483             22
  14458    22          2 * 7229             22
  14566    22          2 * 7283             22
  14958    27          2 * 3^3 * 277        27
  15646    22          2 * 7823             22
  15709    22          23 * 683             22
  15984    27          2^4 * 3^3 * 37       27
  16546    22          2 * 8273             22
  16866    27          2 * 3^2 * 937        27
  17496    27          2^3 * 3^7            27
  17664    24          2^8 * 3 * 23         24
  17718    24          2 * 3 * 2953         24
  17840    20          2^4 * 5 * 223        20
  18418    22          2 * 9209             22
  18454    22          2 * 9227             22
  19818    27          2 * 3^3 * 367        27
  20229    15          3 * 11 * 613         15
  20299    22          53 * 383             22
  22509    18          3^2 * 41 * 61        18
  26727    24          3 * 59 * 151         24
  33680    20          2^4 * 5 * 421        20
  33760    19          2^5 * 5 * 211        19
  33880    22          2^3 * 5 * 7 * 11^2   22

Monday, 10 June 2019

An Unhappy Family

Today I turned 25634 days old and at first glance I found little of interest about the number after consulting my usual sources: the OEIS (Online Encyclopaedia of Integer Sequences) and Numbers Aplenty. However, after a little thought, I realised that the number is composed of the consecutive digits 2, 3, 4, 5 and 6. It thus belongs to a family of 120 numbers that are all composed of these five digits.

The members are:

23456, 23465, 23546, 23564, 23645, 23654, 24356, 24365, 24536, 24563, 24635, 24653, 25346, 25364, 25436, 25463, 25634, 25643, 26345, 26354, 26435, 26453, 26534, 26543, 32456, 32465, 32546, 32564, 32645, 32654, 34256, 34265, 34526, 34562, 34625, 34652, 35246, 35264, 35426, 35462, 35624, 35642, 36245, 36254, 36425, 36452, 36524, 36542, 42356, 42365, 42536, 42563, 42635, 42653, 43256, 43265, 43526, 43562, 43625, 43652, 45236, 45263, 45326, 45362, 45623, 45632, 46235, 46253, 46325, 46352, 46523, 46532, 52346, 52364, 52436, 52463, 52634, 52643, 53246, 53264, 53426, 53462, 53624, 53642, 54236, 54263, 54326, 54362, 54623, 54632, 56234, 56243, 56324, 56342, 56423, 56432, 62345, 62354, 62435, 62453, 62534, 62543, 63245, 63254, 63425, 63452, 63524, 63542, 64235, 64253, 64325, 64352, 64523, 64532, 65234, 65243, 65324, 65342, 65423, 65432


Looking at the graph above, it can be seen that there must be 120 possible paths joining all five vertices.

This provided an opportunity to investigate some of the properties of this family. Specifically, I explored how many members of the family were:
  • prime
  • semiprime
  • sphenic
I also looked at how many members contained the factors 2 and 7, given that the prime factors of 25634 are 2, 7 and 1831.

To begin with only six members of the family are prime. This low number isn't surprising because the only digit out of the five that can form a prime number is 3 in the unit position. These primes are 25463, 25643, 45263, 46523, 54623 and 65423. 

The semiprimes are, not surprisingly, more numerous and they number 31. The semiprimes are 23645, 23654, 24653, 26354, 26453, 26534, 32546, 32645, 35246, 35426, 36254, 42563, 42635, 45623, 46253, 52463, 52634, 52643, 53426, 53462, 53642, 54263, 56243, 56423, 62354, 62435, 62534, 63254, 63542, 64523, 65243.

25634 is a sphenic number, meaning that it has three distinct prime factors, and so it's of particular interest to see how many of the family of 120 are sphenic. It turns out that there are 30. These are listed below but not in ascending order:

25634 = 2 * 7 * 1831
26543 = 11 * 19 * 127
26345 = 5 * 11 * 479
26435 = 5 * 17 * 311
23546 = 2 * 61 * 193
24635 = 5 * 13 * 379
24365 = 5 * 11 * 443
52346 = 2 * 7 * 3739
56234 = 2 * 31 * 907
53246 = 2 * 79 * 337
54326 = 2 * 23 * 1181
62543 = 13 * 17 * 283
62345 = 5 * 37 * 337
65342 = 2 * 37 * 883
64253 = 7 * 67 * 137
64235 = 5 * 29 * 443
32654 = 2 * 29 * 563
32465 = 5 * 43 * 151
35642 = 2 * 71 * 251
36245 = 5 * 11 * 659
34526 = 2 * 61 * 283
34562 = 2 * 11 * 1571
42653 = 13 * 17 * 193
42365 = 5 * 37 * 229
45326 = 2 * 131 * 173
45362 = 2 * 37 * 613
46235 = 5 * 7 * 1321
43265 = 5 * 17 * 509
43526 = 2 * 7 * 3109
43562 = 2 * 23 * 947

It can be seen from the above that only 43526 and 52346 share with 25634 in having 2 and 7 as distinct prime factors. However, overall there are nine permutations that have 2 and 7 as prime, but not necessarily distinct, factors. These are:

25634 = 2 * 7 * 1831
52346 = 2 * 7 * 3739
54236 = 2^2 * 7 * 13 * 149
54362 = 2 * 7 * 11 * 353
65324 = 2^2 * 7 * 2333
32564 = 2^2 * 7 * 1163
35462 = 2 * 7 * 17 * 149
43526 = 2 * 7 * 3109
43652 = 2^2 * 7 * 1559

Every sphenic number can be associated with a rectangular prism the dimensions of which correspond to the number's prime factors. In this case, the "sphenic brick" as it's sometimes called would have dimensions of 2, 7 and 1831 and an associated area of 32986 square units. This gives a volume to area ratio of about 1.28680658500429.

Unfortunately we must conclude that this family is not a happy one. A happy number has the property that repeatedly squaring the digits of the number and adding them leads to 1. However, when this process is applied to some numbers, they fall into an endless loop comprised of 4, 16, 37, 58, 89, 145, 42, 20 and they are thus not happy. All the members of this family share the same digits and, as it turns out, the process results in 90, 81, 65, 61 and 37. Thus not a single member of the family can be counted a happy number.

Drawing on another property of numbers involving their digits, D-powerful numbers can be expressed as the sum of positive powers of their digits. For example, 24536 can be expressed as \( 2^3 + 4^7 +5^3 +3^5 +6^5 \) or as \( 2^7+4^7+5+3^5+6^5 \). Not all of the other members of the family to which 24536 belongs are D-powerful. It turns out, as far as I can determine, that there are 20 D-powerful numbers amongst the family (with some having multiple representations). They are listed below with the exponents of the respective digits on the right:

24536 --> 3 7 3 5 5
24536--> 7 7 1 5 5
25346 --> 13 1 6 7 2
25436 --> 13 3 7 6 1
26354 --> 1 5 7 1 7
34256 --> 1 3 15 3 4
34256--> 5 5 15 1 3
34526 --> 4 4 3 15 4
34562 --> 6 5 1 2 15
34652 --> 6 5 1 3 15
36254 --> 4 3 15 5 3
42536 --> 7 11 5 9 4
52364 --> 5 15 4 1 7
53246 --> 1 8 3 2 6
54326 --> 5 6 8 15 5
54632 --> 5 6 6 5 9
62354 --> 2 7 10 5 2
62534 --> 3 7 5 10 2
62534--> 4 11 3 10 2
63254 --> 6 4 3 3 7
63254--> 6 4 7 1 7
63542 --> 3 10 5 5 7
63542--> 4 10 3 5 11
63542--> 4 10 5 3 3
65234 --> 2 1 11 10 6
65234--> 6 1 1 7 7
65324 --> 1 3 10 11 6

One digit-related property in which all family members share is the digital root defined as follows:
The digital root (also repeated digital sum) of a non-negative integer is the (single digit) value obtained by an iterative process of summing digits, on each iteration using the result from the previous iteration to compute a digit sum. The process continues until a single-digit number is reached.
Because all family members share the same digits, the digital sum of all them is the same, namely 2 since the sum of the digits is 20.

Harshad numbers involve another digit-related property. These numbers, sometimes called Niven numbers, are characterised by the property that they are divisible by the sum of their digits. For every member of this family, the sum is 20 and it's thus clear that none of them can be Harshad numbers because none of them can end in the required 0. If the result of the division is a prime number then the number can be described as a Moran number and so the Moran numbers form a subset of the Harshad numbers.

Junction numbers are another class of numbers that involve the sum of a number's digits. A junction number is defined as a number that can be written as x + sod(x) for at least two x, where sod() denotes the sum of digits. It turns out that 24 members of the family are junction numbers. These are listed below with the relevant numbers in square brackets on the right:

34526 is a junction number [34498, 34507]
34625 is a junction number [34597, 34606]
35426 is a junction number [35398, 35407]
35624 is a junction number [35596, 35605]
36425 is a junction number [36397, 36406]
36524 is a junction number [36496, 36505]
43526 is a junction number [43498, 43507]
43625 is a junction number [43597, 43606]
45326 is a junction number [45298, 45307]
45623 is a junction number [45595, 45604]
46325 is a junction number [46297, 46306]
46523 is a junction number [46495, 46504]
53426 is a junction number [53398, 53407]
53624 is a junction number [53596, 53605]
54326 is a junction number [54298, 54307]
54623 is a junction number [54595, 54604]
56324 is a junction number [56296, 56305]
56423 is a junction number [56395, 56404]
63425 is a junction number [63397, 63406]
63524 is a junction number [63496, 63505]
64325 is a junction number [64297, 64306]
64523 is a junction number [64495, 64504]
65324 is a junction number [65296, 65305]
65423 is a junction number [65395, 65404]

Related to junction numbers, a self number (sometimes called a Columbian number) is a number such that there is no other number x such that x + sod(x) equals that number. However, none of the members of this family are self numbers because there is always a number x such x + sod(x) equals that number. In fact there are 96 members for which one such number exists and, as we have seen, there are 24 for which two such numbers exist. These are the junction numbers listed earlier.

A Smith number is also defined by a property involving the sum of the number's digits. It is a composite numbers with the property that the sum of its digits equals the sum of digits of its prime factors. Like the Harshad numbers mentioned earlier, none of the members of this family as Smith numbers.

Hoax numbers are similar but they only consider distinct prime factors. There are 7 members of the family that are hoax numbers, namely 23564, 24563, 32564, 36425, 45236, 64325 and 65324. We know the sum of digits of all family members is 20 and checking the distinct factors (shown in the list below), it can be seen that they two add to 20:

23564 = 2^2 * 43 * 137 (remember only count the factor 2 once)
24563 = 7 * 11^2 * 29 (remember only count the factor 11 once)
32564 = 2^2 * 7 * 1163 (remember only count the factor 2 once)
36425 = 5^2 * 31 * 47 (remember only count the factor 5 once)
45236 = 2^2 * 43 * 263 (remember only count the factor 2 once)
64325 = 5^2 * 31 * 83 (remember only count the factor 5 once)
65324 = 2^2 * 7 * 2333 (remember only count the factor 2 once)

The takeaway from this investigation is that, when exploring a family of numbers defined on the basis of the digits that comprise them, the best approach is to explore number properties that specifically involve digits. Some of these types of numbers are:
  • Smith numbers
  • Hoax numbers
  • Harshad numbers
  • Moran numbers
  • Self numbers
  • Junction numbers
  • D-powerful numbers
  • Happy numbers
ADDENDUM: today (June 18th 2019) I turned 25643 days old and this brought to mind the other family member, 25634, for which I created this post. Here is what I wrote about 25643 in my Airtable record for this number:
25643 is a Sophie Germain prime since 2 * 25643 = 51287 is also prime. 
25643 is an Ulam number, being the unique sum of two previous Ulam numbers, 69 and 25574. 
25643 is a member of OEIS A156119: primes formed by rearranging five consecutive decimal digits (avoiding leading 0). The members of this sequence, up to and including 25643, are: 10243, 12043, 20143, 20341, 20431, 23041, 24103, 25463, 25643.

Thursday, 15 November 2018

Smith Brothers

2542825429

On Thursday, the 21st April 2106, I posted about Repunits and Smith Numbers. The day was 24490 and the number turned out to be a member of OEIS A104167, a sequence whose members have the property that, when multiplied by any repunit prime, the result is a Smith number. Just to recapitulate from that post:
A repunit is defined by Wikipedia as a number like 11, 111, or 1111 that contains only the digit 1 — a more specific type of repdigit. The term stands for repeated unit and was coined in 1966 by Albert H. Beiler in his book "Recreations in the Theory of Numbers". A repunit prime is a repunit that is also a prime number. 
A Smith number is defined by Wikipedia as a composite number for which, in a given base (in base 10 by default), the sum of its digits is equal to the sum of the digits in its prime factorisation. For example, 378 = 2 × 3 × 3 × 3 × 7 is a Smith number since 3 + 7 + 8 = 2 + 3 + 3 + 3 + 7. In this definition the factors are treated as digits: for example, 22 factors to 2 × 11 and yields three digits: 2, 1, 1. Therefore 22 is a Smith number because 2 + 2 = 2 + 1 + 1. 
Today, I turned 25428 days old and this number is a Smith number with the property that the next consecutive number (25429) is also a Smith number. Such pairs of numbers are termed Smith brothers. They are not that common. OEIS A050219 lists the smaller of the members of each pair. Here is the list as shown on the OEIS website:
728, 2964, 3864, 4959, 5935, 6187, 9386, 9633, 11695, 13764, 16536, 16591, 20784, 25428, 28808, 29623, 32696, 33632, 35805, 39585, 43736, 44733, 49027, 55344, 56336, 57663, 58305, 62634, 65912, 65974, 66650, 67067, 67728, 69279, 69835
Here is a SageMathCell with the code that I wrote to generate this sequence (up to 25428). Note that print F must be changed to print(F) because SageMath is now using Python 3 and the old Python 2 code for print no longer works:


It works but I'm sure there are more elegant ways to generate the same result. Here is a Numberphile YouTube video that explains a little more about Smith Numbers: