Monday 31 July 2023

Iban Numbers

I was struggling to find something of significance (in my mind) about the number associated with my diurnal age today which is 27147. However, after much fruitless investigation and experimentation, I noticed something at the very bottom of the Numbers Aplenty entry for the number. It read as follows:

The spelling of 27147 in words is "twenty-seven thousand, one hundred forty-seven", and thus it is an iban number.

Hmmm. What on Earth is an iban number I thought. Well a definition was only a hyperlink away:

A number is called iban if its name (in English) does not contain the letter "i". Assuming that the name of every power of 10 greater than  $10^5$  ends in "-illion" (like million, billion, trillion, etc.), then the iban numbers are finite. Counting 0 (zero) there are 30276 of them, the largest being 777777. Iban numbers belong to the same family as aban numbers, eban numbers, oban numbers, and uban numbers. 

These numbers constitute OEIS A089589:


 A089589

Iban numbers (the letter i is banned from the English name of the number).


The initial members are:

0, 1, 2, 3, 4, 7, 10, 11, 12, 14, 17, 20, 21, 22, 23, 24, 27, 40, 41, 42, 43, 44, 47, 70, 71, 72, 73, 74, 77, 100, 101, 102, 103, 104, 107, 110, 111, 112, 114, 117, 120, 121, 122, 123, 124, 127, 140, 141, 142, 143, 144, 147, 170, 171, 172, 173, 174, 177, 200, 201

The OEIS comments include the following Python code:
from itertools import islice
from num2words import num2words
def agen(): yield from (k for k in range(10**6) if "i" not in num2words(k))
print(list(islice(agen(), 60)))

This doesn't work so I asked Google's Bard to fix the problem and it said to add the line "import num2words". This gives the following code: 

import num2words
from itertools import islice
from num2words import num2words
def agen(): yield from (k for k in range(10**6) if "i" not in num2words(k))
print(list(islice(agen(), 60)))

This code actually works using SageMath on my laptop and generates the entire 30276 numbers by replacing the 60. However, it still won't run on SageMathCell or online Python compiler like Programitz.

The num2words works as shown in Figure 1:


Figure 1

 There are many iban numbers in the range between 27000 and 28000. Here they are:

27000, 27001, 27002, 27003, 27004, 27007, 27010, 27011, 27012, 27014, 27017, 27020, 27021, 27022, 27023, 27024, 27027, 27040, 27041, 27042, 27043, 27044, 27047, 27070, 27071, 27072, 27073, 27074, 27077, 27100, 27101, 27102, 27103, 27104, 27107, 27110, 27111, 27112, 27114, 27117, 27120, 27121, 27122, 27123, 27124, 27127, 27140, 27141, 27142, 27143, 27144, 27147, 27170, 27171, 27172, 27173, 27174, 27177, 27200, 27201, 27202, 27203, 27204, 27207, 27210, 27211, 27212, 27214, 27217, 27220, 27221, 27222, 27223, 27224, 27227, 27240, 27241, 27242, 27243, 27244, 27247, 27270, 27271, 27272, 27273, 27274, 27277, 27300, 27301, 27302, 27303, 27304, 27307, 27310, 27311, 27312, 27314, 27317, 27320, 27321, 27322, 27323, 27324, 27327, 27340, 27341, 27342, 27343, 27344, 27347, 27370, 27371, 27372, 27373, 27374, 27377, 27400, 27401, 27402, 27403, 27404, 27407, 27410, 27411, 27412, 27414, 27417, 27420, 27421, 27422, 27423, 27424, 27427, 27440, 27441, 27442, 27443, 27444, 27447, 27470, 27471, 27472, 27473, 27474, 27477, 27700, 27701, 27702, 27703, 27704, 27707, 27710, 27711, 27712, 27714, 27717, 27720, 27721, 27722, 27723, 27724, 27727, 27740, 27741, 27742, 27743, 27744, 27747, 27770, 27771, 27772, 27773, 27774, 27777

Prior to 27000, the last iban number is 24777 and after 27777, the next is 40000.  Figure 2 shows a plot of the iban numbers.


Figure 2

While we're at it, we may as well look at similar types of numbers. Let's start with aban numbers. Numbers Aplenty defines these as follows:
A number is called aban if its name (in English) does not contain the letter "a". The word "and" is not counted and in general I do not use it when I spell out numbers. Among the words used to construct numbers names, only the word "thousand" contains an "a" so the aban numbers are the numbers from 1 to 999, from 1000000 to 1000999, from 2000000 to 2000999, and so on. The sum of the reciprocals of aban numbers does not converge and grows slowlytowards infinity.

Figure 3 shows a graph of the initial aban numbers up to 1000 which are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 200, 300, 400, 500, 600, 700, 800, 900


Figure 2

Next we'll consider eban numbers defined as follows by Numbers Aplenty:
A number is called eban if its name (in English) does not contain the letter "e".
It is easy to see that the eban numbers are all even and their last two digits must be one of 02, 04, 06, 30, 32, 34, 36, 40, 42, 44, 46, 50, 52, 54, 56, 60, 62, 64, or 66.

Here are the initial members and Figure 3 shows a plot of these numbers:

2, 4, 6, 30, 32, 34, 36, 40, 42, 44, 46, 50, 52, 54, 56, 60, 62, 64, 66, 2000, 2002, 2004, 2006, 2030, 2032, 2034, 2036, 2040, 2042, 2044, 2046, 2050, 2052, 2054, 2056, 2060, 2062, 2064, 2066, 4000, 4002, 4004, 4006, 4030, 4032, 4034, 4036, 4040, 4042, 4044, 4046, 4050, 4052, 4054, 4056, 4060, 4062, 4064, 4066, 6000, 6002, 6004, 6006, 6030, 6032, 6034, 6036, 6040, 6042, 6044, 6046, 6050, 6052, 6054, 6056, 6060, 6062, 6064, 6066, 30000, 30002, 30004, 30006, 30030, 30032, 30034, 30036, 30040, 30042, 30044, 30046, 30050, 30052, 30054, 30056, 30060, 30062, 30064, 30066, 32000, 32002, 32004, 32006, 32030, 32032, 32034, 32036, 32040, 32042, 32044, 32046, 32050, 32052, 32054, 32056, 32060, 32062, 32064, 32066, 34000, 34002, 34004, 34006, 34030, 34032, 34034, 34036, 34040, 34042, 34044, 34046, 34050, 34052, 34054, 34056, 34060, 34062, 34064, 34066, 36000, 36002, 36004, 36006, 36030, 36032, 36034, 36036, 36040, 36042, 36044, 36046, 36050, 36052, 36054, 36056, 36060, 36062, 36064, 36066, 40000, 40002, 40004, 40006, 40030, 40032, 40034, 40036, 40040, 40042, 40044, 40046, 40050, 40052, 40054, 40056, 40060, 40062, 40064, 40066, 42000, 42002, 42004, 42006, 42030, 42032, 42034, 42036, 42040, 42042, 42044, 42046, 42050, 42052, 42054, 42056, 42060, 42062, 42064, 42066, 44000, 44002, 44004, 44006, 44030, 44032, 44034, 44036, 44040, 44042, 44044, 44046, 44050, 44052, 44054, 44056, 44060, 44062, 44064, 44066, 46000, 46002, 46004, 46006, 46030, 46032, 46034, 46036, 46040, 46042, 46044, 46046, 46050, 46052, 46054, 46056, 46060, 46062, 46064, 46066, 50000, 50002, 50004, 50006, 50030, 50032, 50034, 50036, 50040, 50042, 50044, 50046, 50050, 50052, 50054, 50056, 50060, 50062, 50064, 50066, 52000, 52002, 52004, 52006, 52030, 52032, 52034, 52036, 52040, 52042, 52044, 52046, 52050, 52052, 52054, 52056, 52060, 52062, 52064, 52066, 54000, 54002, 54004, 54006, 54030, 54032, 54034, 54036, 54040, 54042, 54044, 54046, 54050, 54052, 54054, 54056, 54060, 54062, 54064, 54066, 56000, 56002, 56004, 56006, 56030, 56032, 56034, 56036, 56040, 56042, 56044, 56046, 56050, 56052, 56054, 56056, 56060, 56062, 56064, 56066, 60000, 60002, 60004, 60006, 60030, 60032, 60034, 60036, 60040, 60042, 60044, 60046, 60050, 60052, 60054, 60056, 60060, 60062, 60064, 60066, 62000, 62002, 62004, 62006, 62030, 62032, 62034, 62036, 62040, 62042, 62044, 62046, 62050, 62052, 62054, 62056, 62060, 62062, 62064, 62066, 64000, 64002, 64004, 64006, 64030, 64032, 64034, 64036, 64040, 64042, 64044, 64046, 64050, 64052, 64054, 64056, 64060, 64062, 64064, 64066, 66000, 66002, 66004, 66006, 66030, 66032, 66034, 66036, 66040, 66042, 66044, 66046, 66050, 66052, 66054, 66056, 66060, 66062, 66064, 66066


Figure 3

This leads on to the oban numbers defined as follows by Numbers Aplenty:
A number is called oban if its name (in English) does not contain the letter "o".
Assuming that the name of every power of 10 greater than  $10^5$  ends in "-illion" (like million, billion, trillion, etc.), then the oban numbers are finite. There are 454 of them, the largest begin 999.

The numbers are as follows with Figure 4 providing a graph of these numbers. 

3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 23, 25, 26, 27, 28, 29, 30, 33, 35, 36, 37, 38, 39, 50, 53, 55, 56, 57, 58, 59, 60, 63, 65, 66, 67, 68, 69, 70, 73, 75, 76, 77, 78, 79, 80, 83, 85, 86, 87, 88, 89, 90, 93, 95, 96, 97, 98, 99, 300, 303, 305, 306, 307, 308, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 323, 325, 326, 327, 328, 329, 330, 333, 335, 336, 337, 338, 339, 350, 353, 355, 356, 357, 358, 359, 360, 363, 365, 366, 367, 368, 369, 370, 373, 375, 376, 377, 378, 379, 380, 383, 385, 386, 387, 388, 389, 390, 393, 395, 396, 397, 398, 399, 500, 503, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 517, 518, 519, 520, 523, 525, 526, 527, 528, 529, 530, 533, 535, 536, 537, 538, 539, 550, 553, 555, 556, 557, 558, 559, 560, 563, 565, 566, 567, 568, 569, 570, 573, 575, 576, 577, 578, 579, 580, 583, 585, 586, 587, 588, 589, 590, 593, 595, 596, 597, 598, 599, 600, 603, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 617, 618, 619, 620, 623, 625, 626, 627, 628, 629, 630, 633, 635, 636, 637, 638, 639, 650, 653, 655, 656, 657, 658, 659, 660, 663, 665, 666, 667, 668, 669, 670, 673, 675, 676, 677, 678, 679, 680, 683, 685, 686, 687, 688, 689, 690, 693, 695, 696, 697, 698, 699, 700, 703, 705, 706, 707, 708, 709, 710, 711, 712, 713, 715, 716, 717, 718, 719, 720, 723, 725, 726, 727, 728, 729, 730, 733, 735, 736, 737, 738, 739, 750, 753, 755, 756, 757, 758, 759, 760, 763, 765, 766, 767, 768, 769, 770, 773, 775, 776, 777, 778, 779, 780, 783, 785, 786, 787, 788, 789, 790, 793, 795, 796, 797, 798, 799, 800, 803, 805, 806, 807, 808, 809, 810, 811, 812, 813, 815, 816, 817, 818, 819, 820, 823, 825, 826, 827, 828, 829, 830, 833, 835, 836, 837, 838, 839, 850, 853, 855, 856, 857, 858, 859, 860, 863, 865, 866, 867, 868, 869, 870, 873, 875, 876, 877, 878, 879, 880, 883, 885, 886, 887, 888, 889, 890, 893, 895, 896, 897, 898, 899, 900, 903, 905, 906, 907, 908, 909, 910, 911, 912, 913, 915, 916, 917, 918, 919, 920, 923, 925, 926, 927, 928, 929, 930, 933, 935, 936, 937, 938, 939, 950, 953, 955, 956, 957, 958, 959, 960, 963, 965, 966, 967, 968, 969, 970, 973, 975, 976, 977, 978, 979, 980, 983, 985, 986, 987, 988, 989, 990, 993, 995, 996, 997, 998, 999


Figure 4

Last come uban numbers defined by Numbers Aplenty as follows:
A number is called uban if its name (in English) does not contain the letter "u".
In particular, it cannot contain the terms "four", "hundred", and "thousand", So the uban number following 99 is 1000000. Despite being quite sparse, the sum of the reciprocals of uban numbers slowly diverges.

Here is a list of the initial uban numbers:

0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 98, 99

Of course, you could choose the absence of certain consonants as well if you wanted to and the so-called tban numbers are in fact listed as OEIS A008523. The initial members of the sequence are:

0, 1, 4, 5, 6, 7, 9, 11, 100, 101, 104, 105, 106, 107, 109, 111, 400, 401, 404, 405, 406, 407, 409, 411, 500, 501, 504, 505, 506, 507, 509, 511, 600, 601, 604, 605, 606, 607, 609, 611, 700, 701, 704, 705, 706, 707, 709, 711, 900, 901, 904, 905, 906, 907, 909, 911, 1000000, 1000001, 1000004, 1000005 

That's probably enough as these types of numbers have no real mathematical significance but it was interesting to come across the idea of them and is relevant to my previous post on Numbers and Letters from July 21st 2023.

Friday 21 July 2023

Numbers and Letters

This problem appeared in my email from Puzzle a Day:

There are 19 students in my university logic class. 15 of them play soccer, 16 play tennis, 12 like art, 5 enjoy history and 1 absolutely loves science. My university is situated at number 13 Main Street. My university’s logo is blue and it was designed ? years ago. How many years ago was my university’s logo designed?

I was clueless as to how to approach this problem even after I got the clue: Convert letters to numbers. What letters to convert was then the intermediate problem. I didn't know and looked at the solution:

My university’s logo was designed 25 years ago.

Each number in the question is the alphabetical position of the letter following it.

The final sentence is ‘My university’s logo is blue and it was designed ? years ago.’ The question mark is followed by the letter ‘y’, which is the 25th letter of the alphabet. This makes 25 the answer.

Let's add some formatting to the original question:

There are 19 students in my university logic class. 15 of them play soccer, 16 play tennis, 12 like art, 5 enjoy history and 1 absolutely loves science. My university is situated at number 13 Main Street. My university’s logo is blue and it was designed ? years ago. How many years ago was my university’s logo designed?

Once you see the "trick", it's easy and I'm forearmed now to face any future problems of a similar nature. Here's one of my own design:

There are 24 children in a class. 11 study German. \(x\) study Maths. What is the value of \(x\)?

The "trick" here is to determine how the numbers 24 and 11 are derived in the two sentences. There are 24 letters in the first sentence and 11 letters in the second sentence. There are ten letters in the third sentence and so "10 study Maths". The value of \(x\) is 10.

I mentioned Puzzle a Day in a post titled 2023 TO THE POWER OF 2023 in March 28th 2023. I should make more use of this resource. The emails were not going to my Primary email tab but to my Social tab and was missing them. I've redirected them to go to my Primary tab now.

Finally here are the correspondences that were used in both problems:

"a": 1, "b": 2,"c": 3,"d": 4,"e": 5, "f": 6, "g": 7,"h": 8,"i": 9,"j": 10,"k": 11,"l": 12,"m": 13, "n": 14,"o": 15,"p": 16,"q": 17,"r": 18,"s": 19,"t": 20,"u": 21,"v": 22,"w": 23,"x": 24,"y": 25,"z": 2

Monday 17 July 2023

Fusing Mathematics and Artificial Intelligence

Today I turned 27133 days old and one of this number's interesting properties is that it can be represented as a sum of two, three, four and five cubes and in more than one way in some cases. Specifically we can write: $$ \begin{align} 27133 &= 2744+24389\\&=14^3+29^3\\27133 &= 8+125+27000\\&=2^3+5^3+30^3\\27133&=1331+2744+3375+19683\\&=11^3+14^3+15^3+27^3\\27133&=8+8+1000+1728+24389\\&=2^3+2^3+10^3+12^3+29^3\\27133 &= 8+27+512+2197+24389\\&=2^3+3^3+8^3+13^3+29^3\\27133 &= 8+125+3375+8000+15625\\&=2^3+5^3+15^3+20^3+25^3\\27133 &= 125+4096+4913+5832+12167\\&=5^3+16^3+17^3+18^3+23^3\\27133&=216+3375+3375+8000+12167\\&=6^3+15^3+15^3+20^3+23^3 \end{align}$$This is all well and good but visually it's hardly exciting. What I'd like to be able to do is to create an octagonal balance with the eight cubes sitting at the ends of the eight arms. This would have some visual impact I'm sure.


Figure 1



Figure 2

Figures 1 and 2 are a start but how are the twin arms of the traditional scales in Figure 1 transformed into eight arms or four twin arms? How can all the cubes from \(2^3\) to \(30^3\) be represented in proportion, as is partially done in Figure2, and placed on the scales? It could be done with a lot of time and effort using traditional methods but how well will AI perform. 

Here are the directions I gave to DALL-E and Figure 3 shows the four results:

Draw a set of scales with eight arms instead of the traditional two and have cubes of various sizes placed at the ends of the arms so that they roughly balance.


Figure 3

As can be seen the results are not impressive. Here is a second prompt that I gave it and Figure 4 shows the results:

Octopus balancing cubes of various sizes at the end of each of its tentacles.

Figure 4

Again the results are unimpressive but I tried again with the following prompt and figure 5 shows the results:

A weighing machine has eight arms formed from four intersecting metal rods. There are pans at the end of each arm on which to place items to be weighed. In this case, the pans contain a variety of multicolored cubes of various sizes that roughly balance one another. 


Figure 5

Despite the very specific instructions the program wasn't up to the task. Figure 6 shows what NightCafe came up with using the same prompt as before:


Figure 6

I guess this is slightly better but it's still far short of what I want. Figure 7 is what starryai came up with:


Figure 7

Nope. DeepAI came up with the image shown in Figure 8.


Figure 8

I should refine my prompts further of course when using these tools but I was just interested in seeing what the initial outputs would be. Bard, Google's AI, now has the ability to display and import images (see my post Bard). It could not display my eight-armed scale as describe below:
Can you find an image of a scale for weighing that has eight trays instead of the traditional two, arranged evenly in a circle, so as to resemble the arms of an octopus.

There is no image of a scale for weighing that has eight trays instead of the traditional two, arranged evenly in a circle, so as to resemble the arms of an octopus.

The reason for this is that octopus scales are not designed for weighing. They are actually used for detecting motion and orientation. The eight arms of an octopus are covered in tiny suckers, and each sucker has a small sensor that can detect changes in pressure. This allows the octopus to sense the movement of its environment and to maintain its balance.

A scale that has eight trays would be very difficult to use for weighing. The trays would have to be very small, and it would be difficult to keep them evenly balanced. Additionally, the scale would be very sensitive to vibrations, which would make it difficult to get accurate readings.

So, while it is possible to imagine a scale that has eight trays, it is not practical or useful. Octopus scales are simply not designed for weighing.

However, Bard was more forthcoming with this straightforward request:

Can you find an image of an octahedron with the formula for its volume displayed. 

Sure, I found you an image of an octahedron with the formula for its volume displayed. 

The formula for the volume of an octahedron is:

Volume = (√2/3) * a^3

where a is the side length of the octahedron.

The octahedron is a three-dimensional shape with eight faces, each of which is an equilateral triangle. The volume of an octahedron is equal to one-third the volume of a regular tetrahedron with the same side length.

The site proved quite useful and so Bard can be used for finding mathematical content on the Internet, unlike ChatGPT 3.5 that does not have such access.

Monday 10 July 2023

Johnson Solids J1 and J8

The number associated with my diurnal age today, 27126, introduced me to the notion of Johnson solids via its membership in OEIS A227221:


 A227221

Volume of Johnson square pyramid placed upright on cube (rounded down) with edge lengths equal to \(n\).



The members of this sequence, up to 40000, are:

1, 9, 33, 79, 154, 266, 423, 632, 900, 1235, 1644, 2135, 2714, 3390, 4170, 5061, 6071, 7206, 8475, 9885, 11443, 13157, 15034, 17082, 19307, 21718, 24322, 27126, 30137, 33363, 36812

The formula for the area is given by \(  (1+\dfrac{ \sqrt{2}}{6}) \times n\) where \(n\) is the edge length. For 27216, \(n=28\). This shape is known as an elongated square pyramid and represent Johnson solid J8. A Johnson solid is a convex polyhedron with all edges equal and there 92 distinct types. The equilateral square pyramid sitting on one of the faces of the cube is Johnson solid J1. See Figures 1 and 2.


Figure 1: Johnson solid J1 (source)



Figure 2: Johnson solid J8 (source)

Figure 3 shows a octahedron, one of the five Platonic solids, that can be considered a square bipyramid, i.e. two Johnson square pyramids connected base-to-base.


Figure 3: octahedron (source)

Figure 4 shows a tetrakis hexahedron that can be constructed from a cube with Johnson square pyramids added to each face. It is a Catalan solid.


Figure 4: tetrakis hexahedron (source)

Sunday 9 July 2023

Concatenations of Squares and Cubes

I was surprised that the number associated with my diurnal age today, 27125, didn't show up in the OEIS as a concatenation of two cubes, namely \(3^3\) and \(5^3\). This prompted me to list all numbers of the form \(n^3 \, | \, m^3\) where \(n\) and \(m\) are integers (not necessarly distinct). Here is a permalink to the SageMath code that generates the list up to 40,000 and here is the list:

11, 18, 81, 88, 127, 164, 271, 278, 641, 648, 827, 864, 1125, 1216, 1251, 1258, 1343, 1512, 1729, 2161, 2168, 2727, 2764, 3431, 3438, 5121, 5128, 6427, 6464, 7291, 7298, 8125, 8216, 8343, 8512, 8729, 10001, 10008, 11000, 11331, 11728, 12197, 12527, 12564, 12744, 13311, 13318, 13375, 14096, 14913, 15832, 16859, 17281, 17288, 18000, 19261, 21627, 21664, 21971, 21978, 27125, 27216, 27343, 27441, 27448, 27512, 27729, 33751, 33758, 34327, 34364

Some are more difficult to spot than others. What about concatenations of square numbers? Here is a permalink to the SageMath code that generates a list of numbers up to 40,000 and here is the list of numbers of the form  \(n^2 \, | \, m^2\) where \(n\) and \(m\) are integers (not necessarly distinct):

11, 14, 19, 41, 44, 49, 91, 94, 99, 116, 125, 136, 149, 161, 164, 169, 181, 251, 254, 259, 361, 364, 369, 416, 425, 436, 449, 464, 481, 491, 494, 499, 641, 644, 649, 811, 814, 819, 916, 925, 936, 949, 964, 981, 1001, 1004, 1009, 1100, 1121, 1144, 1169, 1196, 1211, 1214, 1219, 1225, 1256, 1289, 1324, 1361, 1400, 1441, 1444, 1449, 1484, 1529, 1576, 1616, 1625, 1636, 1649, 1664, 1676, 1681, 1691, 1694, 1699, 1729, 1784, 1841, 1900, 1961, 1964, 1969, 2251, 2254, 2259, 2516, 2525, 2536, 2549, 2561, 2564, 2569, 2581, 2891, 2894, 2899, 3241, 3244, 3249, 3611, 3614, 3616, 3619, 3625, 3636, 3649, 3664, 3681, 4001, 4004, 4009, 4100, 4121, 4144, 4169, 4196, 4225, 4256, 4289, 4324, 4361, 4400, 4411, 4414, 4419, 4441, 4484, 4529, 4576, 4625, 4676, 4729, 4784, 4841, 4844, 4849, 4900, 4916, 4925, 4936, 4949, 4961, 4964, 4981, 5291, 5294, 5299, 5761, 5764, 5769, 6251, 6254, 6259, 6416, 6425, 6436, 6449, 6464, 6481, 6761, 6764, 6769, 7291, 7294, 7299, 7841, 7844, 7849, 8116, 8125, 8136, 8149, 8164, 8181, 8411, 8414, 8419, 9001, 9004, 9009, 9100, 9121, 9144, 9169, 9196, 9225, 9256, 9289, 9324, 9361, 9400, 9441, 9484, 9529, 9576, 9611, 9614, 9619, 9625, 9676, 9729, 9784, 9841, 9900, 9961, 10016, 10025, 10036, 10049, 10064, 10081, 10241, 10244, 10249, 10891, 10894, 10899, 11024, 11089, 11156, 11225, 11296, 11369, 11444, 11521, 11561, 11564, 11569, 11600, 11681, 11764, 11849, 11936, 12025, 12116, 12125, 12136, 12149, 12164, 12181, 12209, 12251, 12254, 12259, 12304, 12401, 12500, 12601, 12704, 12809, 12916, 12961, 12964, 12969, 13025, 13136, 13249, 13364, 13481, 13600, 13691, 13694, 13699, 13721, 13844, 13969, 14096, 14225, 14356, 14416, 14425, 14436, 14441, 14444, 14449, 14464, 14481, 14489, 14624, 14761, 14900, 15041, 15184, 15211, 15214, 15219, 15329, 15476, 15625, 15776, 15929, 16001, 16004, 16009, 16084, 16100, 16121, 16144, 16169, 16196, 16225, 16241, 16256, 16289, 16324, 16361, 16400, 16441, 16484, 16529, 16561, 16576, 16625, 16676, 16724, 16729, 16784, 16811, 16814, 16819, 16841, 16889, 16900, 16916, 16925, 16936, 16949, 16961, 16964, 16981, 17056, 17225, 17396, 17569, 17641, 17644, 17649, 17744, 17921, 18100, 18281, 18464, 18491, 18494, 18499, 18649, 18836, 19025, 19216, 19361, 19364, 19369, 19409, 19604, 19616, 19625, 19636, 19649, 19664, 19681, 19801, 20251, 20254, 20259, 21161, 21164, 21169, 22091, 22094, 22099, 22516, 22525, 22536, 22549, 22564, 22581, 23041, 23044, 23049, 24011, 24014, 24019, 25001, 25004, 25009, 25100, 25121, 25144, 25169, 25196, 25225, 25256, 25289, 25324, 25361, 25400, 25441, 25484, 25529, 25576, 25616, 25625, 25636, 25649, 25664, 25676, 25681, 25729, 25784, 25841, 25900, 25961, 26011, 26014, 26019, 27041, 27044, 27049, 28091, 28094, 28099, 28916, 28925, 28936, 28949, 28964, 28981, 29161, 29164, 29169, 30251, 30254, 30259, 31361, 31364, 31369, 32416, 32425, 32436, 32449, 32464, 32481, 32491, 32494, 32499, 33641, 33644, 33649, 34811, 34814, 34819, 36001, 36004, 36009, 36100, 36116, 36121, 36125, 36136, 36144, 36149, 36164, 36169, 36181, 36196, 36225, 36256, 36289, 36324, 36361, 36400, 36441, 36484, 36529, 36576, 36625, 36676, 36729, 36784, 36841, 36900, 36961, 37211, 37214, 37219, 38441, 38444, 38449, 39691, 39694, 39699

We can thin the above list of numbers by requiring that the number formed by the concatenation be a square number (permalink):

49, 169, 361, 1225, 1444, 1681, 3249, 4225, 4900, 15625, 16900, 36100

Here we see that \(36100 = 6^2 \, | \, 10^2 = 190^2 \).

While we're at it, let's consider concatenations of fourth powers. Here is a list (permalink) of numbers of the form \(n^4 \, | \, m^4\) where \(n\) and \(m\) are integers (not necessarly distinct):

11, 116, 161, 181, 811, 1256, 1616, 1625, 1681, 2561, 6251, 8116, 8181, 11296, 12401, 12961, 14096, 16256, 16561, 16625, 24011, 25616, 25681

We don't have to limit ourselves to concatenations of pairs of powers. We can concatenate three powers as easily as two. Let's consider numbers that are a concatenation of three square numbers (permalink):

111, 114, 119, 141, 144, 149, 191, 194, 199, 411, 414, 419, 441, 444, 449, 491, 494, 499, 911, 914, 919, 941, 944, 949, 991, 994, 999, 1116, 1125, 1136, 1149, 1161, 1164, 1169, 1181, 1251, 1254, 1259, 1361, 1364, 1369, 1416, 1425, 1436, 1449, 1464, 1481, 1491, 1494, 1499, 1611, 1614, 1619, 1641, 1644, 1649, 1691, 1694, 1699, 1811, 1814, 1819, 1916, 1925, 1936, 1949, 1964, 1981, 2511, 2514, 2519, 2541, 2544, 2549, 2591, 2594, 2599, 3611, 3614, 3619, 3641, 3644, 3649, 3691, 3694, 3699, 4116, 4125, 4136, 4149, 4161, 4164, 4169, 4181, 4251, 4254, 4259, 4361, 4364, 4369, 4416, 4425, 4436, 4449, 4464, 4481, 4491, 4494, 4499, 4641, 4644, 4649, 4811, 4814, 4819, 4911, 4914, 4916, 4919, 4925, 4936, 4941, 4944, 4949, 4964, 4981, 4991, 4994, 4999, 6411, 6414, 6419, 6441, 6444, 6449, 6491, 6494, 6499, 8111, 8114, 8119, 8141, 8144, 8149, 8191, 8194, 8199, 9116, 9125, 9136, 9149, 9161, 9164, 9169, 9181, 9251, 9254, 9259, 9361, 9364, 9369, 9416, 9425, 9436, 9449, 9464, 9481, 9491, 9494, 9499, 9641, 9644, 9649, 9811, 9814, 9819, 9916, 9925, 9936, 9949, 9964, 9981, 10011, 10014, 10019, 10041, 10044, 10049, 10091, 10094, 10099, 11001, 11004, 11009, 11100, 11121, 11144, 11169, 11196, 11211, 11214, 11219, 11225, 11256, 11289, 11324, 11361, 11400, 11441, 11444, 11449, 11484, 11529, 11576, 11616, 11625, 11636, 11649, 11664, 11676, 11681, 11691, 11694, 11699, 11729, 11784, 11841, 11900, 11961, 11964, 11969, 12111, 12114, 12119, 12141, 12144, 12149, 12191, 12194, 12199, 12251, 12254, 12259, 12516, 12525, 12536, 12549, 12561, 12564, 12569, 12581, 12891, 12894, 12899, 13241, 13244, 13249, 13611, 13614, 13616, 13619, 13625, 13636, 13649, 13664, 13681, 14001, 14004, 14009, 14100, 14121, 14144, 14169, 14196, 14225, 14256, 14289, 14324, 14361, 14400, 14411, 14414, 14419, 14441, 14444, 14449, 14484, 14491, 14494, 14499, 14529, 14576, 14625, 14676, 14729, 14784, 14841, 14844, 14849, 14900, 14916, 14925, 14936, 14949, 14961, 14964, 14981, 15291, 15294, 15299, 15761, 15764, 15769, 16116, 16125, 16136, 16149, 16161, 16164, 16169, 16181, 16251, 16254, 16259, 16361, 16364, 16369, 16416, 16425, 16436, 16449, 16464, 16481, 16491, 16494, 16499, 16641, 16644, 16649, 16761, 16764, 16769, 16811, 16814, 16819, 16911, 16914, 16916, 16919, 16925, 16936, 16941, 16944, 16949, 16964, 16981, 16991, 16994, 16999, 17291, 17294, 17299, 17841, 17844, 17849, 18116, 18125, 18136, 18149, 18164, 18181, 18411, 18414, 18419, 19001, 19004, 19009, 19100, 19121, 19144, 19169, 19196, 19225, 19256, 19289, 19324, 19361, 19400, 19441, 19484, 19529, 19576, 19611, 19614, 19619, 19625, 19641, 19644, 19649, 19676, 19691, 19694, 19699, 19729, 19784, 19841, 19900, 19961, 22511, 22514, 22519, 22541, 22544, 22549, 22591, 22594, 22599, 25116, 25125, 25136, 25149, 25161, 25164, 25169, 25181, 25251, 25254, 25259, 25361, 25364, 25369, 25416, 25425, 25436, 25449, 25464, 25481, 25491, 25494, 25499, 25611, 25614, 25619, 25641, 25644, 25649, 25691, 25694, 25699, 25811, 25814, 25819, 25916, 25925, 25936, 25949, 25964, 25981, 28911, 28914, 28919, 28941, 28944, 28949, 28991, 28994, 28999, 32411, 32414, 32419, 32441, 32444, 32449, 32491, 32494, 32499, 36111, 36114, 36116, 36119, 36125, 36136, 36141, 36144, 36149, 36161, 36164, 36169, 36181, 36191, 36194, 36199, 36251, 36254, 36259, 36361, 36364, 36369, 36416, 36425, 36436, 36449, 36464, 36481, 36491, 36494, 36499, 36641, 36644, 36649, 36811, 36814, 36819, 36916, 36925, 36936, 36949, 36964, 36981

Here we see that \(36981= 6^2 \, | \, 3^2 \, | \,9^2\). Once again, we can thin the above numbers by adding the requirement that the number formed by the concatenation be a square number. In this case, we get (permalink):

144, 441, 1369, 1936, 11449, 11664, 14400, 16641, 36481

Here we see that \(36481=6^2 \, | \, 2^2 \, | \,9^2 = 191^2\). None of these sequences of numbers appear in the OEIS as far as I'm aware and I certainly won't be adding them. So nothing of deep mathematical significance in this post, just playing around with powers of numbers and concatenating them. Of course, I've written about Primes Formed By Concatenation quite recently on June 17th 2023.

Friday 7 July 2023

The Esucarys Mapping Revisited

It was on the 15th February 2021 that I made my first post about the Esucarys Mapping which is related the Collatz or 3\(x\)+1 mapping but with an extra twist. Let's revisit what I wrote back then.

The Esucarys sequence derives its name from a reversal of "Syracuse", with the generating rule being that for the Syracuse (3\(x\)+1 or Collatz) sequence followed by a reversal. 247 is the only known fixed point of the Esucarys sequence. Very few numbers map to 247.
The members of this sequence, up to 40000, are:

247, 1247, 1484, 2473, 4859, 5087, 5738, 7318, 7484, 9563, 9682, 9694, 9938, 11247, 12189, 12473, 14840, 14842, 15209, 15610, 16274, 16563, 16750, 16798, 17609, 19168, 20019, 21885, 24733, 26251, 27123, 27125, 29156, 30076, 30524, 32614

Back when I made that post my diurnal age was 26251 and it was only today that my diurnal age reached the next term, 27125, in this sequence (OEIS A129133). This latter number requires only five steps to reach 247. The steps are:

27123, 7318, 9563, 9682, 1484, 247

The trajectory is shown in Figure 1.


Figure 1

The progression reached thus:
  • 27123 --> 81370 (multiply by 3 & add 1 since number is odd)
  • 81370 --> 7318 (reverse number)
  • 7318 --> 3659 (divide by two since number is even)
  • 3659 --> 9563 (reverse number)
  • 9563 --> 28690 (multiply by 3 and add 1 since number is odd)
  • 28690 --> 9682 (reverse number)
  • 9682 --> 4841 (divide by 2 since number is even)
  • 4841 --> 1484 (reverse number)
  • 1484 --> 742 (divide by 2 since number is even)
  • 742 --> 247 (reverse number)
Since 247 --> 742 --> 247 we are stuck. Note that certain numbers will produce infinite loops but they don't centre on a fixed point. For example consider the numbers 3 and 13:

3 --> 10 --> 1 --> 4 --> 2 --> 1 --> 4
13 --> 40 --> 4 --> 2 --> 1 --> 4

What's interesting about 27123 is that the next odd number, 27125, is also a member of the sequence. The progression for this number also involves five steps and is:

27125, 67318, 95633, 9682, 1484, 247

The maximum values reached by the trajectory of both these numbers is tiny compared to the previous singleton (26251, see earlier post). Pairings like 27123 and 27125 are relatively rare. Up to one hundred thousand, the only ones are:
  • 14840 and 14842
  • 27123 and 27125
  • 74840 and 74842
  • 82823 and 82825

 Figure 2 shows a plot of the sequence members up to one hundred thousand.


Figure 2

Tuesday 4 July 2023

Nested Radicals

I came across a problem in Cliff Pickover's Twitter feed. It is depicted in Figure 1.


Figure 1

No solution was offered so I did a search of Google Images and came up with a link to MathWorld. It is there that a solution is offered:$$ \sqrt{x}=\sqrt[3]{x  \, \sqrt[3]{x  \, \sqrt[3]{x \cdots}}}$$This is an instance of a more general formula:$$ x^{1/(n-1)}=\sqrt[n]{x \, \sqrt[n]{x \, \sqrt[n]{x \, \cdots}}}$$When \(n=3\), we get the original formula that Pickover was referencing. There are other interesting results in the MathWorld article. The following is particularly striking:$$ x^{e-2}=\sqrt{x  \, \sqrt[3]{x \, \sqrt[4] {x \, \sqrt[5]{x  \cdots}}}}$$Presh Talwalkar has a very helpful article on this topic that explains how this last result is obtained. See Figure 2.

Figure 2

A few days later, I came across another nested radical problem in a YouTube video. This is the problem: $$ ?=\sqrt{2+\sqrt{2-\sqrt{2 + \sqrt{2 - \cdots}}}}$$The solution is quite different to the previous approach and begins by replacing the ? with a \(y\) and making use of the fact that the nested radical is infinite:$$ \begin{align} y &= \sqrt{2+\sqrt{2-\sqrt{2 + \sqrt{2 - \cdots}}}} \\ &=\sqrt{2+ \sqrt{2 - y}}\end{align}$$Now we have to impose limits on the range of values that \(y\) can take. A little inspections shows that: $$ \sqrt{2} \leq y \leq 2$$Now we can proceed to find \(y\) by squaring both sides twice and then gathering terms together:$$ \begin{align} y^2 &= 2+\sqrt{2-y} \\ y^2-2 &= \sqrt{2-y} \\ (y^2-2)^2 &= 2-y \\ y^4 -4y^2+4 &= 2-y \\ y^4 - 4y^2 +y +2 &= 0 \\ y^2(y^2-4)+y+2 &=0 \\y^2(y+2)(y-2)+y+2 &= 0 \\(y+2)(y^2(y-2)+1) &= 0 \\ (y+2)(y^3-2y^2+1) &= 0     \end{align}$$Now \(y-1\) divides the cubic expression and so the LHS of the quartic equation becomes: $$ (y+2)(y-1)(y^2-y-1) = 0 $$ There are four solutions \(y_1, y_2, y_3\) and \(y_4\): $$ \begin{align} y_1 &= -2 \\ y_2 &= 1 \\ y_3 &= \frac{1+\sqrt{5}}{2} \\ y_4 &= \frac{1-\sqrt{5}}{2} \end{align} $$Due to restrictions placed on \(y\) however, only \(y_3\) is a valid solution and its value of course is \( \phi \). Thus solution is $$ \phi =\sqrt{2+\sqrt{2-\sqrt{2 + \sqrt{2 - \cdots}}}}$$This is not the only nested radical to produce \( \phi \). An even simpler expression is: $$ \phi=\sqrt{1+\sqrt{1+\sqrt{1+\cdots}}}$$See WOLFRAM Demonstrations Link titled Nested Square Root Representation of the Golden Ratio for more details. Another site at iiTutor shows that:$$ \begin{align} 2 &= \sqrt{2+\sqrt{2+\sqrt{2+\cdots}}}\\1 &= \sqrt{2-\sqrt{2-\sqrt{2-\cdots}}} \end{align}$$

Sunday 2 July 2023

A Goodstein Sequence

After watching a YouTube video titled The sequence that grows remarkably large, then drops to zero!, I became aware of Goodstein sequences. These sequences make use of what is called hereditary base-\(n\) notation that Wikipedia explains as follows:

Goodstein sequences are defined in terms of a concept called "hereditary base-''n'' notation". This notation is very similar to usual base-\(n\) positional notation, but the usual notation does not suffice for the purposes of Goodstein's theorem.

In ordinary base-\(n\) notation, where \(n\) is a natural number greater than 1, an arbitrary natural number \(m\) is written as a sum of multiples of powers of \(n\): $$ m = a_k n^k + a_{k-1} n^{k-1} + \cdots + a_0 $$where each coefficient \(a_i\) satisfies \( 0 ≤ a_i<n \), and \(a_k<≠ 0\). For example, in base 2:$$35 = 32 + 2 + 1 = 2^5 + 2^1 + 2^0 $$Thus the base-2 representation of 35 is 100011, which means \(2^5 + 2 + 1\).  Similarly, 100 represented in base-3 is 10201:$$100 = 81 + 18 + 1 = 3^4 + 2 \cdot 3^2 + 3^0 $$Note that the exponents themselves are not written in base-\(n\) notation. For example, the expressions above include \( 2^5\) and \(3^4\), and \(5>2,\) and \(4>3\).

To convert a base-\(n\) representation to hereditary base-\(n\) notation, first rewrite all of the exponents in base-\(n\) notation. Then rewrite any exponents inside the exponents, and continue in this way until every number appearing in the expression (except the bases themselves) has been converted to base-\(n\) notation.

For example, while 35 in ordinary base-2 notation is \(2^5 + 2 + 1\), it is written in hereditary base-2 notation as:$$35 = 2^{2^{2^1}+1}+2^1+1 $$using the fact that \(5 = 2^{2^1} + 1\). Similarly, 100 in hereditary base-3 notation is $$100 = 3^{3^1+1} + 2 \cdot 3^2 + 1$$

The article goes on to explain:

The Goodstein sequence G(\(m\)) of a number \(m\) is a sequence of natural numbers. The first element in the sequence G(\(m\)) is \(m\) itself. To get the second, G(\(m\))(2), write \(m\) in hereditary base-2 notation, change all the 2s to 3s, and then subtract 1 from the result.

This process continues until zero is reached. Let's use \(m=4\) as an example of the process.

\(a(0) = 4 = 2^2\)

\(a(1) = 3^3 - 1 = 26 = 2 \times 3^2 + 2 \times 3 + 2 \)

\(a(2) = 2 \times 4^2 + 2 \times 4 + 2 - 1 = 41 = 2 \times 4^2 + 2 \times 4 + 1 \)

\( a(3) = 2 \times 5^2 + 2 \times 5 + 1 - 1 = 60 = 2 \times 5^2 + 2 \times 5 \)

\(a(4) = 2 \times 6^2 + 2 \times 6 - 1 = 83 = 2 \times 6^2 + 6 + 5\)

\(a(5) = 2 \times 7^2 + 7 + 5 - 1 = 109 \text{ etc.} \)

The above example is taken from the comments to OEIS  A056193

 
 A056193

Goodstein
 sequence starting with 4: to calculate a(\(n\)+1), write a(\(n\)) in the hereditary representation in base \(n\)+2, then bump the base to \(n\)+3, then subtract 1.


The initial members of the sequence (up to 40000) are: 

4, 26, 41, 60, 83, 109, 139, 173, 211, 253, 299, 348, 401, 458, 519, 584, 653, 726, 803, 884, 969, 1058, 1151, 1222, 1295, 1370, 1447, 1526, 1607, 1690, 1775, 1862, 1951, 2042, 2135, 2230, 2327, 2426, 2527, 2630, 2735, 2842, 2951, 3062, 3175, 3290, 3407, 3525, 3645, 3767, 3891, 4017, 4145, 4275, 4407, 4541, 4677, 4815, 4955, 5097, 5241, 5387, 5535, 5685, 5837, 5991, 6147, 6305, 6465, 6627, 6791, 6957, 7125, 7295, 7467, 7641, 7817, 7995, 8175, 8357, 8541, 8727, 8915, 9105, 9297, 9491, 9687, 9885, 10085, 10287, 10491, 10697, 10905, 11115, 11327, 11540, 11755, 11972, 12191, 12412, 12635, 12860, 13087, 13316, 13547, 13780, 14015, 14252, 14491, 14732, 14975, 15220, 15467, 15716, 15967, 16220, 16475, 16732, 16991, 17252, 17515, 17780, 18047, 18316, 18587, 18860, 19135, 19412, 19691, 19972, 20255, 20540, 20827, 21116, 21407, 21700, 21995, 22292, 22591, 22892, 23195, 23500, 23807, 24116, 24427, 24740, 25055, 25372, 25691, 26012, 26335, 26660, 26987, 27316, 27647, 27980, 28315, 28652, 28991, 29332, 29675, 30020, 30367, 30716, 31067, 31420, 31775, 32132, 32491, 32852, 33215, 33580, 33947, 34316, 34687, 35060, 35435, 35812, 36191, 36572, 36955, 37340, 37727, 38116, 38507, 38900, 39295, 39692

I've chosen G(4) because it has this large numbers of members in the range covering my diurnal age. 27316 is the next number that will come up for me in about 200 days time. Most other Goodstein sequences increase very quickly. This is just the briefest of introductions to Goodstein sequences and I don't pretend to understand the following quote from Wikipedia.
In mathematical logic, Goodstein's theorem is a statement about the natural numbers, proved by Reuben Goodstein in 1944, which states that every Goodstein sequence eventually terminates at 0. Kirby and Paris showed that it is unprovable in Peano arithmetic (but it can be proven in stronger systems, such as second-order arithmetic). This was the third example of a true statement that is unprovable in Peano arithmetic, after the examples provided by Gödel's incompleteness theorem and Gerhard Gentzen's 1943 direct proof of the unprovability of ε0-induction in Peano arithmetic. The Paris–Harrington theorem gave another example.

Laurence Kirby and Jeff Paris introduced a graph-theoretic hydra game with behavior similar to that of Goodstein sequences: the "Hydra" (named for the mythological multi-headed Hydra of Lerna) is a rooted tree, and a move consists of cutting off one of its "heads" (a branch of the tree), to which the hydra responds by growing a finite number of new heads according to certain rules. Kirby and Paris proved that the Hydra will eventually be killed, regardless of the strategy that Hercules uses to chop off its heads, though this may take a very long time. Just like for Goodstein sequences, Kirby and Paris showed that it cannot be proven in Peano arithmetic alone.