Monday, 19 May 2025

The 17x + 1 Map Revisited

It's been a while, over seven years in fact since I last mentioned the 17x + 1 map in an eponymous post in March of 2018. As I explained back then:
Having recently written yet again about the Collatz trajectory, I was pleasantly surprised today to come upon a more generalised version of it. It goes by the name of the Px + 1 map of which the Collatz trajectory is a specific example in which P = 3. The Px + 1 trajectory or map is an algorithm that states: 

If x is divisible by any prime < P then divide out these primes one at a time starting with the smallest; otherwise multiply x by P and add 1.

My number for today is 25186 and it appears as an entry in OEIS A057534 that states:
  • a(n +1) = a(n)/2 if 2 | a(n)
  • a(n+1) = a(n) / 3 if 3 | a(n)
  • a(n+1) = a(n) / 5 if 5 | a(n)
  • a(n+1) = a(n) / 7 if 7 | a(n)
  • a(n+1) = a(n) / 11 if 11 | a(n)
  • a(n+1) = a(n) / 13 if 13 | a(n)
  • else a(n+1) = 17 x a(n) + 1
This is a particular example of the Px + 1 map in which P = 17 and this generates a sequence, part of which is shown below:

61, 1038, 519, 173, 2942, 1471, 25008, 12504, 6252, 3126, 1563, 521, 8858, 4429, 75294, 37647, 12549, 4183, 71112, 35556, 17778, 8889, 2963, 50372, 25186, 12593, 1799, 257, 4370, 2185, 437, 7430, 3715, 743, 12632, 6316, 3158, 1579, 26844, 13422, ...

Well, that was then, and so let's write out the above sequence in full because it is finite and loops. Here are the 84 terms (or 83 steps) with 61 added at the end to show the return to source:

61, 1038, 519, 173, 2942, 1471, 25008, 12504, 6252, 3126, 1563, 521, 8858, 4429, 75294, 37647, 12549, 4183, 71112, 35556, 17778, 8889, 2963, 50372, 25186, 12593, 1799, 257, 4370, 2185, 437, 7430, 3715, 743, 12632, 6316, 3158, 1579, 26844, 13422, 6711, 2237, 38030, 19015, 3803, 64652, 32326, 16163, 2309, 39254, 19627, 333660, 166830, 83415, 27805, 5561, 94538, 47269, 803574, 401787, 133929, 44643, 14881, 252978, 126489, 42163, 3833, 65162, 32581, 553878, 276939, 92313, 30771, 10257, 3419, 263, 4472, 2236, 1118, 559, 43, 732, 366, 183, 61

Why am I discussing this sequence again today? Well, the number associated with my diurnal age today (27805) is a member of this sequence. We can see this more clearly if we arrange the terms in ascending order.

43, 61, 173, 183, 257, 263, 366, 437, 519, 521, 559, 732, 743, 1038, 1118, 1471, 1563, 1579, 1799, 2185, 2236, 2237, 2309, 2942, 2963, 3126, 3158, 3419, 3715, 3803, 3833, 4183, 4370, 4429, 4472, 5561, 6252, 6316, 6711, 7430, 8858, 8889, 10257, 12504, 12549, 12593, 12632, 13422, 14881, 16163, 17778, 19015, 19627, 25008, 25186, 26844, 27805, 30771, 32326, 32581, 35556, 37647, 38030, 39254, 42163, 44643, 47269, 50372, 64652, 65162, 71112, 75294, 83415, 92313, 94538, 126489, 133929, 166830, 252978, 276939, 333660, 401787, 553878, 803574

We can see that after 25186, the number that prompted my original post, there has only been one other member (26844) until today. If we start with 27805 then the sequence returns to this same number after 85 iterations (permalink):

27805, 5561, 94538, 47269, 803574, 401787, 133929, 44643, 14881, 252978, 126489, 42163, 3833, 65162, 32581, 553878, 276939, 92313, 30771, 10257, 3419, 263, 4472, 2236, 1118, 559, 43, 732, 366, 183, 61, 1038, 519, 173, 2942, 1471, 25008, 12504, 6252, 3126, 1563, 521, 8858, 4429, 75294, 37647, 12549, 4183, 71112, 35556, 17778, 8889, 2963, 50372, 25186, 12593, 1799, 257, 4370, 2185, 437, 7430, 3715, 743, 12632, 6316, 3158, 1579, 26844, 13422, 6711, 2237, 38030, 19015, 3803, 64652, 32326, 16163, 2309, 39254, 19627, 333660, 166830, 83415, 27805

Figure 1 shows a plot of these values using a logarithmic scale:


Figure 1: permalink

Now this sequence of length 84 or 83 steps is not the longest by far, In fact as the numbers get larger then the lengths of the record breaking sequence lengths also increases steadily. Table 1 shows these record step lengths for numbers up to 40000 as well as indicating whether the sequences end up looping or reaching 1.

17x + 1


Table 1: record step lengths of 17x + 1
permalink

It must be said the generation of this table timed out using SageMathCell and needed to be completed in my Jupyter notebook. While we are on the topic, we should look at the record step lengths for primes 3, 5, 7, 11 and 13 as well. Let's start with P13 + 1. The numbers with record breaking steps are as follows (with Table 2 showing more detail):

1, 2, 4, 8, 13, 26, 41, 61, 122, 197, 271, 529, 661, 1322, 1607, 3214, 4337, 4597, 4981, 7663, 15326, 27859
13x + 1


Table 2: record step lengths of 13x + 1
permalink

The numbers with record breaking steps for P11 + 1 are as follows (with Table 3 showing more detail):

1, 2, 4, 8, 11, 22, 23, 46, 92, 151, 247, 407, 653, 883, 977, 1313, 1703, 2477, 4954, 6847, 12449, 14471, 19013, 21527, 22627, 39281

11x + 1

Table 3: record steps lengths of 11x + 1
permalink

The numbers with record steps for P7 + 1 are (with Table 4 showing more details):

1, 3, 6, 7, 11, 19, 31, 49, 53, 106, 121, 163, 283, 343, 403, 806, 1471, 1681, 1919, 3133, 4243, 4849, 8659, 11683, 12373, 24746, 30301, 35803

7x + 1


Table 4: record step lengths of 7x + 1
permalink

The numbers with record steps for P5+1 are (with Table 5 showing more details):

1, 2, 4, 5, 10, 20, 23, 46, 47, 85, 95, 190, 380, 383, 766, 919, 1655, 2117, 3575, 6097, 6503, 10463, 12053, 24106, 28927, 39053

5x + 1

Table 5: record steps lengths of 5x + 1
permalink

The numbers with record lengths for P3 + 1 (with Table 6 showing more details) are:

1, 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

3x + 1

Table 6: record lengths for 3x + 1
permalink

If we collect all the numbers from all the sequences above then we have a list of all the numbers that reach a record number of steps under the Px + 1 mappings where x = 3, 5, 7, 11, 13 and 17. Here is the list in the range from 1 to 40,000:

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 18, 19, 20, 22, 23, 25, 26, 27, 31, 41, 43, 46, 47, 49, 53, 54, 61, 73, 85, 92, 95, 97, 106, 121, 122, 129, 151, 163, 171, 173, 183, 190, 197, 231, 247, 257, 263, 271, 283, 313, 327, 343, 366, 380, 383, 403, 407, 437, 519, 521, 529, 559, 649, 653, 661, 703, 732, 743, 766, 806, 871, 883, 919, 977, 1038, 1118, 1161, 1313, 1322, 1471, 1563, 1579, 1607, 1655, 1681, 1703, 1799, 1919, 2117, 2185, 2223, 2236, 2237, 2309, 2463, 2477, 2919, 2942, 2963, 3126, 3133, 3158, 3214, 3419, 3575, 3711, 3715, 3803, 3833, 4183, 4243, 4337, 4370, 4429, 4472, 4597, 4849, 4954, 4981, 5561, 6097, 6171, 6252, 6316, 6503, 6711, 6847, 7430, 7663, 8659, 8858, 8889, 10257, 10463, 10971, 11683, 12053, 12373, 12449, 12504, 12549, 12593, 12632, 13255, 13422, 14471, 14881, 15326, 16163, 17647, 17778, 19013, 19015, 19627, 21527, 22627, 23529, 24106, 24746, 25008, 25186, 26623, 26844, 27805, 27859, 28927, 30301, 30771, 32326, 32581, 34239, 35556, 35655, 35803, 37647, 38030, 39053, 39254, 39281

No comments:

Post a Comment