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:

Thursday, 8 November 2018

2019: A Numerical Profile


With the coming year, 2019, less than two months away, I decided to investigate some of the numerical properties adhering to this number. Right off the bat, we can see that its digit sum is 12 and, because 3 divides 12, we know that 3 will divide 2019 as well. In fact, 2019 has prime factors of 3 and 673. Thus

2019 = 3 * 673

This means that 673 AD and 1346 AD (673 + 673 = 1346) could be associated with 2019 AD. 673 AD was a time of great expansion for the Islamic world (Muhammad had died in 632 AD). The following year, the Siege of Constantinople (one of many over the centuries) began, but "in 672–673 Arab fleets secured bases along the coasts of Asia Minor, and then proceeded to install a loose blockade around Constantinople." Here are some more details :
The First Arab Siege of Constantinople in 674–678 was a major conflict of the Arab–Byzantine wars, and the first culmination of the Umayyad Caliphate's expansionist strategy towards the Byzantine Empire, led by Caliph Mu'awiya I. Mu'awiya, who had emerged in 661 as the ruler of the Muslim Arab empire following a civil war, renewed aggressive warfare against Byzantium after a lapse of some years and hoped to deliver a lethal blow by capturing the Byzantine capital, Constantinople.
As reported by the Byzantine chronicler Theophanes the Confessor, the Arab attack was methodical: in 672–673 Arab fleets secured bases along the coasts of Asia Minor, and then proceeded to install a loose blockade around Constantinople. They used the peninsula of Cyzicus near the city as a base to spend the winter, and returned every spring to launch attacks against the city's fortifications. Finally, the Byzantines, under Emperor Constantine IV, managed to destroy the Arab navy using a new invention, the liquid incendiary substance known as Greek fire. The Byzantines also defeated the Arab land army in Asia Minor, forcing them to lift the siege. The Byzantine victory was of major importance for the survival of the Byzantine state, as the Arab threat receded for a time. A peace treaty was signed soon after, and following the outbreak of another Muslim civil war, the Byzantines even experienced a period of ascendancy over the Caliphate.
1346 AD was also an interesting year. As reported in Wikipedia, it included these events:
  • in Spring, a severe Black Death epidemic began its spread at the River Don near the Black Sea, then spread throughout Russia, the Caucasus, and the Genovese provinces within the year
  • on April 16th,  the Serbian Empire was proclaimed in Skopje by Dusan Silni, occupying much of South-Eastern Europe
  • on July 11th and 12th, Edward III and the English army cross the English Channel, and begin an invasion of France
  • on August 26, at the Battle of Crécy, the English defeat the French, in the first European battle where gunpowder is used.
Well, there's not much Mathematics in the history above so best to move on to more mathematical matters. What follows are some interesting facts about 2019 as number.

OEIS A037015: Numbers n with property that, reading binary expansion of n from right to left, run lengths strictly increase. Here we have \( 2019_{10}=11111100011_2 \). The initial members of the sequence are:

0, 1, 3, 6, 7, 14, 15, 28, 30, 31, 57, 60, 62, 63, 120, 121, 124, 126, 127, 241, 248, 249, 252, 254, 255, 483, 496, 497, 504, 505, 508, 510, 511, 966, 993, 995, 1008, 1009, 1016, 1017, 1020, 1022, 1023, 1987, 1990, 2016, 2017, 2019, 2032, 2033, 2040, 2041, 2044

OEIS A158339: Semiprimes that are the sum of four successive semiprimes. Here we have: 501 + 502 + 505 + 511 = 2019 and 501 = 3 * 167, 502 = 2 * 251, 505 = 5 * 101 and 511 = 7 * 73.

The initial members of this sequence are:

39, 94, 106, 118, 146, 158, 185, 201, 221, 254, 302, 365, 427, 473, 485, 519, 537, 589, 633, 655, 707, 723, 749, 767, 842, 851, 869, 901, 1003, 1145, 1205, 1211, 1219, 1247, 1263, 1337, 1349, 1603, 1646, 1681, 1703, 1731, 1797, 1891, 1903, 1937, 2005, 2019

OEIS A193227: Semiprimes p*q such that p+1 and q+1 are semiprimes. 

Here p+1 = 4 = 2 * 2 and q+1 = 674 = 2 * 337 and the initial members of this sequence are:

9, 15, 25, 39, 65, 111, 169, 183, 185, 219, 305, 365, 471, 481, 579, 785, 793, 831, 939, 949, 965, 1191, 1263, 1369, 1371, 1385, 1565, 1623, 1839, 1983, 1985, 2019

OEIS A091431: Happy-go-Lucky numbers: numbers that are both Happy (OEIS A007770) and Lucky (OEIS A000959). Happy numbers are those whose repeated sums  of squares of digits return 1.

The initial members of this sequence are:
1, 7, 13, 31, 49, 79, 129, 133, 193, 219, 319, 331, 367, 391, 409, 487, 655, 673, 739, 931, 937, 1009, 1029, 1039, 1093, 1209, 1233, 1251, 1275, 1281, 1285, 1303, 1309, 1323, 1339, 1533, 1575, 1587, 1599, 1663, 1771, 1857, 1933, 1959, 1995, 2019

OEIS A076408: Sum of first n perfect powers. As Wikipedia defines it: 
In mathematics, a perfect power is a positive integer that can be expressed as an integer power of another positive integer. More formally, n is a perfect power if there exist natural numbers m > 1, and k > 1 such that \( m^k = n \). In this case, n may be called a perfect k-th power. If k = 2 or k = 3, then n is called a perfect square or perfect cube, respectively. Sometimes 1 is also considered a perfect power (\(1^k = 1\) for any k).
Here n=22 and, as shown in OEIS A001597, the first 22 perfect powers are: 1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243 with the sequence of progressive sums being: 1, 5, 13, 22, 38, 63, 90, 122, 158, 207, 271, 352, 452, 573, 698, 826, 970, 1139, 1335, 1551, 1776, 2019.

In fact, there are 140 sequences listed in the OEIS that contain a reference to 2019. I've covered some of the more interesting ones, or at least ones that I could understand.

From Numbers Aplenty, we have the following properties:

2019 is the smallest number that can be written in six ways as the sum of the squares of three primes. Here are the prime triplets:

7 11 43, 7 17 41, 11 23 37, 13 13 41, 17 19 37, 23 23 31

Figure 1 is an extract from the Numbers Aplenty page:

FIGURE 1

Sunday, 28 October 2018

Prime Producing Linear Polynomials

An example of a famous prime producing polynomial is \(n^2-n+41 \) which produces primes for values of \(n\) from 1 to 40. These primes are shown below:
41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601
Figure 1 is an excerpt relating to this polynomial from an interesting article on prime-generating polynomials:


Figure 1

Figure 2 shows a table of record prime producing polynomials taken from MathWorld:


Figure 2

However, prime producing linear polynomials get less attention than the above quadratic, cubic and higher order polynomials. Today I turned 25410 days old and discovered that the linear polynomial \(25410 \, n+1 \) has some interesting prime producing qualities. Specifically, it produces primes for values of \(n\) from 1 to 6: 25411, 50821, 76231, 101641, 127051, 152461. As it turns out, 25410 is the first coefficient of \(\ a*n+1\) to produce six primes in a row. The next such number is 26040.

OEIS A237190 displays a list of coefficients of of \(\ a*n+1\) that produce five primes in a row:
10830, 25410, 26040, 88740, 165900, 196560, 211050, 224400, 230280, 247710, 268500, 268920, 375480, 377490, 420330, 451410, 494340, 512820, 592620, 604170, 735750, 751290, 765780, 799170, 808080, 952680, 975660, 1053690, 1064190, 1132860, 1156170, 1532370, 1559580
As can be seen, 10830 is the first coefficient with this property. The OEIS entry also provides a list of the first 1000 such coefficients and this is a good starting point when trying to find coefficients that produce six, seven, eight or more primes in a row. With a little manipulation in a spreadsheet, the OEIS data can be pasted directly into a list set up on SageMathCell.

Of the first 1000 coefficients that produce five primes, only the following go on to produce seven primes in a row (in the range 1 to 247289070): 
512820, 8224860, 22240680, 24462900, 26486460, 62871480, 93784530, 99597960, 139819680, 196474950
Of these only the following go on to produce eight primes in a row: 

512820, 22240680, 26486460, 99597960

All four of the above fail to produce a ninth prime. Thus 512820 is the smallest coefficient that will produce eight primes in a row. In terms of primes produced over a given range and not sequentially, it would seem that 15213870 is the most prolific. It produces 40 primes between \(n+1 \) and \(100 \,n+1\) whereas 512820 produces only 33 in the same range.

What do these numbers have in common. To begin with they are all divisible by 30 and are highly factorable. The following table shows the factorisation and number of divisors for the numbers in OEIS A237190:


Figure 3

It would seem that by adding 1 to multiples of such highly factorisable numbers increases the odds of generating a prime number. Interestingly, for the 1000 coefficients mentioned earlier, the polynomial \(25410 \, n+41\) produces a record 41 primes in the range from 1 to 100, more than for any other coefficient. This naturally leads to an investigation of polynomials of the form \(25410 \, n+p\) where \(p\) is prime. Here is a table of what showed up for primes from 2 to 97:


Figure 4

Clearly \(25410 \, n+97\) wins that race and in fact holds the record for all primes below 1000. For primes up to 100000, \(25410 \, n+5471\) takes the lead with 48 primes and only surrenders it to \(25410 \, n+982231\) with 49 primes when considering primes up to one million. Below are the 49 primes generated by \(25410 \, n+982231\) as n ranges from 1 to 100:


Figure  5


Figure 6

I must say that SageMath makes it incredibly easy to investigate matters such as this. Interestingly, of all the possible coefficients from 1 to 999,999, it is \(25410 \, n+982231\) that produces the highest score of 49 primes out of 100. I was beginning to start to think that this might be something of a record until I went back to \(\ a*n+41\) and thought I'd test all the numbers up to 999,999. The table in FIGURE 6 shows the surprising result. 

The factorisations again show the same pattern as with the earlier numbers:
  • 6 = 2 * 3
  • 12 = 2 * 2 * 3
  • 30 = 2 * 3 * 5
  • 60 = 2 * 2 * 3 *5
  • 210 = 2 * 3 * 5 * 7
Testing with other primes between 2 and 9999 and coefficients from 1 to 9999 (trying upper bounds of 999999 seemed to overwhelm the SAGE server) showed the best result was with the unpretentious \( 6 \,n+5 \) that produces a total of 56 primes between \(n=1\) and \(n=100\).

However, this 56% hit rate for primes when n is between 1 and 100 is not sustained. For example, setting lower and upper bounds of 4000 and 5000 for \( 6 \,n+5 \) generates 289 primes between 24005 and 30005. This is an average of 289/1000 or about 28.9%.

on August 30th 2021

See related post titled Linear Prime Chains uploaded on December 21st 2022.

Thursday, 25 October 2018

Self Numbers and Junction Numbers

Today I turned 25407 days old and discovered from Numbers Aplenty that it is a self number or Columbian number. Such a number is defined as one that cannot be written as \(x+\mathrm{sod}(x) \) where \(\mathrm{sod}(\cdot) \) denotes the sum of digits. One is reminded immediately of an inconsummate number that cannot be written as \(x ÷ \mathrm{sod}(x) \) where \(\mathrm{sod}(\cdot) \) denotes the sum of digits. View my blog post about these latter numbers here.

Self numbers are base dependent. From Wikipedia:
In general, for even bases, all odd numbers below the base number are self numbers, since any number below such an odd number would have to also be a 1-digit number which when added to its digit would result in an even number. For odd bases, all odd numbers are self numbers. The set of self numbers in a given base q is infinite and has a positive asymptotic density: when q is odd, this density is 1/2.
D.R.Kaprekar, who introduced these numbers in 1949, gave the following test to determine quickly if a number is self.

Define the functions
\[
\begin{array}{lcl}
d(n)& = & \mathrm{the\ number\ of\ digits\ of\ }n\,,\\[1mm]
r(n)\vphantom{M^{M^M}a_{M_M}}&=& 1+({{(n-1)}\pmod9})\,, \\[1mm]
h(n)&=&\left\{%
\begin{array}{ll}
r(n)/2&\mathrm{\ if\ }r(n)\mathrm{\ is\ even}\,,\\
(r(n)+9)/2&\mathrm{\ if\ }r(n)\mathrm{\ is\ odd}\,.\\
\end{array}\right.\\
\end{array}
\]Then a number \(n\)  is self if, for every \(k=0,1,\dots,d(n)\), it holds
\[
\mathrm{sod}(|n-h(n)-9\cdot k|) \neq h(n)+9\cdot k\,
\]where \(|x|\)  denotes the absolute value of \(x\).

Kaprekar's algorithm of course makes it very easy to write the necessary SAGE code to identify self numbers within a given range of numbers. Here is the code that I developed:


If the SAGE code runs in the SAGE CELL window (sometimes there are glitches), you'll see the output 25407 25418 25420 25431 25442 and so 25418 marks the next occurrence of a self number. The first self numbers (OEIS A003052) are:
1, 3, 5, 7, 9, 20, 31, 42, 53, 64, 75, 86, 97, 108, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 211, 222, 233, 244, 255, 266, 277, 288, 299, 310, 312, 323, 334, 345, 356, 367, 378, 389, 400, 411, 413, 424, 435, 446, 457, 468, 479, 490, 501, 512, 514, 525
A self prime is a self number that is prime (OEIS A006378). The first few self primes are:
3, 5, 7, 31, 53, 97, 211, 233, 277, 367, 389, 457, 479, 547, 569, 613, 659, 727, 839, 883, 929, 1021, 1087, 1109, 1223, 1289, 1447, 1559, 1627, 1693, 1783, 1873, ... 
Again from Wikipedia: "In October 2006 Luke Pebody demonstrated that the largest known Mersenne prime that is at the same time a self number is \(2^{24036583}−1 \). This is then the largest known self prime as of 2006."

By contrast, a junction number is one that can be written in more than one way as  \(x+\mathrm{sod}(x) \). For example, \(818 \)  is a junction number because it has two generators, \(796 \) and \(805 \). Indeed \[796+7+9+6 = 805+8+0+5 = 818.\]The first junction numbers are:
101, 103, 105, 107, 109, 111, 113, 115, 117, 202, 204, 206, 208, 210, 212, 214, 216, 218, 303, 305, 307, 309, 311, 313, 315, 317, 319, 404, 406, 408, 410, 412, 414, 416, 418, 420, 505, 507
It's easy enough to modify the previous SAGE code so that a list of junction numbers within a given range is generated:


The output generated from this code should be 101 103 105 107 109 111 113 115 117 together with the two smaller numbers that produce them. The junction numbers occur in runs of nine odd numbers and this is clearly seen in Figure 1 that shows the graph of such numbers between 1 and 1000.


Figure 1

Kaprekar's original paper can be viewed here.

Saturday, 20 October 2018

Lotto Simulations

I've written about Lotto before in this post (Oz Lotto) and another (Losing at Lotto). The current post is not about probabilities but simulation. How can we use SageMath to simulate a lottery draw? Well as it turns out it's not too difficult.


The key is to use the ZZ.random_element(lowerbound, upperbound+1) function as in the following code. The trick is not to allow duplicate numbers and that is the reason for the inclusion of Set. This function takes our lotto list which might look like this the list [20, 37, 6, 37, 1, 19, 16] and turns it, after the sort, into the ordered set {1, 6, 16, 19, 20, 37}.

Here is the code I developed. I'm really just a tyro at both Python and SageMath so there may well be much better ways to achieve my goals but this is what I came up with:
# Generate a set of numbers for lotto games
# let N represent how many numbers are required in the game
# let G represent the number of games
# let U represent the upper bound of numbers
G=8
N=7
U=40
for i in range(G):
    lotto=[]
    while len(Set(lotto))<N:
        lotto.append(ZZ.random_element(1,U+1))
    print sorted(Set(lotto))
The following is an example of the output:
[11, 23, 27, 30, 37, 38, 40]
[4, 7, 8, 15, 20, 29, 38]
[8, 9, 13, 14, 21, 28, 36]
[7, 11, 15, 21, 28, 33, 40]
[1, 15, 17, 18, 28, 33, 39]
[4, 7, 11, 14, 18, 29, 32]
[1, 10, 12, 16, 21, 31, 33]
[2, 7, 8, 12, 13, 19, 27]
How really random this output is I don't know. I'm sure SageMath has other ways to generate more truly random numbers but this is sufficient for the modest purposes of the exercise.

The code has the added advantage of being able to accommodate "fixed" numbers. For example, let's say we always want the numbers 23 and 32 included in the output. All that needs to be done is to start with lotto = [23, 32] instead of it being an empty list.

For example:
# Generate a set of numbers for lotto games
# let N represent how many numbers are required in the game
# let G represent the number of games
# let U represent the upper bound of numbers
G=8
N=7
U=40
for i in range(G):
    lotto=[23, 32]
    while len(Set(lotto))<N:
        lotto.append(ZZ.random_element(1,U+1))
    print sorted(Set(lotto))
Here an example of the output:
[10, 11, 21, 23, 32, 35, 37]
[5, 6, 17, 23, 31, 32, 39]
[6, 11, 17, 23, 31, 32, 39]
[3, 15, 18, 23, 26, 30, 32]
[2, 12, 13, 23, 27, 28, 32]
[7, 18, 23, 26, 32, 35, 38]
[2, 11, 17, 19, 23, 32, 33]
[3, 16, 23, 26, 27, 31, 32] 
Not that I expect it will make any difference to my chances of winning but I'll test this out in some coming Lotto games. Oddly enough what got me thinking about generating some random lotto numbers was this article titled JERRY AND MARGE GO LARGE in the Huffington Post. It's about an American couple who exploited a feature in their state's lottery to make millions of dollars. It's quite an interesting story.

As I've been doing I'll include a SageMathCell with the code so that anyone curious can experiment:

Wednesday, 17 October 2018

Semiprime Chains

Today I turned 25399 days old. This number is a semiprime, meaning that it has two prime factors. In the case of 25399, the prime factors are 11 and 2309. However, the number is a member of OEIS A177216: numbers n that are the product of two distinct primes such that \(2n-1, 4n-3, 8n-7, 16n-15, 32n-31, 64n-63 \text{ and } 128n-127\) are also products of two distinct primes. Below is a screenshot of the mathematical tweet to celebrate the occasion.


Evaluating this leads to the following table:


The chain is thus of the form \(2^a \times n- (2^a-1) \) with the integer \(a \geq 0 \).

The initial members of OEIS A177216 are:
11293, 12139, 25399, 31261, 36199, 44869, 49471, 62521, 72397, 83086, 89737, 91705, 98941, 124846, 125041, 134023, 138994, 144793, 164041, 166171, 170431, 173311, 182527, 199543, 224962, 244294, 258169, 259891, 263086, 275281, 277987 
I was interested to see how many of these terms would survive an extension of the process to \(256 \times n - 255 \), \(512 \times n - 511 \), \(1024 \times n - 1023 \) etc.

Extending the process in the same range to \(256 \times n - 255 \) leads to a considerable thinning of the numbers:
31261 36199 44869 49471 62521 72397 83086 138994 173311 182527 224962 259891 277987
Extending the range to \(512 \times n - 511 \) gives:
31261 36199 138994 173311 259891
Extending the range to \(1024 \times n - 1023 \) gives: 173311

So 173311 is the last man standing. Will it stand any further? As it turns out it will. It holds up to \(2048 \times n - 2047 \) but, at \(4096 \times n - 4095 \), there are three prime factors (419, 601 and 2819) and not two. For \(4096 \times n - 4095 \) to hold, we need to extend the range and this leads to 2212801). Below I've listed the semiprime chain associated with the number 173311.


173311 also has the property that is formed by a concatenation of two primes 173 and 311.

The following SAGE code shows that 2212801 is the only number up to 10 million with a prime chain up to \(4096 \times n - 4095 \):

INPUT

for n in range(1,10000000):
    if len(list(divisors(n)))==4:
        if len(list(divisors(2*n-1)))==4:
            if len(list(divisors(4*n-3)))==4:
                if len(list(divisors(8*n-7)))==4:
                    if len(list(divisors(16*n-15)))==4:
                        if len(list(divisors(32*n-31)))==4:
                            if len(list(divisors(64*n-63)))==4:
                                if len(list(divisors(128*n-127)))==4:
                                    if len(list(divisors(256*n-255)))==4:
                                        if len(list(divisors(512*n-511)))==4:
                                            if len(list(divisors(1024*n-1023)))==4:
                                                if len(list(divisors(2048*n-2047)))==4:
                                                    if len(list(divisors(4096*n-4095)))==4:
                                                        print(n),
OUTPUT

2212801

You can try running the above SAGE code using the evaluate button below the SAGE cell. Sometimes it's a little slow but generally it should work. You can modify the code by adding a # in front of a line e.g. # if len(list(divisors(4096*n-4095)))==4: will remove the 4096 condition and apply only the 2048 and lower conditions. Try it out. You may need to refresh the page after each evaluation.

Tuesday, 16 October 2018

Rhonda Numbers

Today I turned 25398 days old and I made Rhonda numbers the focus of my mathematical tweet of the day:


In base 8, 25398 is represented as 61466 and the product of these base 8 digits is 864. The sum of the prime factors (including multiplicity) of 25398 is 2+3*2+17+83 = 108 and 108 * 8 = 864. It's only the number itself that needs to be changed into a base other than 10. The prime factors and their sum all remain in base 10. So 25398 is a Rhonda number to base 8.

OEIS A100970 lists the initial (base 10) numbers that are Rhonda numbers in base 8 and they are:

1836, 6318, 6622, 10530, 14500, 14739, 17655, 18550, 25398, ...

Numbers Aplenty has this to say about the Rhonda numbers in general:
Rhonda numbers exist only in composite bases. Indeed, the product of the digits of a number in a prime base \(b\) cannot be divisible by \(b\), since every digit is smaller than \(b\). 
Kevin Brown has proved that there are infinite Rhonda numbers. 
The first base-10 Rhonda numbers are 1568, 2835, 4752, 5265, 5439, 5664, 5824, 5832, 8526, 12985, 15625, 15698, 19435, 25284. 
1000 is the smallest Rhonda number in two bases, namely 16 and 36, since: 
\(1000=2^3\cdot 5^3\), \(1000=(3,14,8)_{16}=(27,28)_{36}\) 
\(3\cdot14\cdot8 = 16\cdot(2\cdot3+3\cdot5)\) for base 16   
\(27\cdot28=36\cdot(2\cdot3+3\cdot5)\) for base 36. 
The first smallest Rhonda numbers with respect to one, two, ... , ten bases are 560, 1000, 10200, 5670, 63945, 158400, 322920, 140800, 1200420, 889200.
From MathWorld, the first few Rhonda numbers for small composite bases b are summarised in the following table:

b
OEIS Rhonda numbers
4A10096810206, 11935, 12150, 16031, 45030, 94185, ...
6A100969855, 1029, 3813, 5577, 7040, 7304, 15104, 19136, ...
8A1009701836, 6318, 6622, 10530, 14500, 14739, 17655, 18550, 25398, ...
9A10097315540, 21054, 25331, 44360, 44660, 44733, 47652, ...
10A0995421568, 2835, 4752, 5265, 5439, 5664, 5824, 5832, 8526, 12985, ...
12A100971560, 800, 3993, 4425, 4602, 4888, 7315, 8296, 9315, 11849, 12028, ...
14A10097211475, 18655, 20565, 29631, 31725, 45387, 58404, 58667, 59950, ...
15A1009742392, 2472, 11468, 15873, 17424, 18126, 19152, 20079, 24388, ...
16A1009751000, 1134, 6776, 15912, 19624, 20043, 20355, 23946, 26296, ...

Here is the SageMath code that I developed to generate the sequence in bases from 2 to 36 (with base 16 being used for the example):

b=16 #enter required base
L=[]
for x in range(2,27000):
    d=Integer(x).str(base=b)
    product=1
    for i in range(len(d)):
        product=product*int(d[i], base=b)
    P=list(factor(x))
    sum=0
    for p in P:
        sum+=p[0]*p[1]
    if product/sum ==b and product !=0:
        L.append(x)
print(L)

[1000, 1134, 6776, 15912, 19624, 20043, 20355, 23946, 26296] 

This algorithm will work for all bases from 2 up to 36 but there are no Rhonda numbers in prime bases, so there will be no output for these bases. 

Let's return to what was said in the Numbers Aplenty quote above, viz.:

The first smallest Rhonda numbers that can be written one base only, two bases, three bases etc. are: 

  • one --> 560
  • two --> 1000
  • three --> 10200
  • four --> 5670
  • five --> 63945
  • six --> 158400
  • seven --> 322920
  • eight --> 140800
  • nine --> 1200420
  • ten --> 889200
This site gives 140800 are an example. This is the smallest number that is a Rhonda number in eight different bases. See Figure 1.

Figure 1

Let's use base 198 to illustrate how this works. In base 198, 140800 can be represented as \( (3, 117, 22)_{198} \) and the product of these digits (3, 117 and 22) is 7722. Now 140800 factorises to 2^9 * 5^2 * 11 and the sum of these prime factors is 39 (remember we are working in base 10 here). If we multiply 39 by 198, we get 7722. Thus 140800 is a Rhonda number in base 198 and so it can be shown for the other bases.

on Thursday, April 1st 2021