Tuesday, 23 August 2022

The Pisano Period

I came upon the concept of Pisano periods in a YouTube video titled Alien Primes: The Wall–Sun–Sun Primes, uploaded on August 15th 2022. As explained in Wikipedia:

In number theory, the \(n\)-th Pisano period, written as \( \pi(n) \), is the period with which the sequence of Fibonacci numbers taken modulo \(n\) repeats. Pisano periods are named after Leonardo Pisano, better known as Fibonacci. The existence of periodic functions in Fibonacci numbers was noted by Joseph Louis Lagrange in 1774.

Now the Fibonacci sequence begins: 

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, ...

If we consider the Fibonacci numbers modulo 10 we get a sequence with a period of 60 and thus \( \pi(10) = 60\):

0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 0, 7, 7, 4, 1, 5, 6, 1, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 5, 2, 7, 9, 6, 5, 1, 6, 7, 3, 0, 3, 3, 6, 9, 5, 4, 9, 3, 2, 5, 7, 2, 9, 1, 0, 1, ... (permalink)

The Fibonacci numbers modulo 7 have a period of 16 and thus \( \pi(7) = 16\):

0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, ... (permalink)

Figure 1 shows the Fibonacci numbers modulo 4:

Figure 1: pisano(4) or \( \pi \)(4)=6

Figure 2 shows the first 144 Pisano periods. All are even except for \( \pi(3)=3\).


Figure 2: Source

Even with quite a large modulo like 999, the sequence eventually repeats after 1368 steps:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 598, 586, 185, 771, 956, 728, 685, 414, 100, 514, 614, 129, 743, 872, 616, 489, 106, 595, 701, 297, 998, 296, 295, 591, 886, 478, 365, 843, 209, 53, 262, 315, 577, 892, 470, 363, 833, 197, 31, 228, 259, 487, 746, 234, 980, 215, 196, 411, 607, 19, 626, 645, 272, 917, 190, 108, 298, 406, 704, 111, 815, 926, 742, 669, 412, 82, 494, 576, 71, 647, 718, 366, 85, 451, 536, 987, 524, 512, 37, 549, 586, 136, 722, 858, 581, 440, 22, 462, 484, 946, 431, 378, 809, 188, 997, 186, 184, 370, 554, 924, 479, 404, 883, 288, 172, 460, 632, 93, 725, 818, 544, 363, 907, 271, 179, 450, 629, 80, 709, 789, 499, 289, 788, 78, 866, 944, 811, 756, 568, 325, 893, 219, 113, 332, 445, 777, 223, 1, 224, 225, 449, 674, 124, 798, 922, 721, 644, 366, 11, 377, 388, 765, 154, 919, 74, 993, 68, 62, 130, 192, 322, 514, 836, 351, 188, 539, 727, 267, 994, 262, 257, 519, 776, 296, 73, 369, 442, 811, 254, 66, 320, 386, 706, 93, 799, 892, 692, 585, 278, 863, 142, 6, 148, 154, 302, 456, 758, 215, 973, 189, 163, 352, 515, 867, 383, 251, 634, 885, 520, 406, 926, 333, 260, 593, 853, 447, 301, 748, 50, 798, 848, 647, 496, 144, 640, 784, 425, 210, 635, 845, 481, 327, 808, 136, 944, 81, 26, 107, 133, 240, 373, 613, 986, 600, 587, 188, 775, 963, 739, 703, 443, 147, 590, 737, 328, 66, 394, 460, 854, 315, 170, 485, 655, 141, 796, 937, 734, 672, 407, 80, 487, 567, 55, 622, 677, 300, 977, 278, 256, 534, 790, 325, 116, 441, 557, 998, 556, 555, 112, 667, 779, 447, 227, 674, 901, 576, 478, 55, 533, 588, 122, 710, 832, 543, 376, 919, 296, 216, 512, 728, 241, 969, 211, 181, 392, 573, 965, 539, 505, 45, 550, 595, 146, 741, 887, 629, 517, 147, 664, 811, 476, 288, 764, 53, 817, 870, 688, 559, 248, 807, 56, 863, 919, 783, 703, 487, 191, 678, 869, 548, 418, 966, 385, 352, 737, 90, 827, 917, 745, 663, 409, 73, 482, 555, 38, 593, 631, 225, 856, 82, 938, 21, 959, 980, 940, 921, 862, 784, 647, 432, 80, 512, 592, 105, 697, 802, 500, 303, 803, 107, 910, 18, 928, 946, 875, 822, 698, 521, 220, 741, 961, 703, 665, 369, 35, 404, 439, 843, 283, 127, 410, 537, 947, 485, 433, 918, 352, 271, 623, 894, 518, 413, 931, 345, 277, 622, 899, 522, 422, 944, 367, 312, 679, 991, 671, 663, 335, 998, 334, 333, 667, 1, 668, 669, 338, 8, 346, 354, 700, 55, 755, 810, 566, 377, 943, 321, 265, 586, 851, 438, 290, 728, 19, 747, 766, 514, 281, 795, 77, 872, 949, 822, 772, 595, 368, 963, 332, 296, 628, 924, 553, 478, 32, 510, 542, 53, 595, 648, 244, 892, 137, 30, 167, 197, 364, 561, 925, 487, 413, 900, 314, 215, 529, 744, 274, 19, 293, 312, 605, 917, 523, 441, 964, 406, 371, 777, 149, 926, 76, 3, 79, 82, 161, 243, 404, 647, 52, 699, 751, 451, 203, 654, 857, 512, 370, 882, 253, 136, 389, 525, 914, 440, 355, 795, 151, 946, 98, 45, 143, 188, 331, 519, 850, 370, 221, 591, 812, 404, 217, 621, 838, 460, 299, 759, 59, 818, 877, 696, 574, 271, 845, 117, 962, 80, 43, 123, 166, 289, 455, 744, 200, 944, 145, 90, 235, 325, 560, 885, 446, 332, 778, 111, 889, 1, 890, 891, 782, 674, 457, 132, 589, 721, 311, 33, 344, 377, 721, 99, 820, 919, 740, 660, 401, 62, 463, 525, 988, 514, 503, 18, 521, 539, 61, 600, 661, 262, 923, 186, 110, 296, 406, 702, 109, 811, 920, 732, 653, 386, 40, 426, 466, 892, 359, 252, 611, 863, 475, 339, 814, 154, 968, 123, 92, 215, 307, 522, 829, 352, 182, 534, 716, 251, 967, 219, 187, 406, 593, 0, 593, 593, 187, 780, 967, 748, 716, 465, 182, 647, 829, 477, 307, 784, 92, 876, 968, 845, 814, 660, 475, 136, 611, 747, 359, 107, 466, 573, 40, 613, 653, 267, 920, 188, 109, 297, 406, 703, 110, 813, 923, 737, 661, 399, 61, 460, 521, 981, 503, 485, 988, 474, 463, 937, 401, 339, 740, 80, 820, 900, 721, 622, 344, 966, 311, 278, 589, 867, 457, 325, 782, 108, 890, 998, 889, 888, 778, 667, 446, 114, 560, 674, 235, 909, 145, 55, 200, 255, 455, 710, 166, 876, 43, 919, 962, 882, 845, 728, 574, 303, 877, 181, 59, 240, 299, 539, 838, 378, 217, 595, 812, 408, 221, 629, 850, 480, 331, 811, 143, 954, 98, 53, 151, 204, 355, 559, 914, 474, 389, 863, 253, 117, 370, 487, 857, 345, 203, 548, 751, 300, 52, 352, 404, 756, 161, 917, 79, 996, 76, 73, 149, 222, 371, 593, 964, 558, 523, 82, 605, 687, 293, 980, 274, 255, 529, 784, 314, 99, 413, 512, 925, 438, 364, 802, 167, 969, 137, 107, 244, 351, 595, 946, 542, 489, 32, 521, 553, 75, 628, 703, 332, 36, 368, 404, 772, 177, 949, 127, 77, 204, 281, 485, 766, 252, 19, 271, 290, 561, 851, 413, 265, 678, 943, 622, 566, 189, 755, 944, 700, 645, 346, 991, 338, 330, 668, 998, 667, 666, 334, 1, 335, 336, 671, 8, 679, 687, 367, 55, 422, 477, 899, 377, 277, 654, 931, 586, 518, 105, 623, 728, 352, 81, 433, 514, 947, 462, 410, 872, 283, 156, 439, 595, 35, 630, 665, 296, 961, 258, 220, 478, 698, 177, 875, 53, 928, 981, 910, 892, 803, 696, 500, 197, 697, 894, 592, 487, 80, 567, 647, 215, 862, 78, 940, 19, 959, 978, 938, 917, 856, 774, 631, 406, 38, 444, 482, 926, 409, 336, 745, 82, 827, 909, 737, 647, 385, 33, 418, 451, 869, 321, 191, 512, 703, 216, 919, 136, 56, 192, 248, 440, 688, 129, 817, 946, 764, 711, 476, 188, 664, 852, 517, 370, 887, 258, 146, 404, 550, 954, 505, 460, 965, 426, 392, 818, 211, 30, 241, 271, 512, 783, 296, 80, 376, 456, 832, 289, 122, 411, 533, 944, 478, 423, 901, 325, 227, 552, 779, 332, 112, 444, 556, 1, 557, 558, 116, 674, 790, 465, 256, 721, 977, 699, 677, 377, 55, 432, 487, 919, 407, 327, 734, 62, 796, 858, 655, 514, 170, 684, 854, 539, 394, 933, 328, 262, 590, 852, 443, 296, 739, 36, 775, 811, 587, 399, 986, 386, 373, 759, 133, 892, 26, 918, 944, 863, 808, 672, 481, 154, 635, 789, 425, 215, 640, 855, 496, 352, 848, 201, 50, 251, 301, 552, 853, 406, 260, 666, 926, 593, 520, 114, 634, 748, 383, 132, 515, 647, 163, 810, 973, 784, 758, 543, 302, 845, 148, 993, 142, 136, 278, 414, 692, 107, 799, 906, 706, 613, 320, 933, 254, 188, 442, 630, 73, 703, 776, 480, 257, 737, 994, 732, 727, 460, 188, 648, 836, 485, 322, 807, 130, 937, 68, 6, 74, 80, 154, 234, 388, 622, 11, 633, 644, 278, 922, 201, 124, 325, 449, 774, 224, 998, 223, 222, 445, 667, 113, 780, 893, 674, 568, 243, 811, 55, 866, 921, 788, 710, 499, 210, 709, 919, 629, 549, 179, 728, 907, 636, 544, 181, 725, 906, 632, 539, 172, 711, 883, 595, 479, 75, 554, 629, 184, 813, 997, 811, 809, 621, 431, 53, 484, 537, 22, 559, 581, 141, 722, 863, 586, 450, 37, 487, 524, 12, 536, 548, 85, 633, 718, 352, 71, 423, 494, 917, 412, 330, 742, 73, 815, 888, 704, 593, 298, 891, 190, 82, 272, 354, 626, 980, 607, 588, 196, 784, 980, 765, 746, 512, 259, 771, 31, 802, 833, 636, 470, 107, 577, 684, 262, 946, 209, 156, 365, 521, 886, 408, 295, 703, 998, 702, 701, 404, 106, 510, 616, 127, 743, 870, 614, 485, 100, 585, 685, 271, 956, 228, 185, 413, 598, 12, 610, 622, 233, 855, 89, 944, 34, 978, 13, 991, 5, 996, 2, 998, 1, 0, 1, ... (permalink)

Of course, you don't need to start with 0 and 1 but the period ends up being the same regardless provided the starting numbers are less than the modulus, or so it appears after an admittedly brief investigation.

Let's look at some properties of this pisano period function. If \(m\) and \(n\) are coprime, then \( \pi(mn) \) is the least common multiple of \( \pi(m) \) and \( \pi(n) \). For example, \( \pi(55)=20\) while \( \pi(5) \times \pi(11)=\text{lcm}(20, 10)=20\) where 5 and 11 are coprime. To quote from the Wikipedia article: " ... the study of Pisano periods may be reduced to that of Pisano periods of prime powers \(q = p^k\), for \(k \geq 1\)". 

Furthermore, to continue quoting:

If \(p\) is prime, \( \pi(p^k)\) divides \(p^{k–1} \times  \pi(p)\). It is unknown if  \(\pi (p^{k})=p^{k-1}\pi (p)\) for every prime (p\) and integer \(k \gt 1\). Any prime \(p\) providing a counterexample would necessarily be a Wall–Sun–Sun prime ... So the study of Pisano periods may be further reduced to that of Pisano periods of primes.

Take 125 as an example. \( \pi(125)=500\). Now \(125=5^3\) and so \(500\) should divide \(5^2 \times \pi(5) = 25 \times 20 = 500\) which it does. The video link listed at the start of this post discusses the Wall-Sun-Sun primes.

Thursday, 18 August 2022

Perimeters and Pythagorean Triples

My diurnal age today is 26800 and one of the properties of this number is that it's a member of OEIS A010814: perimeters of integer-sided right triangles. Such numbers are relatively frequent (almost 22%) as can be seen in the data below:

5824th member is 26780

5825th member is 26784

5826th member is 26790

5827th member is 26796

5828th member is 26800

5829th member is 26808

5830th member is 26810

5831th member is 26814

5832th member is 26820

As I discovered however, it's not easy to find the sides of the triangles with these perimeters. The \(m,n\) method for generating primitive Pythagorean triples is shown in Figure 1:


Figure 1

Thus we have the shortest side \(a=m^2-n^2\) with \(m \gt n\) with \(b=2mn\) and the hypotenuse \(c=m^2+n^2\) where \(m\) and \(n\) are integers. Using these formulae in SageMathCell to generate the triples and associated perimeters, I found that the calculation timed out once the perimeters got even moderately large (far smaller than 26800 for example). Fortunately, there was a web resource that I could call upon. See Figure 2:


Figure 2: https://r-knott.surrey.ac.uk/Pythag/pythag.html

As can be seen, the calculator spits out a plethora of data including the perimeter. It turns out that there are three different right angled triangles with a perimeter of 26800: (6800, 8844, 11156), (5360, 10050, 11390) and (4355, 10800, 11645). If the triangle's dimensions are a multiple of those of a primitive triangle then this is shown as well. This website is certainly the ultimate resource for information about right-angled triangles.

Sometimes there is only one right-angled triangle with a given perimeter. For example, the one triangle with perimeter 26814 has dimensions (3052, 11685, 12077) and it is primitive.  Perimeters that arise from only one triangle form OEIS A098714only one Pythagorean triangle of this perimeter exists. 26814 is the 2944th member of this sequence and so such numbers make up slightly under 11% of all numbers (at least in the range up to 26814).

The subsite referenced in Figure 2 is maintained by a Dr. Ron Knott and the main site contains links to many other interesting mathematical concepts. Here is some biographical information:

Ph.D (1980, University of Nottingham), M.Sc (1976, University of Nottingham), B.Sc (Pure Maths, University of Wales), C.Math, FIMA, C.Eng, MBCS, CITP
Visiting Fellow, Department of Mathematics,
formerly Lecturer in Mathematics and Computing Science Departments (1979-1998)
Faculty of Electronics and Physical Sciences,
University of Surrey,

Contact me initially by Email: ronknott at mac dot com

I was a lecturer in the Departments of Mathematics and Computing Science at the University of Surrey, Guildford, UK, for 19 years until September 1998 when I left to start working for myself making web pages for maths education sites.
I now give mathematics talks to students at schools and universities as well as to general audiences, teachers' conferences and Science Festivals on topics of the web pages above, especially the Fibonacci Numbers and why they occur so often in plants, Fun with Fractions, As Easy As Pi etc.

I now live in Bolton, near Manchester in NW England.

Friday, 12 August 2022

Skewed Ellipses

My diurnal age today is 26793 days and one of the properties of this number is that it's a member of OEIS A118886:


 A118886

Numbers expressible as \(x^2 + xy + y^2 \), \(0 \leq x \leq y\), in 2 or more ways.      


So in the case of 26793, this means that there are at least two values for \( (x,y) \) such that \(x^2 + xy + y^2 =26793\). It turns out that there are exactly two such values and they are (9, 159) and (93, 96). It's easy to forget that the equation  \(x^2 + xy + y^2 =26793\) is that of an ellipse that is skewed with respect to the \(x\) and \(y\) axes. In other words, it's not your more usual  \(x^2 + y^2 =a^2\) because the \(xy\) term skews it. 

Figure 1 shows the graph along with the two points that have positive integer values: A = (9, 159) and B = (93, 96).


Figure 1

These sorts of ellipses \(x^2 + xy + y^2 =a^2\) have axes of symmetry of \(y=x\) and \(y=-x\) and \( \pm a\) are the intercepts on the \(x\) and \(y\) axes. In the graph shown in Figure 1, the intercepts are \( \pm \sqrt{26793} \approx 163.7 \).

Of course, there are other points on the graph that have integer values but some of these are negative and so are not included in OEIS A118886, Without the condition that \( x \leq y), other points will arise as well. These full range of eight points is shown in Figure 2 and the graph with points added in Figure 3.


Figure 2


Figure 3

Now up to 27000, there are 2043 numbers that qualify for membership in  OEIS A118886 and that represents about 7.6%. However, there are only 69 numbers that are square numbers as well meaning that the intercepts of the \(x\) and \(y\) axes have integer values. These values are:

49, 169, 196, 361, 441, 676, 784, 961, 1225, 1369, 1444, 1521, 1764, 1849, 2401, 2704, 3136, 3249, 3721, 3844, 3969, 4225, 4489, 4900, 5329, 5476, 5776, 5929, 6084, 6241, 7056, 7396, 8281, 8649, 9025, 9409, 9604, 10609, 10816, 11025, 11881, 12321, 12544, 12996, 13689, 14161, 14884, 15376, 15876, 16129, 16641, 16900, 17689, 17956, 19321, 19600, 20449, 21316, 21609, 21904, 22801, 23104, 23716, 24025, 24336, 24649, 24964, 25921, 26569

Take 26569 as an example (see permalink). We have \(26569=159^2\) and the two \( (x,y) \) that satisfy  OEIS A118886 are (0,163) and (75, 112). The full range of ten points are:

(-163, 0), (-163, 163), (-112, -75), (-75, -112), (0, -163), (0, 163), (75, 112), (112, 75), (163, -163) (163, 0)

With these skewed ellipses, if the \(a^2\) in \(x^2 + xy + y^2 =a^2\) is a square number, then there are always another two integer-valued points, \( (a, -a) \) and \( (-a,a) \), compared to non-square numbers. 

Up to 27000, the maximum number of points that satisfy \( 0 \leq x \leq y \) is six. The numbers are 12103, 19747, 22477 and 23569. Using 12103 as an example, the points are (2, 109), (21, 98), (27, 94), (34, 89), (49, 77) and (61, 66). Even extending the range to 100,000, there are no numbers that yield seven points which is not surprising considering the symmetry of the graph. 

There are however, four numbers that yield eight points and these are 53599, 63973, 74347 and 84721. Using, 53599 as an example the eight points are (3, 230), (25, 218), (43, 207), (58, 197), (85, 177), (90, 173), (102, 163) and (122, 145).

Thursday, 4 August 2022

Variations of Erase and Triple

In my previous post, I looked at the traditional "erase and triple" protocol which eliminates all redundant digits in a number or, if there are none, triples the number. For example, consider 112:

112 --> 2 --> 6 --> 18 --> 54 --> 4 --> 12 --> 1 --> 3 --> 0

In that post, I looked at record heights and record lengths reached by numbers when this protocol is repeatedly applied. In this post, I'll propose a variation of the protocol. Instead of the erasure of repeated digits, I'll remove any prime digits (2, 3, 5 and 7). If there are no prime digits, then the number will be tripled. Let's use 112 again as an example:

112 --> 11 --> 33 --> 0

Let's try 66 with no prime digits and see what happens to this number:

66 --> 198 --> 594 --> 94 --> 282 --> 8 --> 24 --> 4 -->  12 --> 1 --> 3 --> 0

A pattern seems to be emerging. Let's test out what the record trajectory lengths are for the first 500,000 numbers (permalink):

Erase prime digits or multiply by 3: record breakers

 1 --> 3 --> [1, 3, 0]

4 --> 5 --> [4, 12, 1, 3, 0]

6 --> 8 --> [6, 18, 54, 4, 12, 1, 3, 0]

16 --> 9 --> [16, 48, 144, 432, 4, 12, 1, 3, 0]

66 --> 12 --> [66, 198, 594, 94, 282, 8, 24, 4, 12, 1, 3, 0]

166 --> 13 --> [166, 498, 1494, 4482, 448, 1344, 144, 432, 4, 12, 1, 3, 0]

666 --> 16 --> [666, 1998, 5994, 994, 2982, 98, 294, 94, 282, 8, 24, 4, 12, 1, 3, 0]

1666 --> 17 --> [1666, 4998, 14994, 44982, 4498, 13494, 1494, 4482, 448, 1344, 144, 432, 4, 12, 1, 3, 0]

6666 --> 20 --> [6666, 19998, 59994, 9994, 29982, 998, 2994, 994, 2982, 98, 294, 94, 282, 8, 24, 4, 12, 1, 3, 0]

16666 --> 21 --> [16666, 49998, 149994, 449982, 44998, 134994, 14994, 44982, 4498, 13494, 1494, 4482, 448, 1344, 144, 432, 4, 12, 1, 3, 0]

66666 --> 24 --> [66666, 199998, 599994, 99994, 299982, 9998, 29994, 9994, 29982, 998, 2994, 994, 2982, 98, 294, 94, 282, 8, 24, 4, 12, 1, 3, 0]

166666 --> 25 --> [166666, 499998, 1499994, 4499982, 449998, 1349994, 149994, 449982, 44998, 134994, 14994, 44982, 4498, 13494, 1494, 4482, 448, 1344, 144, 432, 4, 12, 1, 3, 0]

The numbers are shown first, followed by length of their trajectories and then the trajectories themselves. It can be seen that 66 is one of record breaking numbers. Apart from 4, all the numbers contain only 1 and 6 as digits. Figure 1 shows the graph of the trajectory of 166666. 


Figure 1: permalink

As for record heights, it's clear that these will increase as the numbers get larger because any number not containing any prime digits will immediately be trebled. After 166666 with a trajectory length of 25, there is big gap to the next record length which is attained by 666666 with a length of 28. The trajectory is:

666666, 1999998, 5999994, 999994, 2999982, 99998, 299994, 99994, 299982, 9998, 29994, 9994, 29982, 998, 2994, 994, 2982, 98, 294, 94, 282, 8, 24, 4, 12, 1, 3, 0

The trajectory is shown in Figure 2 and is very similar to that of 166666 shown in Figure 1.



Figure 2: permalink

All the numbers that I've checked end in 0 mostly via 3 but not always. For example the trajectory of 1948 is:

1948 --> 5844 --> 844 --> 2532 --> 0

The end result always seems to be zero. The next thing to logically explore is what happens when we change the multiplier of the number from 3 to some other number. Let's start with 2 and work our way up from 4 to 11, showing in every case the record breakers up to 500,000.

Erase prime digits or multiply by 2: record breakers

1 --> 3 --> [1, 2, 0]

4 --> 5 --> [4, 8, 16, 32, 0]

9 --> 8 --> [9, 18, 36, 6, 12, 1, 2, 0]

29 --> 9 --> [29, 9, 18, 36, 6, 12, 1, 2, 0]

46 --> 10 --> [46, 92, 9, 18, 36, 6, 12, 1, 2, 0]

49 --> 12 --> [49, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

149 --> 13 --> [149, 298, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

498 --> 16 --> [498, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

999 --> 18 --> [999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

2999 --> 19 --> [2999, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

4996 --> 20 --> [4996, 9992, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

4999 --> 22 --> [4999, 9998, 19996, 39992, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

14999 --> 23 --> [14999, 29998, 9998, 19996, 39992, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

49998 --> 26 --> [49998, 99996, 199992, 19999, 39998, 9998, 19996, 39992, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

99999 --> 28 --> [99999, 199998, 399996, 99996, 199992, 19999, 39998, 9998, 19996, 39992, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

299999 --> 29 --> [299999, 99999, 199998, 399996, 99996, 199992, 19999, 39998, 9998, 19996, 39992, 999, 1998, 3996, 996, 1992, 199, 398, 98, 196, 392, 9, 18, 36, 6, 12, 1, 2, 0]

Erase prime digits or multiply by 4: record breakers

1 --> 8 --> [1, 4, 16, 64, 256, 6, 24, 4]
9 --> 9 --> [9, 36, 6, 24, 4, 16, 64, 256, 6] 
11 --> 10 --> [11, 44, 176, 16, 64, 256, 6, 24, 4, 16]
41 --> 12 --> [41, 164, 656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
99 --> 13 --> [99, 396, 96, 384, 84, 336, 6, 24, 4, 16, 64, 256, 6]
101 --> 16 --> [101, 404, 1616, 6464, 25856, 86, 344, 44, 176, 16, 64, 256, 6, 24, 4, 16]
104 --> 17 --> [104, 416, 1664, 6656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
604 --> 18 --> [604, 2416, 416, 1664, 6656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
901 --> 20 --> [901, 3604, 604, 2416, 416, 1664, 6656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
2901 --> 21 --> [2901, 901, 3604, 604, 2416, 416, 1664, 6656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
10401 --> 23 --> [10401, 41604, 166416, 665664, 66664, 266656, 6666, 26664, 6664, 26656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
41666 --> 24 --> [41666, 166664, 666656, 66666, 266664, 66664, 266656, 6666, 26664, 6664, 26656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
90104 --> 26 --> [90104, 360416, 60416, 241664, 41664, 166656, 16666, 66664, 266656, 6666, 26664, 6664, 26656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64] 
104166 --> 27 --> [104166, 416664, 1666656, 166666, 666664, 2666656, 66666, 266664, 66664, 266656, 6666, 26664, 6664, 26656, 666, 2664, 664, 2656, 66, 264, 64, 256, 6, 24, 4, 16, 64]
Erase prime digits or multiply by 5: record breakers

 1 --> 3 --> [1, 5, 0]

8 --> 4 --> [8, 40, 200, 0] 
9 --> 5 --> [9, 45, 4, 20, 0] 
18 --> 6 --> [18, 90, 450, 40, 200, 0] 
19 --> 7 --> [19, 95, 9, 45, 4, 20, 0
129 --> 8 --> [129, 19, 95, 9, 45, 4, 20, 0] 
199 --> 9 --> [199, 995, 99, 495, 49, 245, 4, 20, 0] 
1299 --> 10 --> [1299, 199, 995, 99, 495, 49, 245, 4, 20, 0] 
1999 --> 11 --> [1999, 9995, 999, 4995, 499, 2495, 49, 245, 4, 20, 0] 
12999 --> 12 --> [12999, 1999, 9995, 999, 4995, 499, 2495, 49, 245, 4, 20, 0] 
19999 --> 13 --> [19999, 99995, 9999, 49995, 4999, 24995, 499, 2495, 49, 245, 4, 20, 0] 
129999 --> 14 --> [129999, 19999, 99995, 9999, 49995, 4999, 24995, 499, 2495, 49, 245, 4, 20, 0]
199999 --> 15 --> [199999, 999995, 99999, 499995, 49999, 249995, 4999, 24995, 499, 2495, 49, 245, 4, 20, 0]
Erase prime digits or multiply by 6: record breakers

1 --> 4 --> [1, 6, 36, 6]

8 --> 6 --> [8, 48, 288, 88, 528, 8]

11 --> 8 --> [11, 66, 396, 96, 576, 6, 36, 6]

18 --> 12 --> [18, 108, 648, 3888, 888, 5328, 8, 48, 288, 88, 528, 8]

68 --> 15 --> [68, 408, 2448, 448, 2688, 688, 4128, 418, 2508, 8, 48, 288, 88, 528, 8]

69 --> 16 --> [69, 414, 2484, 484, 2904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

144 --> 21 --> [144, 864, 5184, 184, 1104, 6624, 664, 3984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

194 --> 26 --> [194, 1164, 6984, 41904, 251424, 144, 864, 5184, 184, 1104, 6624, 664, 3984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

1199 --> 28 --> [1199, 7194, 194, 1164, 6984, 41904, 251424, 144, 864, 5184, 184, 1104, 6624, 664, 3984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

1699 --> 35 --> [1699, 10194, 61164, 366984, 66984, 401904, 2411424, 41144, 246864, 46864, 281184, 81184, 487104, 48104, 288624, 8864, 53184, 184, 1104, 6624, 664, 3984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

12699 --> 36 --> [12699, 1699, 10194, 61164, 366984, 66984, 401904, 2411424, 41144, 246864, 46864, 281184, 81184, 487104, 48104, 288624, 8864, 53184, 184, 1104, 6624, 664, 3984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

101199 --> 37 --> [101199, 607194, 60194, 361164, 61164, 366984, 66984, 401904, 2411424, 41144, 246864, 46864, 281184, 81184, 487104, 48104, 288624, 8864, 53184, 184, 1104, 6624, 664, 3984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4]

184164 --> 38 --> [184164, 1104984, 6629904, 669904, 4019424, 401944, 2411664, 411664, 2469984, 469984, 2819904, 819904, 4919424, 491944, 2951664, 91664, 549984, 49984, 299904, 99904, 599424, 9944, 59664, 9664, 57984, 984, 5904, 904, 5424, 44, 264, 64, 384, 84, 504, 4, 24, 4] 

Erase prime digits or multiply by 7: record breakers

1 --> 3 --> [1, 7, 0]

4 --> 7 --> [4, 28, 8, 56, 6, 42, 4]

9 --> 9 --> [9, 63, 6, 42, 4, 28, 8, 56, 6]

14 --> 13 --> [14, 98, 686, 4802, 480, 3360, 60, 420, 40, 280, 80, 560, 60]

84 --> 14 --> [84, 588, 88, 616, 4312, 41, 287, 8, 56, 6, 42, 4, 28, 8]

184 --> 15 --> [184, 1288, 188, 1316, 116, 812, 81, 567, 6, 42, 4, 28, 8, 56, 6]

406 --> 16 --> [406, 2842, 84, 588, 88, 616, 4312, 41, 287, 8, 56, 6, 42, 4, 28, 8]

988 --> 17 --> [988, 6916, 48412, 4841, 33887, 88, 616, 4312, 41, 287, 8, 56, 6, 42, 4, 28, 8]

1404 --> 19 --> [1404, 9828, 988, 6916, 48412, 4841, 33887, 88, 616, 4312, 41, 287, 8, 56, 6, 42, 4, 28, 8]

4164 --> 21 --> [4164, 29148, 9148, 64036, 6406, 44842, 4484, 31388, 188, 1316, 116, 812, 81, 567, 6, 42, 4, 28, 8, 56, 6]

9964 --> 22 --> [9964, 69748, 6948, 48636, 4866, 34062, 406, 2842, 84, 588, 88, 616, 4312, 41, 287, 8, 56, 6, 42, 4, 28, 8]

29964 --> 23 --> [29964, 9964, 69748, 6948, 48636, 4866, 34062, 406, 2842, 84, 588, 88, 616, 4312, 41, 287, 8, 56, 6, 42, 4, 28, 8]

99144 --> 26 --> [99144, 694008, 4858056, 48806, 341642, 4164, 29148, 9148, 64036, 6406, 44842, 4484, 31388, 188, 1316, 116, 812, 81, 567, 6, 42, 4, 28, 8, 56, 6]

299144 --> 27 --> [299144, 99144, 694008, 4858056, 48806, 341642, 4164, 29148, 9148, 64036, 6406, 44842, 4484, 31388, 188, 1316, 116, 812, 81, 567, 6, 42, 4, 28, 8, 56, 6] 

Erase prime digits or multiply by 8: record breakers

1 --> 5 --> [1, 8, 64, 512, 1]

6 --> 6 --> [6, 48, 384, 84, 672, 6]

14 --> 8 --> [14, 112, 11, 88, 704, 4, 32, 0]

16 --> 11 --> [16, 128, 18, 144, 1152, 11, 88, 704, 4, 32, 0]

81 --> 13 --> [81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0]

281 --> 14 --> [281, 81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0]

1019 --> 15 --> [1019, 8152, 81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0]

6018 --> 16 --> [6018, 48144, 385152, 81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0]

8001 --> 18 --> [8001, 64008, 512064, 1064, 8512, 81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0]

16101 --> 19 --> [16101, 128808, 18808, 150464, 10464, 83712, 81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0]

100019 --> 20 --> [100019, 800152, 8001, 64008, 512064, 1064, 8512, 81, 648, 5184, 184, 1472, 14, 112, 11, 88, 704, 4, 32, 0] 

Erase prime digits or multiply by 9: record breakers

1 --> 5 --> [1, 9, 81, 729, 9]

11 --> 6 --> [11, 99, 891, 8019, 72171, 11]

14 --> 25 --> [14, 126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

124 --> 26 --> [124, 14, 126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

198 --> 27 --> [198, 1782, 18, 162, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

666 --> 30 --> [666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

1184 --> 32 --> [1184, 10656, 1066, 9594, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

6996 --> 34 --> [6996, 62964, 6964, 62676, 666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

26996 --> 35 --> [26996, 6996, 62964, 6964, 62676, 666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

40444 --> 36 --> [40444, 363996, 6996, 62964, 6964, 62676, 666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

44916 --> 38 --> [44916, 404244, 40444, 363996, 6996, 62964, 6964, 62676, 666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

49904 --> 40 --> [49904, 449136, 44916, 404244, 40444, 363996, 6996, 62964, 6964, 62676, 666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6]

249904 --> 41 --> [249904, 49904, 449136, 44916, 404244, 40444, 363996, 6996, 62964, 6964, 62676, 666, 5994, 994, 8946, 80514, 8014, 72126, 16, 144, 1296, 196, 1764, 164, 1476, 146, 1314, 114, 1026, 106, 954, 94, 846, 7614, 614, 5526, 6, 54, 4, 36, 6] 

Erase prime digits or multiply by 11: record breakers

1 --> 4 --> [1, 11, 121, 11]

4 --> 5 --> [4, 44, 484, 5324, 4]

8 --> 11 --> [8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

19 --> 12 --> [19, 209, 9, 99, 1089, 11979, 1199, 13189, 1189, 13079, 109, 1199]

48 --> 13 --> [48, 528, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

68 --> 15 --> [68, 748, 48, 528, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

81 --> 20 --> [81, 891, 9801, 107811, 10811, 118921, 11891, 130801, 10801, 118811, 1306921, 10691, 117601, 11601, 127611, 1611, 17721, 11, 121, 11]

98 --> 23 --> [98, 1078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

298 --> 24 --> [298, 98, 1078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

848 --> 25 --> [848, 9328, 98, 1078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

2848 --> 26 --> [2848, 848, 9328, 98, 1078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

4198 --> 27 --> [4198, 46178, 4618, 50798, 98, 1078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

8018 --> 32 --> [8018, 88198, 970178, 9018, 99198, 1091178, 109118, 1200298, 10098, 111078, 11108, 122188, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

14918 --> 35 --> [14918, 164098, 1805078, 18008, 198088, 2178968, 18968, 208648, 8648, 95128, 918, 10098, 111078, 11108, 122188, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

80998 --> 36 --> [80998, 890978, 89098, 980078, 98008, 1078088, 108088, 1188968, 13078648, 108648, 1195128, 11918, 131098, 11098, 122078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

81408 --> 37 --> [81408, 895488, 89488, 984368, 98468, 1083148, 108148, 1189628, 118968, 1308648, 108648, 1195128, 11918, 131098, 11098, 122078, 108, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

84088 --> 41 --> [84088, 924968, 94968, 1044648, 11491128, 1149118, 12640298, 164098, 1805078, 18008, 198088, 2178968, 18968, 208648, 8648, 95128, 918, 10098, 111078, 11108, 122188, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198]

284088 --> 42 --> [284088, 84088, 924968, 94968, 1044648, 11491128, 1149118, 12640298, 164098, 1805078, 18008, 198088, 2178968, 18968, 208648, 8648, 95128, 918, 10098, 111078, 11108, 122188, 1188, 13068, 1068, 11748, 1148, 12628, 168, 1848, 20328, 8, 88, 968, 10648, 117128, 1118, 12298, 198, 2178, 18, 198] 

Thus all these "variants" have trajectories that either terminate in 0 or they loop. For example, 284088 has a trajectory of length 42 and it ends in a loop (198 --> 2178 --> 18 --> 198). Figure 3 shows the trajectory of 284088:


Figure 4: permalink

The original erase or triple and the variants analysed in this post all have one thing in common. The starting number is decreased in some way according to a certain rule e.g. remove duplicate digits or remove prime digits. If the rule cannot be applied, then the number is increased in some way e.g. it is tripled. I briefly tested an alternative rule to tripling, specifically squaring the number, but found that the resultant numbers quickly grew without bound.

It would be nice to find a balance between the rule that decreases the number and the rule that increases it, so that sometimes the trajectory terminates while in other cases it does not. Clearly with the erase or triple protocol, the resulting number chain quickly terminates because of a loop or a number being reached that causes a complete or almost complete collapse because all or most of its digits are repeated or all or most of its digits are prime.

Even multiplying by a relatively large number eventually leads to a termination. For example, multiply by 99 when there are no prime digits and use 1 as the example. Here is the trajectory that consists of 238 steps and ends in a loop:

1, 99, 9801, 970299, 9099, 900801, 89179299, 891999, 88307901, 880901, 87209199, 809199, 80110701, 8011001, 793089099, 9089099, 899820801, 89980801, 8908099299, 890809999, 88190189901, 8730828800199, 8088800199, 800791219701, 800911901, 79290278199, 9908199, 980911701, 98091101, 9711018999, 911018999, 90190880901, 8928897209199, 8988909199, 889902010701, 8899001001, 881001099099, 87219108810801, 819108810801, 81091772269299, 810916999, 80280782901, 80808901, 8000081199, 792008038701, 90080801, 8917999299, 89199999, 8830799901, 88099901, 8721890199, 81890199, 8107129701, 8101901, 802088199, 80088199, 7928731701, 98101, 9711999, 911999, 90287901, 908901, 89981199, 8908138701, 89081801, 8819098299, 881909899, 87309080001, 809080001, 80098920099, 8009890099, 792979119801, 999119801, 98912860299, 989186099, 97929423801, 9994801, 989485299, 9894899, 979595001, 999001, 98901099, 9791208801, 99108801, 9811771299, 9811199, 971308701, 910801, 90169299, 9016999, 892682901, 8968901, 887921199, 8891199, 880228701, 880801, 87199299, 819999, 81179901, 8119901, 803870199, 8080199, 799939701, 999901, 98990199, 9800029701, 98000901, 9702089199, 90089199, 8918830701, 89188001, 8829612099, 88961099, 8807148801, 880148801, 87134731299, 814199, 80605701, 806001, 79794099, 994099, 98415801, 9841801, 974338299, 94899, 9395001, 99001, 9801099, 970308801, 9008801, 891871299, 8918199, 882901701, 8890101, 880119999, 87131879901, 81189901, 8037800199, 80800199, 7999219701, 9991901, 989198199, 97930621701, 9906101, 980703999, 9800999, 970298901, 9098901, 900791199, 90091199, 8919028701, 89190801, 8829889299, 88988999, 8809910901, 872181179199, 818119199, 80993800701, 809980001, 80188020099, 8018800099, 793861209801, 986109801, 97624870299, 9648099, 955161801, 9161801, 907018299, 9001899, 891188001, 88227612099, 8861099, 877248801, 848801, 84031299, 840199, 83179701, 81901, 8108199, 802711701, 801101, 79308999, 908999, 89990901, 8909099199, 882000820701, 880008001, 87120792099, 8109099, 802800801, 80800801, 7999279299, 999999, 98999901, 9800990199, 970298029701, 90980901, 9007109199, 900109199, 89110810701, 8911081001, 882197019099, 8819019099, 873082890801, 808890801, 80080189299, 8008018999, 792793880901, 99880901, 9888209199, 988809199, 97892110701, 98911001, 9792189099, 99189099, 9819720801, 98190801, 9720889299, 9088999, 899810901, 89081279199, 890819199, 88191100701, 8819110001, 873091890099, 8091890099, 801097119801, 80109119801, 7930802860299, 908086099, 89900523801, 89900801, 8900179299, 89001999, 8811197901, 881119901, 87230870199, 8080199

These ruminations are fertile grounds for further posts involving new rules.

Tuesday, 2 August 2022

Erase or Triple Protocol

There's always something new to discover under the mathematical sun and today I encountered an interesting protocol that can be applied to numbers. It works as follows:

The "Erase or triple" protocol describes how to transform an integer \(K\) into an integer \(L\): if \(K\) has 2 or more identical digits, erase them to get \(L\) (1201331 becomes 20); if \(K\) has no duplicate digits, triple \(K\) to get \(L\) (20 becomes 60). Some integers disappear immediately (like 11, 2002 or 1919188), other enter into a loop if you apply this protocol to the successive results. Link.

My diurnal age today was 26784, a number that is a member of OEIS A300150: "erase or triple": list of the successive integers that produce the next "altitude" record. The initial numbers and their associated "altitude" records are as follows (the numbers are shown first in bold and records second - permalink):

(1, 17010), (10, 65610), (23, 121743), (176, 1154736), (1760, 1283040), (2183, 1591407), (2640, 5773680), (23976, 5826168), (24056, 5845608), (26784, 6508512), (29087, 7068141), (29701, 7217343), (30715, 7463745), (31456, 7643808), (32145, 7811235)

Thus the numbers associated with these maximum values are:

1  10  23  176  1760  2183  2640  23976  24056  26784  29087  29701  30715  31456  32145  

 Let's take 26784 as an example. It's trajectory is as follows:

26784, 80352, 241056, 723168, 2169504, 6508512, 60812, 182436, 547308, 1641924, 692, 2076, 6228, 68, 204, 612, 1836, 5508, 8, 24, 72, 216, 648, 1944, 19, 57, 171, 7, 21, 63, 189, 567, 1701, 70, 210, 630, 1890, 5670, 17010, 7

Note that trajectory enters a loop once 7 is reached for the second time. The trajectory has a length of 39 steps. It's graph is shown in Figure 1:


Figure 1: permalink

176, from the above list of record breakers, is an example of a number that eventually reaches 0. It's trajectory is as follows:

176, 528, 1584, 4752, 14256, 42768, 128304, 384912, 1154736, 54736, 164208, 492624, 96, 288, 2, 6, 18, 54, 162, 486, 1458, 4374, 37, 111, 0

The graph of its trajectory is shown in Figure 2 and consists of 25 steps: 


Figure 2: permalink

23, from the above list of record breakers, is an example of a number that ends in an 89 loop. It's trajectory of length 21 steps is as follows:

23, 69, 207, 621, 1863, 5589, 89, 267, 801, 2403, 7209, 21627, 167, 501, 1503, 4509, 13527, 40581, 121743, 2743, 8229, 89

The graph of its trajectory is shown in Figure 3:


Figure 3: permalink

29701, from the above list of record breakers, is an example of a number that ends in a 5 loop. It's trajectory, of length 22 steps, is as follows:

29701, 89103, 267309, 801927, 2405781, 7217343, 214, 642, 1926, 5778, 58, 174, 522, 5, 15, 45, 135, 405, 1215, 25, 75, 225, 5

The graph of its trajectory is shown in Figure 4:


Figure 4: permalink

For any number, there are only four possible end results for its trajectory: either it reaches 0 or it enters a 5, 7 or 89 loop. Returning to OEIS A300150: "erase or triple": list of the successive integers that produce the next "altitude" record. The sequence is finite and has 628 terms, with a(628) = 3291768054 (pandigital); a(628) reaches the maximum possible "altitude" 29625912486.

When dealing with trajectories, we are interested in the length of the trajectories as well as the maxima and so a reasonable question to ask is what numbers produce trajectories of record length? It turns out that these are the records up to 40,000 with numbers first in bold and trajectory lengths following (permalink):
[(1, 29), (16, 32), (26, 35), (56, 37), (134, 39), (218, 41), (241, 45), (871, 46), (8059, 47), (14957, 48)]

Thus the numbers associated with the record trajectory lengths are:

1  16  26  56  134  218   241  871   8059  14957 

 The trajectory of 14957, with a trajectory length of 48, is as follows:

14957, 44871, 871, 2613, 7839, 23517, 70551, 701, 2103, 6309, 18927, 56781, 170343, 1704, 5112, 52, 156, 468, 1404, 10, 30, 90, 270, 810, 2430, 7290, 21870, 65610, 510, 1530, 4590, 13770, 130, 390, 1170, 70, 210, 630, 1890, 5670, 17010, 7, 21, 63, 189, 567, 1701, 70

This 70 loop is actually a part of the 7 loop as can be seen below:

7, 21, 63, 189, 567, 1701, 70, 210, 630, 1890, 5670, 17010, 7 

The graph of its trajectory is shown in Figure 5:


Figure 5: permalink

This "erase or triple" protocol could be generalised so if the digits of a number satisfy a certain criterion then they are erased to form a new number or, if the criterion is not met, the number is modified in some way. For example, suppose the number contains prime digits (2, 3, 5 or 7). If it does, then these digits are erased. If the number does not contain any prime digits, then the number is squared and 1 is added.

Let's use 14857 as a test number. It contains the prime digits 5 and 7 so these are erased to leave 148. This number contains no prime digits so it becomes 148 x 148 + 1 = 21905. We erase the 2 and the 5 to get 190 which becomes 190 x 190 + 1 = 36101 and so on. I could continue but the trajectory under this new protocol is best dealt with by creating an appropriate algorithm (permalink).

Using the algorithm, the trajectory turns out to have a length of 7 and is:

14857, 148, 21905, 190, 36101, 6101, 37222202, 0

Once 37222202 is reached and all the prime digits are erased, we are left with 0. This seems to be the fate of many numbers but not all. For example, while 6, 66 and 666 all end in 0, 6666 increases rapidly without bound. It might be better to double the number and add 1 rather than squaring it and adding 1. However, I'm digressing. This new protocol and variations thereof could serve as the basis for a future post but that's enough for this post.

In closing, I'll just observe that protocols like these, where we are manipulating the digits of the number in some way, fall into the realm of recreational mathematics rather than serious mathematics. Not only are they specific to the number base 10 but they also ignore, in the first step, the place value of the digits and acknowledge only the face value. Nonetheless, it's fun to explore the resultant trajectories when the different protocols are applied.