Showing posts with label collatz. Show all posts
Showing posts with label collatz. Show all posts

Saturday, 12 July 2025

13x+1 Record Breaker

Trajectory length record breakers for the 3\(x\) + 1, 5\(x\) + 1, 7\(x\) + 1, 11\(x\) + 1, 13\(x\) + 1 and 17\(x\) + 1 Collatz mappings are a fairly exclusive set of numbers and its members from 27859 to 40000 are 27859, 28927, 30301, 30771, 32326, 32581, 34239, 35556, 35655, 35803, 37647, 38030, 39053, 39254 and 39281. Why start at 27859? Well this is the number associated with my diurnal age and the next celebration of such an event is about three years away when I reach 28927 days old. 27859 is associated with the 13\(x\) + 1 mapping where the numbers that mark the record breaking trajectory lengths are shown in Figure 1.


Figure 1: see blog post

Figure 2 shows the trajectory for 27859 using a logarithmic scale for the vertical axis.


Figure 2: permalink

The trajectory is as follows ending in a 7, 1, 14, 7 loop. The maximum value reached is an impressive \( \textbf{1,004,280,846,804} \). That's just over a trillion. That's why a logarithmic scale was needed for the vertical axis!

27859, 362168, 181084, 90542, 45271, 588524, 294262, 147131, 1912704, 956352, 478176, 239088, 119544, 59772, 29886, 14943, 4981, 64754, 32377, 420902, 210451, 2735864, 1367932, 683966, 341983, 4445780, 2222890, 1111445, 222289, 2889758, 1444879, 18783428, 9391714, 4695857, 61046142, 30523071, 10174357, 132266642, 66133321, 859733174, 429866587, 5588265632, 2794132816, 1397066408, 698533204, 349266602, 174633301, 2270232914, 1135116457, 14756513942, 7378256971, 95917340624, 47958670312, 23979335156, 11989667578, 5994833789, 856404827, 11133262752, 5566631376, 2783315688, 1391657844, 695828922, 347914461, 115971487, 1507629332, 753814666, 376907333, 34264303, 445435940, 222717970, 111358985, 22271797, 289533362, 144766681, 1881966854, 940983427, 12232784552, 6116392276, 3058196138, 1529098069, 19878274898, 9939137449, 129208786838, 64604393419, 839857114448, 419928557224, 209964278612, 104982139306, 52491069653, 4771915423, 433810493, 5639536410, 2819768205, 939922735, 187984547, 2443799112, 1221899556, 610949778, 305474889, 101824963, 1323724520, 661862260, 330931130, 165465565, 33093113, 430210470, 215105235, 71701745, 14340349, 186424538, 93212269, 1211759498, 605879749, 7876436738, 3938218369, 51196838798, 25598419399, 3656917057, 47539921742, 23769960871, 309009491324, 154504745662, 77252372831, 1004280846804, 502140423402, 251070211701, 83690070567, 27896690189, 362656972458, 181328486229, 60442828743, 20147609581, 1831600871, 23810811324, 11905405662, 5952702831, 1984234277, 25795045602, 12897522801, 4299174267, 1433058089, 18629755158, 9314877579, 3104959193, 443565599, 5766352788, 2883176394, 1441588197, 480529399, 68647057, 892411742, 446205871, 5800676324, 2900338162, 1450169081, 18852198054, 9426099027, 3142033009, 40846429118, 20423214559, 1856655869, 24136526298, 12068263149, 4022754383, 52295806980, 26147903490, 13073951745, 4357983915, 1452661305, 484220435, 96844087, 1258973132, 629486566, 314743283, 4091662680, 2045831340, 1022915670, 511457835, 170485945, 34097189, 4871027, 695861, 9046194, 4523097, 1507699, 19600088, 9800044, 4900022, 2450011, 31850144, 15925072, 7962536, 3981268, 1990634, 995317, 12939122, 6469561, 924223, 12014900, 6007450, 3003725, 600745, 120149, 1561938, 780969, 260323, 37189, 483458, 241729, 3142478, 1571239, 20426108, 10213054, 5106527, 66384852, 33192426, 16596213, 5532071, 71916924, 35958462, 17979231, 5993077, 77910002, 38955001, 506415014, 253207507, 36172501, 470242514, 235121257, 33588751, 4798393, 62379110, 31189555, 6237911, 81092844, 40546422, 20273211, 6757737, 2252579, 321797, 45971, 597624, 298812, 149406, 74703, 24901, 323714, 161857, 2104142, 1052071, 13676924, 6838462, 3419231, 44450004, 22225002, 11112501, 3704167, 48154172, 24077086, 12038543, 1094413, 14227370, 7113685, 1422737, 18495582, 9247791, 3082597, 440371, 5724824, 2862412, 1431206, 715603, 102229, 1328978, 664489, 94927, 13561, 176294, 88147, 1145912, 572956, 286478, 143239, 1862108, 931054, 465527, 6051852, 3025926, 1512963, 504321, 168107, 2185392, 1092696, 546348, 273174, 136587, 45529, 4139, 53808, 26904, 13452, 6726, 3363, 1121, 14574, 7287, 2429, 347, 4512, 2256, 1128, 564, 282, 141, 47, 612, 306, 153, 51, 17, 222, 111, 37, 482, 241, 3134, 1567, 20372, 10186, 5093, 463, 6020, 3010, 1505, 301, 43, 560, 280, 140, 70, 35, 7, 1, 14, 7

Monday, 16 June 2025

A Special 29x + 1 Map

 In blog posts titled:

I've looked at Collatz-style sequences of the form \(px+1\) that map a number \(n\) to the following:
  • \(n \rightarrow \dfrac{n}{2}\) if \(2 \, | \, n\)
  • \(n \rightarrow \dfrac{n}{3}\) if \(3 \, | \, n\)
  • \(n \rightarrow \dfrac{n}{5}\) if \(5 \, | \, n\)
     \(\dots\)
  • \(n \rightarrow \dfrac{n}{p-1}\) if \((p-1) \, | \, n\)
  • \(n \rightarrow p \times n+1\) \( \text{ if none of the primes less than }p \text{ divide } n\)
Other mappings are of course possible and the following is perhaps the simplest of all. For a given prime \(p\) when applied to a number \(n\), the rule is:
  • \(n \rightarrow \dfrac{n}{2}\) if \(n\) is even
  • \(n \rightarrow p \times n + 1\) if \(n\) is odd
For \(p=3\), this is the Collatz trajectory of the number. Let's apply this sort of modified \(px+1\) mapping in the case of \(n=3\). The sequence formed by the trajectory up to one million is then (permalink):

3, 88, 44, 22, 11, 320, 160, 80, 40, 20, 10, 5, 146, 73, 2118, 1059, 30712, 15356, 7678, 3839, 111332, 55666, 27833, 807158, 403579, 11703792, 5851896, 2925948, 1462974, 731487 (OEIS A037112)

The trajectory is shown in Figure 1 using a logarithmic scale for the \(y\) axis:


Figure 1: permalink

By contrast if the first mentioned rule above were applied then the trajectory would be short-lived indeed:$$3 \rightarrow  1 \rightarrow  30 \rightarrow  15 \rightarrow 5 \rightarrow  1$$It can be seen that the trajectory very quickly enters a loop. 

Letting \(p=101\) and applying the mapping to \(n=3\) once again, we get the following sequence up to one million formed by the trajectory (permalink):

3, 304, 152, 76, 38, 19, 1920, 960, 480, 240, 120, 60, 30, 15, 1516, 758, 379, 38280, 19140, 9570, 4785, 483286, 241643

The trajectory is shown in Figure 2 using a logarithmic scale for the \(y\) axis:

Figure 2: permalink

Wednesday, 15 January 2025

Collatz Trajectory Crossing Records

One of the properties associated with my diurnal age's number (27681) is that it is a member of OEIS A319738:


 A319738: Numbers whose Collatz trajectories cross their initial values a record number of times.

The initial members of the sequence are: 1, 3, 6, 9, 14, 18, 33, 54, 97, 129, 194, 257, 294, 313, 342, 353, 398, 417, 470, 626, 9225, 13739, 14473, 19297, 27681, 38881 (permalink)

Table 1 shows the progressive records (permalink):


Table 1

Figure 1 shows the Collatz trajectory of 27681 in which there are 61 crossings (permalink):


Figure 1

These record crossings are rather rare and I don't know if I'll experience the next one. I'll be 38881 days old which I'm unlikely to reach. The reason that I've never encountered these record number of crossings before is that the previous one occurred when I was 
19297 days old, long before I started this daily number analysis.

Friday, 19 July 2024

Another Mid-Millenium Number

On Saturday 23rd of October 2021, I made a post titled Counting People with Mid-Millennium Numbers in which I examined my diurnal age of 26500 on that date. Now, almost three years later, I've reached another "milestone": 27500.


As I said in that post, mid-millennial numbers are popular rounding numbers for populations of towns and islands or communities with common interests or characteristics. These are to be preferred to millennium numbers such as 27,000 or 28000 that appear a little too "approximate" (having only two significant figures as opposed to the three of 27,500). Such numbers are also popular with a wide variety of quantities such as tonnage, money and distances.

The 30 divisors of 27500 are 1, 2, 4, 5, 10, 11, 20, 22, 25, 44, 50, 55, 100, 110, 125, 220, 250, 275, 500, 550, 625, 1100, 1250, 1375, 2500, 2750, 5500, 6875, 13750 and 27500. It's special in the sense that all the digits (apart from 0) are prime. This won't occur again until 30500. As with the previous mid-millennial number, the number appears frequently in population statistics. Here are some examples:
  • Published today, the NHS Workforce Race Equality Standard shows Black and minority ethnic (BME) staff make up almost a quarter of the workforce overall (24.2% or 383,706 staff) – an increase of 27,500 people since 2021 (22.4% of staff).

  • The Portuguese Grand Prix of Formula 1, which will be played between Friday and Sunday, will have a maximum capacity of 27,500 spectators, according to the government dispatch published today, October 21, in Diário da República.

  • More than 27,500 people in Gaza have already been killed over the past four months, according to Gaza’s Ministry of Health. Further fighting in Rafah risks claiming the lives of even more people. It also risks further hampering a humanitarian operation already limited by insecurity, damaged infrastructure and access restrictions.

  • The anonymous online study, ‘The Global Brain Health Survey’, involved more than 27,500 people worldwide and was led by the Norwegian Institute of Public Health in collaboration with the University of Oslo. 

  • Kirchberg’s resident population is expected to grow almost six-fold over the next 20 years, according to projections from the Fonds Kirchberg.The body responsible for coordinating the development of one of the capital’s business districts forecasts that there will be 23,700 people living in the area by 2040, up from 4,000 in 2020. It suggests that the district’s maximum capacity would be capped at 27,500 beyond 2040.

  • The Kenyan government says it has set up more than 100 camps to house over 27,500 people displaced by flooding.According to government data, more than 190,000 people have so far been affected by the floods and at least 210 are known to have died.
The aliquot sequence for 27500 has a length of 206 steps which are:

[27500, 38104, 40016, 40708, 30538, 15272, 14968, 13112, 13888, 18624, 31160, 44440, 65720, 89800, 119450, 102820, 119444, 105760, 144476, 121804, 97380, 198552, 297888, 518592, 909904, 998456, 889384, 795416, 774784, 768986, 444454, 261146, 141274, 100934, 52186, 27194, 13600, 21554, 13306, 6656, 7666, 3836, 3892, 3948, 6804, 13580, 19348, 19404, 42840, 125640, 283860, 633420, 1562004, 2535180, 5206260, 9371436, 12495276, 20190804, 26921100, 55087540, 60803732, 56587948, 45117684, 69280236, 116780184, 208518216, 312777384, 469166136, 772745304, 1187955816, 1781933784, 2716157736, 4851795384, 8337024936, 14614443864, 27722614536, 48023931924, 82013245164, 134692975476, 205780934846, 107492498242, 53746249124, 42348933724, 35852825156, 27118586620, 29830445324, 24116652916, 18087489694, 10639699874, 5379726934, 2706299954, 1471210894, 735605450, 632620780, 816656420, 898322104, 809756216, 781610824, 685415096, 602212744, 711287846, 355643926, 246590714, 123608986, 61804496, 72770224, 68943920, 91350880, 128146160, 170324320, 242956688, 264953512, 248965388, 248965444, 290225852, 310243108, 343261436, 345226084, 363478556, 363478612, 383892908, 438979156, 520540076, 520540132, 539131250, 616169806, 498886994, 249443500, 314159540, 346712980, 406492340, 486797260, 537866996, 403400254, 201700130, 166294750, 145009490, 131361862, 68478170, 54782554, 27444794, 17643046, 8821526, 6384874, 3696566, 1888594, 944300, 1555540, 2282924, 2282980, 3442460, 4965604, 5062876, 6042092, 6693988, 8128904, 9877396, 8355308, 7779412, 5834566, 2942234, 1471120, 2600048, 3337072, 3287504, 3661456, 3432646, 2557142, 1826554, 1027814, 519394, 259700, 408226, 345758, 246994, 164846, 111634, 55820, 61444, 46090, 44630, 35722, 19034, 10534, 6026, 3478, 1994, 1000, 1340, 1516, 1144, 1376, 1396, 1054, 674, 340, 416, 466, 236, 184, 176, 196, 203, 37, 1, 0]

With a logarithmic vertical axis, the trajectory has a pleasing mountain-like appearance. See Figure 1.


Figure 1

The Collatz trajectory of 27500 has 90 steps and, with a logarithmic vertical axis, its trajectory has a noticeably jagged appearance (see Figure 2):

[27500, 13750, 6875, 20626, 10313, 30940, 15470, 7735, 23206, 11603, 34810, 17405, 52216, 26108, 13054, 6527, 19582, 9791, 29374, 14687, 44062, 22031, 66094, 33047, 99142, 49571, 148714, 74357, 223072, 111536, 55768, 27884, 13942, 6971, 20914, 10457, 31372, 15686, 7843, 23530, 11765, 35296, 17648, 8824, 4412, 2206, 1103, 3310, 1655, 4966, 2483, 7450, 3725, 11176, 5588, 2794, 1397, 4192, 2096, 1048, 524, 262, 131, 394, 197, 592, 296, 148, 74, 37, 112, 56, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]


Figure 2

Here are some other interesting facts about the number:
  • The Anti-Divisors of 27500 are [3, 7, 8, 9, 21, 27, 40, 63, 81, 88, 97, 189, 200, 291, 440, 567, 679, 873, 1000, 2037, 2200, 2619, 5000, 6111, 7857, 11000, 18333]

  • The Arithmetic Derivative of 27500 is 52000

  • The Maximum - Minimum Recursive Algorithm for 27500 produces [27500, 74943, 62964, 71973, 83952, 74943]

  • The Minimal Goldbach decomposition of 27500 is 13 and 27487

  • The number of steps required is to reach home prime is 7:
    [27500, 22555511, 1110511951, 3313355021, 31337105733, 3373163729137, 4936768328311, 101312973757451]

  • 27500 has Odds and Evens Trajectory of length 12 and is [27500, 27510, 27521, 27530, 27543, 27552, 27565, 27574, 27587, 27596, 27609, 27617, 27624, 27617]
For the previous mid-millennial day see Counting People with Mid-Millennium Numbers.

Monday, 16 October 2023

Collatz-2 Trajectory

Collatz Trajectory:

The Collatz trajectory of a number \(n\) is defined as follows:$$ \begin{align} n &\rightarrow \frac{n}{2} \text{ if } n \text{ is even}\\n &\rightarrow 3n+1 \text{ if n is odd} \end{align}$$The Collatz conjecture is that the trajectory of all numbers eventually ends in 1 and this has not yet been proven. Most numbers reach 1 quickly but some numbers require far more steps e.g.  6,171 requires 261 steps. 

Pn + 1 Trajectory:

The Collatz trajectory is sometimes referred to as the 3\(n\)+1 trajectory and generalisation of this is the P\(n\)+1 trajectory of which the Collatz trajectory is the special case of P=\(3\). Let's consider the case of P=17 where 17\(n\)+1 is defined as:$$ \begin{align} n &\rightarrow \frac{n}{2^{a} . 3^{b} . 5^{c} . 7^{d}  . 11^{e}  . 13^{f}} \\ \\ \text{ where } a,b,c,d,e,f &\geq 0 \text{ and } 2^{a} \text{ is a factor of } n \text{ if } a>0 \text{ etc. }\\ \text{and not all }a,b,c,d,e &=0 \text{ because denominator is then 1}\\ \text{if all } a,b,c,d,e &=0 \text{ then denominator is 1 and }\\ \\ n &\rightarrow 17n+1 \end{align} $$Here is the trajectory of 61 under these rules:

61, 1038, 173, 2942, 1471, 25008, 521, 8858, 4429, 75294, 4183, 71112, 2963, 50372, 257, 4370, 437, 7430, 743, 12632, 1579, 26844, 2237, 38030, 3803, 64652, 2309, 39254, 19627, 333660, 5561, 94538, 47269, 803574, 14881, 252978, 3833, 65162, 32581, 553878, 263, 4472, 43, 732, 61

As can be seen, the trajectory loops back to the starting point. Figure 1 shows its graph with a peak of 803574 being reached:


Figure 1: permalink

While some numbers have a looping trajectory, the majority terminate in 1. Another prime, 41, is an example of this with Figure 2 graphing the trajectory.

41, 698, 349, 5934, 989, 16814, 1201, 20418, 3403, 57852, 1607, 27320, 683, 11612, 2903, 49352, 6169, 104874, 227, 3860, 193, 3282, 547, 9300, 31, 528, 1, 18, 1


Figure 2

PrimeLatz Trajectory:

The PrimeLatz Trajectory is similar except that for odd numbers, the rule is to add the next three primes to the number. This will always generate an even number that is then divided by 2. The PrimeLatz Conjecture is that the sequence of numbers thus generated will always lead to a loop.

The trajectory of 61 is 61, 272, 136, 68, 34, 17, 88, 44, 22, 11, 60, 30, 15, 74, 37, 168, 84, 42, 21, 104, 52, 26, 13, 72, 36, 18, 9, 50, 25, 122, 61 with Figure 3 showing the graph where a maximum of 272 is reached:


Figure 3

Esucarys Trajectory

The Esucarys sequence derives its name from a reversal of "Syracuse", with the generating rule being that for the Syracuse (3\(n\)+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 40,000, 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

Figure 4 shows the trajectory of 26251:


Figure 4

All other numbers simply increase without bound. So much for the review of what I've covered in earlier posts. Now it's time for the Collatz-2 trajectory.

Collatz-2 Trajectory

This trajectory is defined by a generalization of the classical '3\(n\)+1' function: instead of dividing an even number by 2 a non-prime will be divided by its smallest prime factor and a prime will be multiplied not by 3 but by its prime-predecessor, before one is added. Thus:$$ \begin{align} \text{for } n \text{ composite: } n &\rightarrow \frac{n}{\text{smallest prime factor}}\\ \text{for } n \text{ prime: }n &\rightarrow n \times \text{ previous prime} \end{align}$$Most numbers will have a trajectory that ends in 2 while others will enter a loop and yet still others will return to their starting points (and thus loop as well). 29 is an example of a number that returns to its starting point. It's trajectory is 29, 668, 334, 167, 27222, 13611, 4537, 349, 121104, 60552, 30276, 15138, 7569, 2523, 841, 29 (permalink). Figure 5 shows its trajectory:


Figure 5: 
permalink

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

Friday, 19 May 2023

A Special Class of Collatz Trajectories

I've written about Collatz trajectories over the years but a special class of trajectory was brought to my attention thanks to the number, 27074, associated with my diurnal age today. This number is a member of OEIS A224303:


 A224303

Numbers \(n\) for which number of iterations to reach the largest equals number of iterations to reach 1 from the largest in Collatz (3\(x\)+1) trajectory of \(n\).



The trajectory of 27074 requires 64 steps to reach 1 and therefore 65 numbers are involved once we include the starting number. These are the numbers (permalink):

27074, 13537, 40612, 20306, 10153, 30460, 15230, 7615, 22846, 11423, 34270, 17135, 51406, 25703, 77110, 38555, 115666, 57833, 173500, 86750, 43375, 130126, 65063, 195190, 97595, 292786, 146393, 439180, 219590, 109795, 329386, 164693, 494080, 247040, 123520, 61760, 30880, 15440, 7720, 3860, 1930, 965, 2896, 1448, 724, 362, 181, 544, 272, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

The maximum value reached is 494080 and this is the 33rd term. There are 32 terms before it and 32 terms after it. In other words, 32 steps are required to reach the maximum and from there 32 steps are required to reach 1. This is shown in Figure 1:


Figure 1: permalink

The terms in OEIS 
A224303 up to 40000 are as follows (permalink):

1, 6, 120, 334, 335, 804, 1249, 2008, 2010, 2012, 2013, 6556, 6557, 6558, 6801, 6802, 6803, 7496, 7498, 7500, 7501, 7505, 10219, 22633, 25182, 25183, 27074, 27075, 27864, 27866, 27868, 31838, 31839, 32078, 36630, 36633, 36690, 36691, 36914, 39126, 39344, 39346, 39348, 39352, 39354

The terms appear in clusters. For example, 27075 belongs to the sequence as well as 27074. This clustering is more evident once we plot the numbers as shown in Figure 2:


Figure 2: permalink

It can be noted that the Collatz trajectory of 27075 also requires 64 steps to reach 1, attains the same maximum value of 494080 after 32 steps and then another 32 steps to reach 1.  The trajectory is as follows:

27075, 81226, 40613, 121840, 60920, 30460, 15230, 7615, 22846, 11423, 34270, 17135, 51406, 25703, 77110, 38555, 115666, 57833, 173500, 86750, 43375, 130126, 65063, 195190, 97595, 292786, 146393, 439180, 219590, 109795, 329386, 164693, 494080, 247040, 123520, 61760, 30880, 15440, 7720, 3860, 1930, 965, 2896, 1448, 724, 362, 181, 544, 272, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

Compare this to that of 27074, we see that they differ only in first five terms before merging at 30460:

27074, 13537, 40612, 20306, 10153, 30460, 15230, 7615, 22846, 11423, 34270, 17135, 51406, 25703, 77110, 38555, 115666, 57833, 173500, 86750, 43375, 130126, 65063, 195190, 97595, 292786, 146393, 439180, 219590, 109795, 329386, 164693, 494080, 247040, 123520, 61760, 30880, 15440, 7720, 3860, 1930, 965, 2896, 1448, 724, 362, 181, 544, 272, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

So overall an interesting class of Collatz trajectories, just adding to the fascination of the 3\(x\)+1 problem. 

Wednesday, 23 February 2022

Collatz Trajectory Records

I've written about the Collatz Trajectory or the \(3x+1\) Problem previously in the following posts:


The topic was drawn to my attention yet again when I discovered that the number associated with my diurnal age, 26623, was intimately linked the \(3x+1\) problem because of its link to two sequences in the OEIS, specifically:

 
 A006877

In the '3x+1' problem, these values for the starting value set  new records for number of steps to reach 1.   
                                  

1, 2, 3, 6, 7, 9, 18, 25, 27, 54, 73, 97, 129, 171, 231, 313, 327, 649, 703, 871, 1161, 2223, 2463, 2919, 3711, 6171, 10971, 13255, 17647, 23529, 26623, 34239, 35655, 52527, 77031, 106239, 142587, 156159, 216367, 230631, 410011, 511935, 626331, 837799, ...

The record set is 307 steps. The full trajectory is as follows:

26623, 79870, 39935, 119806, 59903, 179710, 89855, 269566, 134783, 404350, 202175, 606526, 303263, 909790, 454895, 1364686, 682343, 2047030, 1023515, 3070546, 1535273, 4605820, 2302910, 1151455, 3454366, 1727183, 5181550, 2590775, 7772326, 3886163, 11658490, 5829245, 17487736, 8743868, 4371934, 2185967, 6557902, 3278951, 9836854, 4918427, 14755282, 7377641, 22132924, 11066462, 5533231, 16599694, 8299847, 24899542, 12449771, 37349314, 18674657, 56023972, 28011986, 14005993, 42017980, 21008990, 10504495, 31513486, 15756743, 47270230, 23635115, 70905346, 35452673, 106358020, 53179010, 26589505, 79768516, 39884258, 19942129, 59826388, 29913194, 14956597, 44869792, 22434896, 11217448, 5608724, 2804362, 1402181, 4206544, 2103272, 1051636, 525818, 262909, 788728, 394364, 197182, 98591, 295774, 147887, 443662, 221831, 665494, 332747, 998242, 499121, 1497364, 748682, 374341, 1123024, 561512, 280756, 140378, 70189, 210568, 105284, 52642, 26321, 78964, 39482, 19741, 59224, 29612, 14806, 7403, 22210, 11105, 33316, 16658, 8329, 24988, 12494, 6247, 18742, 9371, 28114, 14057, 42172, 21086, 10543, 31630, 15815, 47446, 23723, 71170, 35585, 106756, 53378, 26689, 80068, 40034, 20017, 60052, 30026, 15013, 45040, 22520, 11260, 5630, 2815, 8446, 4223, 12670, 6335, 19006, 9503, 28510, 14255, 42766, 21383, 64150, 32075, 96226, 48113, 144340, 72170, 36085, 108256, 54128, 27064, 13532, 6766, 3383, 10150, 5075, 15226, 7613, 22840, 11420, 5710, 2855, 8566, 4283, 12850, 6425, 19276, 9638, 4819, 14458, 7229, 21688, 10844, 5422, 2711, 8134, 4067, 12202, 6101, 18304, 9152, 4576, 2288, 1144, 572, 286, 143, 430, 215, 646, 323, 970, 485, 1456, 728, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1

The number marked in bold in the trajectory (106358020) above is the highest value attained and this too sets a new Collatz trajectory record:


 A006884

In the '3x+1' problem, these values for the starting value set new records for highest point of trajectory before reaching 1.

1, 2, 3, 7, 15, 27, 255, 447, 639, 703, 1819, 4255, 4591, 9663, 20895, 26623, 31911, 60975, 77671, 113383, 138367, 159487, 270271, 665215, 704511, 1042431, 1212415, 1441407, 1875711, 1988859, 2643183, 2684647, 3041127, 3873535, 4637979, 5656191

Figure 1 shows a plot of the 307 values from 26623 to 1:


Figure 1

Saturday, 3 April 2021

Patterns in Collatz Trajectories

It's my 72nd birthday and I'm 26298 days old. It's a number that seems to have no interesting properties, despite an extensive search. I decided to look at its Collatz trajectory and that turns out to have 77 steps. This led me to consider what other numbers between 1 and 100,000 also have trajectories of this length. Figure 1 shows what I found.


Figure 1: numbers with Collatz trajectories of length 77 steps
in range from 1 to 100,000

The results are interesting. There are an initial three numbers (790, 791, 793) and then a big gap until 4252 is reached. After this there are many numbers with a trajectory of length 77:
4252, 4253, 4254, 4260, 4261, 4262, 4278, 4279, 4289, 4290, 4291, 4295, 4305, 4306, 4307, 4338, 4339, 4350, 4351, 4374, 4375, 4377, 4380, 4381, 4382, 4383, 4409, 4418, 4419, 4423, 4434, 4435, 4494, 4495, 4744, 4746, 4748, 4749, 4752, 4756, 4757, 4758, 4759, 4760, 4762, 4769, 4779, 4783

There is a jump after 4783 to 5279 and 5287 after which there is a very big gap until 25520 is reached, after which there is a steady stream of numbers (with minor gaps) until 31855 is reached. After this, nothing up to the calculation limit of 100,000. There are 439 numbers in total.

Contrast this with numbers that have trajectories of length 76 steps and 78 steps, with 1417 and 908 numbers respectively. See Figures 2.


Figure 2
: numbers with Collatz trajectories of length 76 steps
in range from 1 to 100,000



Figure 3: numbers with Collatz trajectories of length 78 steps
in range from 1 to 100,000

The results for trajectories of length of 76 and 78 steps led me to suspect that there was probably another run of numbers above 100,000 with trajectories of 77 steps. I extended the search up to 200,000 and Figure 4 shows what I found.


Figure 4
: numbers with Collatz trajectories of length 77 steps
in range from 1 to 200,000

In the range up to 200,000, there are 2751 numbers with trajectories of 77 steps. Figures 2, 3 and 4 are nearly identical in their essential features, only differing in where the runs begin and end. Dropping down to numbers with trajectories of length 38 steps, the same pattern recurs. See Figure 5.


Figure 5
: numbers with Collatz trajectories of length 38 steps
in range from 1 to 200,000

I've no idea why these patterns occur and am simply noting them in this post. Thus 26298 turns out to be a number of some interest after all because it led me to discover this pattern. As can be seen from Figure 1 and Figure 4, there are many numbers in the vicinity of 26298 that also have trajectories of 77 steps:

..., 26292, 26293, 26296, 26298, 26300, 26301, 26302, 26305, ...

Of course, looking at the list above, I'm interested to know what the trajectories are for the numbers between 26292 and 26305 that aren't in the list. Here's what I found.
  • 26294 requires 64 steps
  • 26295 requires 64 steps
  • 26297 requires 64 steps
  • 26299 requires 64 steps
  • 26303 requires 64 steps
  • 26304 requires 139 steps
Let's keep this going for a bit longer:
  • 26306 requires 100 steps
  • 26307 requires 100 steps
  • 26308 requires 139 steps
  • 26309 requires 139 steps
  • 26310 requires 139 steps
Obviously, this is just a small sample of the behaviour of the non-77 step numbers surrounding 26298. More analysis is needed before any generalisations can be made but oddly, whether the number is odd or even, it doesn't seem to make much difference. This is in spite of the fact that a number like 26294 --> 13147 while 26295 --> 78886. However, if go another step see that 13147 --> 39442 while 78886 --> 39443 and the numbers are paired again.

Monday, 15 February 2021

THE ESUCARYS MAPPING

 I've written about the Collatz or \(3x+1\) mapping and similar mappings in earlier posts:

I wasn't aware that the Collatz conjecture is also referred to an the Syracuse problem.
The Syracuse problem, also known as the Collatz conjecture or the \(3n+1\) conjecture or Ulam conjecture, is a very simple problem of arithmetics that is still unsolved today. It can be stated as follows:

Syracuse problem: \(n \geq 1\) being an integer, repeat the following operations
  • If the number is even then divide it by two
  • If the number is odd then multiply it by 3 and add 1
Conjecture: This process always reaches the number 1

Today, in investigating the number properties of my diurnal age (26251), I discovered that it is a member of OEIS A129133:


  A129133

Numbers whose trajectory under the Esucarys map ends at the fixed point 247.   


The Esucarys sequence derives its name from a reversal of "Syracuse", with the generating rule being that for the Syracuse (\(3x+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 26251, 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
Here is a permalink to the SageMath algorithm to generate this sequence. As an example, in reaching 247, 26251 follows this trajectory:
26251, 45787, 263731, 491197, 2953741, 4221688, 4480112, 6500422, 1120523, 751633, 94522, 16274, 7318, 9563, 9682, 1484, 247
Here is a permalink to the SageMath algorithm that will generate this trajectory. Figure 1 shows a graph of this trajectory.


Figure 1

Sunday, 13 December 2020

Iterations that lead to a Constant or a Loop

One of my first encounters with an iterative process that leads to either a constant or a loop was with so-called happy numbers. See my post of 28th June 2018 titled Happy Numbers. The iterative process involved with these numbers is to repeatedly add the sums of squares of digits to either reach a constant (1) or enter a loop (4, 16, 37, 58, 89, 145, 42, 20, 4, ... ). Approximately, 15% of numbers are happy.

25286 is a happy number because the process leads to 1: 

25286 --> 133 --> 19 --> 82 --> 68 --> 100 --> 1

89 is a nominally unhappy number because the process leads to a loop:

89 --> 145 -->  42 --> 20 --> 4

Today I turned 26187 days old and this number forms part of OEIS A219960:


 A219960

Numbers which do not reach zero under the repeated iteration
x -> ceiling(sqrt(x)) * (ceiling(sqrt(x))^2 - x).


In the case of 26187 the iteration proceeds as follows:

[26187, 9234, 16975, 24366, 44431, 18990, 7452, 10179, 2222, 3936]

whereupon it enters the loop:

[2079, 1702, 2604, 5200, 9417, 18326, 23120, 44217, 64144, 94488, 115808, 161293, 125022, 104076, 81719, 22022, 26671, 36900, 67357, 63180, 81648, 42328, 22248, 37800, 43875, 47250, 59732, 71785, 10452, 16171, 27264, 48472, 81549, 70642, 30324, 52675, 51750, 53352, 2079]

Graphically the situation is as in Figure 1 with 161293 being the highest value reached:


Figure 1

Of the numbers up to 26187, 504 do not reach zero which represents a little under 2% of the total.

There is a similar iterative process involving the floor function (OEIS A219303):


 A219303



Numbers which do not reach zero under the repeated iteration
x -> floor(sqrt(x)) * (x - floor(sqrt(x))^2).


In the comments for OEIS A219960 (with the ceiling function), the following is stated:
Conjecture 1: All numbers under the iteration reach 0 or, like the elements of this sequence, reach a finite loop, and none expand indefinitely to infinity.

Conjecture 2: There are an infinite number of such finite loops, though there is often significant distance between them.

Conjecture 3: There are an infinite number of pairs of consecutive integers in this sequence despite being less abundant than in A219303.

In regard to Conjecture 3, we find that in the range from 1 to 26187, the following pairs occur:

(2222, 2223), (8399, 8400), (11457, 11458), (12950, 12951), (19005, 19006), (19847, 19848), (22444, 22445), (23597, 23598), (25089, 25090), (25175, 25176), (25742, 25743)

In the comments for OEIS A219303 (with the floor function), the following is stated:

Collatz-like hailstone behavior is evident, but the iteration more closely resembles the iteration used to determine happy numbers (A007770), albeit in a non-base-specific manner. Unlike happy numbers, and despite being approximately as dense in the integers, these numbers do not reach their iterative goal.

Conjecture 1: All numbers under the iteration reach 0 or, like the elements of this sequence, reach a finite loop, and none expand indefinitely to infinity.

Conjecture 2: There are an infinite number of such finite loops, though there is often significant distance between them.

Conjecture 3: There are an infinite number of pairs of consecutive integers in this sequence, e.g. 14 and 15, 197 and 198. This argument is strengthened by the fact there are other groupings such as triples - The first of these is 11527, 11528 and 11529 - and also that for randomly chosen numbers of hundreds of digits, N, the nearest pair or grouping appears to be within N +/- 1000.

We find that the 10,000th member of OEIS A219303 is 211,264 so the numbers have a density of around 4.73% which is well over twice the density of numbers in OEIS A219960. Figure 2 shows a plot of the trajectory of 211,264 using a log scale for the y axis. Notice that once it reaches 8 it flatlines and stay on 8 forever because floor(sqrt(8)) * (8 - floor(sqrt(8))^2) = 8:


Figure 2: permalink