Monday, 26 July 2021

St. Ives

 

As I was going to St. Ives,

I met a man with seven wives,

Each wife had seven sacks,

Each sack had seven cats,

Each cat had seven kits:

Kits, cats, sacks, and wives,

How many were there going to St. Ives? 

The traditional understanding of this rhyme is that only one is going to St. Ives—the narrator. All of the others are coming from St. Ives. The trick is that the listener assumes that all of the others must be totalled up, forgetting that only the narrator is said to be going to St. Ives. If everyone mentioned in the riddle were bound for St. Ives, then the number would be 2,802: the narrator, the man and his seven wives, 49 sacks, 343 cats, and 2,401 kits. Wikipedia.

The progression 7, 49, 343 and 2401 corresponds to successive powers of seven: \(7^1, 7^2, 7^3\) and \(7^4\). The St. Ives rhyme came to mind because today I turned 26411 days old and this number has the interesting property that it can be written:$$26411=7 \times 7 \times 7 \times 77$$This property qualifies it for membership in OEIS A161145:


 A161145

Numbers which can be expressed as the product of numbers made of only sevens.


The members of the sequence, up to 100,000 are:
1, 7, 49, 77, 343, 539, 777, 2401, 3773, 5439, 5929, 7777, 16807, 26411, 38073, 41503, 54439, 59829, 77777

Of course, 7 wives, 49 sacks, 343 cats and 2401 kittens make an appearance in this sequence along with 26411. Clearly, I won't be celebrating number 38073 as this corresponds to Sunday, June 29th 2053 when I would be 104 years old. 

I devised a general purpose algorithm in SageMath that will generate not only the seven sequence but sequences for all digits between 2 and 9 inclusive. Here is its permalink. Applying this algorithm, I was able to generate the beginning members of OEIS A161140:


 A161140

Numbers which can be expressed as the product of numbers made of only twos.


Unfortunately the calculation timed out for the range up to 100,000 so I needed to restrict the range to 30,000. The members up to that point are:
1, 2, 4, 8, 16, 22, 32, 44, 64, 88, 128, 176, 222, 256, 352, 444, 484, 512, 704, 888, 968, 1024, 1408, 1776, 1936, 2048, 2222, 2816, 3552, 3872, 4096, 4444, 4884, 5632, 7104, 7744, 8192, 8888, 9768, 10648, 11264, 14208, 15488, 16384, 17776, 19536, 21296, 22222, 22528, 28416
Let's take 28416 as an example:$$28416=2 \times 2 \times 2 \times 2 \times 2 \times 2 \times 2 \times 222$$Applying the algorithm so that all numbers are made up to threes generates OEIS A161141:


 A161141

Numbers which can be expressed as the product of numbers made of only threes.

The members, up to 100,000, are:

1, 3, 9, 27, 33, 81, 99, 243, 297, 333, 729, 891, 999, 1089, 2187, 2673, 2997, 3267, 3333, 6561, 8019, 8991, 9801, 9999, 10989, 19683, 24057, 26973, 29403, 29997, 32967, 33333, 35937, 59049, 72171, 80919, 88209, 89991, 98901, 99999

Let's take 35937 as an example:$$35937=33 \times 33 \times 33$$Moving on to all fours (so to speak), we get OEIS A161142:


 A161142

Numbers which can be expressed as the product of numbers made of only fours.

 The members, up to 100,000, are:

1, 4, 16, 44, 64, 176, 256, 444, 704, 1024, 1776, 1936, 2816, 4096, 4444, 7104, 7744, 11264, 16384, 17776, 19536, 28416, 30976, 44444, 45056, 65536, 71104, 78144, 85184

Let's take 17776 as an example:$$17776=4 \times 4444$$Moving on again to all fives, we get OEIS A161143:


 A161143

Numbers which can be expressed as the product of numbers made of only fives.


The members, up to 100,000, are:
1, 5, 25, 55, 125, 275, 555, 625, 1375, 2775, 3025, 3125, 5555, 6875, 13875, 15125, 15625, 27775, 30525, 34375, 55555, 69375, 75625, 78125

Let's take 34375 as an example:$$34375=5 \times 5 \times 5 \times 5 \times 55$$Moving on further to all sixes, we get OEIS A161144:


 A161144



Numbers which can be expressed as the product of numbers made of only sixes.

 The members up to 100,000, are:

1, 6, 36, 66, 216, 396, 666, 1296, 2376, 3996, 4356, 6666, 7776, 14256, 23976, 26136, 39996, 43956, 46656, 66666, 85536

Let's take 43956 as an example:$$43956=66 \times 666$$Moving on to all eights, we get OEIS A161146:


 A161146

Numbers which can be expressed as the product of numbers made of only eights.

 The members, up to 100,000, are:

1, 8, 64, 88, 512, 704, 888, 4096, 5632, 7104, 7744, 8888, 32768, 45056, 56832, 61952, 71104, 78144, 88888

Let's use 71104 as an example:$$71104=8 \times 8888$$Moving on to all nines, we get OEIS A161147:


 A161147

Numbers which can be expressed as the product of numbers made of only nines.


The members, up to 100,000, are:
1, 9, 81, 99, 729, 891, 999, 6561, 8019, 8991, 9801, 9999, 59049, 72171, 80919, 88209, 89991, 98901, 99999

Let's use 59049 as an example:$$59049=9 \times  9  \times 9 \times 9  \times 9$$

No comments:

Post a Comment