Showing posts with label iterations. Show all posts
Showing posts with label iterations. Show all posts

Friday, 3 April 2026

77th Birthday

Today I turned 77 years of age and my equivalent diurnal age is 28124 which has the following factorisation:$$28124=2 \times 2 \times 79 \times 89$$Though this number is composite, it has numerous prime number associations. Let's examine some of them beginning with its sum of digits, sum of digits squares and sum of digits cubed:$$ \begin{align} 2 + 8 + 1 + 2 + 4 &=17 \text{ (prime)} \\2^2+8^2+1^2+2^2+8^4 &= 89 \text{ (prime)} \\2^3+8^3+1^3+2^3+8^3 &= 593 \text{ (prime)} \end{align}$$The number is only one step removed from its home prime because:$$28124=2 \times 2 \times 79 \times 89 \rightarrow 227989 \text{ (prime)}$$The number is also a member of OEIS A048381: numbers such that replacing each nonzero digit with the n-th prime (replacing each 0 digit with a 1) yields a prime. Thus:$$28124 \rightarrow 319237 \text{ (prime)}$$The number has a binary complement that is prime. The binary complement of a number is determined by changing the number to binary and swapping any 0's for 1's and vice versa. Thus:$$ \begin{align} 28124_{10} &= 110110111011100_2 \\ &\rightarrow 001001000100011_2 \\ &=4643_{10} \text{ (prime)} \end{align}$$The number is quickly captured by the prime 28109 under the ODD(+) and EVEN(-) algorithm where the sum of the odd digits is added to the number and the sum of the even digits is subtracted recursively until a fixed point is reached or a loop is entered. Here is the trajectory is simply:$$ \begin{align} 28124 &\rightarrow 28124 + 1 -(2 + 8 + 2 + 4) \\ &=28124 + 1 - 16 \\ &=28109 \text{ (prime)} \end{align}$$The number can be considered as a concatenation of powers of the prime 2 because:$$ 28124 = 2^1\, | \,2^3 \,| \,2^0 \,| \,2^1 \,| \, 2^2 $$where | represents concatenation. The number can be generated by adding the prime sum (13) of the digits of the prime 28111 to itself. Thus:$$28111+13=28124$$The digits of the number can be rearranged to form the following primes:$$22481, 24281, 24821, 42281, 42821, 48221, 82241, 82421, 84221$$The position 28124 in the Recaman Sequence is reached after a prime number of iterations:$$0 \rightarrow 28124 \text{ requires } 34183 \text{ (prime) iterations}$$

Monday, 30 March 2026

Number Testing for the Recaman Sequence

An interesting exercise is to determine how many iterations are required to reach a given number within the Recaman sequence. This is OEIS A057167. The initial terms that are listed in the OEIS are:

0, 1, 4, 2, 131, 129, 3, 5, 16, 14, 12, 10, 8, 6, 31, 29, 27, 25, 23, 99734, 7, 9, 11, 13, 15, 17, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 111, 22, 20, 18, 28, 30, 32, 222, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196

Notice 99734 that I've marked in red in the terms above. This corresponds to 19 and so a remarkable 99734 iterations are required to reach this modest number. Looking further at the \(b\) table, it can be seen that 61 requires an even more impressive 181653 iterations. Interestingly 76 requires the exact same number of iterations. 133 requires only slightly fewer at 181605 and 223 fewer still at 181545. These "spikes" are relatively infrequent. The next significant one is 879 that requires 328002 iterations. However, these are mere blips compared to the staggering number of iterations required for a number like 2406 (see Table 1).

Also of interest is the maximum number reached in the trajectory leading to a given number. I got Gemini to write a SageMath program that will calculate these two statistics (permalink). Let's say we enter the number 61. Here is the output:

Target Number: 61

Iterations Required: 181653

Highest Value Attained: 881467

I've incorporated this into my daily number analysis. My diurnal age today is 28120 and entering this number, the following output is obtained:

Position in Recaman Sequence:

Target Number: 28120

Iterations Required: 34191

Highest Value Attained: 180120

I also got Gemini to create a graph based on the OEIS A057167 b-table data that lists the number of iterations for the first 20,000 numbers. The program also lists the top ten values in that range. See Figure 1.


Figure 1: permalink

Table 1 shows the top ten in terms of number of iterations required:


Table 1: 
permalink

Wednesday, 2 July 2025

Prime Factor Sequences

I'm surprised I've not come across this type of sequence before. It has two variants and they are generated iteratively as follows:

  • number --> sum of prime factors without multiplicity
    For example, 24 with factors of 2 and 3 gives 5 and terminates after just one step

  • number --> sum of prime factors with multiplicity
    For example, 24 with factors of 2, 2, 2 and 3 gives 11 and terminates after just one step
Larger numbers of course take more than one step to terminate and it's of interest to consider those numbers that set records in term of trajectory lengths. In this context, let's consider OEIS A047830.


A047830  least number which becomes prime after exactly \(n\) iterations of f(\(x\)) = sum of prime factors of \(x\).


The members of this sequence are 4, 14, 26, 62, 134, 393, 1774, 13682, 41037 up to 100,000. The trajectories are shown in Figure 1 with length indicating the number of steps or iterations:


Figure 1: permalink

If the sum of prime factors with multiplicity is considered then we get OEIS A121360 with sequence members 1, 8, 14, 26, 62, 134, 393, 1257, 4659, 9314, 27933 up to 100,000. The trajectories are shown in Figure 2 with length indicating the number of steps or iterations:



Figure 2: permalink

The algorithms used to find the trajectories of record lengths can be easily modified to find numbers with trajectories of a specified length (number of steps or iterations). For example, how many numbers in the range up to 40000 require eight steps to reach a prime under the sum of prime factors without multiplicity algorithm. Here are the numbers (with 13682 being the first as we know already from Figure 1):

13682, 18002, 19137, 22934, 24014, 24787, 27364, 27849, 30062, 30993, 32577, 33477, 35410, 35798, 36004, 36398, 36706, 39206

These numbers are the initial members of OEIS A047827. Figure 3 shows the details of their trajectories:


Figure 3: permalink

Tuesday, 12 March 2024

27372: Another Palindromic Day

Days like today, when I turn 27372 days old, pop up every one hundred days during the course of a millennium of days and there is a 110 day gap between millennia. So, for example, from 27972 to 28082, there will be a gap of 110 days. Today's number shares some important properties with another palindrome, 26362, that I created a post about on June 6th 2021. It was titled 26362: Another Special Palindrome. 

One property that the two share is that they are both members of OEIS  A070001:


 A070001

Palindromic integers > 0, whose 'Reverse and Add!' trajectory (presumably) does not lead to another palindrome.


Up to 40000, the members of this sequence are not numerous and they are:

4994, 8778, 9999, 11811, 19591, 22822, 23532, 23632, 23932, 24542, 24742, 24842, 24942, 26362, 27372, 29792, 29892, 33933, 34543, 34743, 34943, 39493

It can be seen that 26362 and 27372 are consecutive and 1010 days apart in terms of my diurnal age. As I wrote in the post previously alluded to:

These palindromes are not regarded as potential Lychrel numbers because they are already palindromes and some of them are the result or end point of \(k\) + reverse(\(k\)) iterations. However, some are not and these, I think, deserve special consideration. These are:

19591, 23532, 23932, 24542, 24742, 24942, 26362, 27372, 29792, 33933, 34543, 34743, 34943, 39493

So 26362 and 27372 are paired again and they are only the 7th and 8th palindromes to have the simultaneous property that:

  • they cannot be derived from \(k\) + reverse(\(k\)) for one or more values of \(k\)
  • their Reverse and Add trajectories (presumably) do not lead to another palindrome 
These two numbers are also members of OEIS A045960:


 A045960

Palindromic even lucky numbers.



Up to 40000, the initial members are:

2, 4, 6, 22, 44, 212, 262, 282, 434, 474, 646, 666, 818, 838, 868, 2442, 2662, 2772, 4884, 4994, 6666, 6886, 8118, 8338, 20202, 20402, 21012, 21812, 22322, 22422, 22922, 23332, 23532, 24042, 25652, 26162, 26262, 26562, 26762, 27372, 28682

A property that 27372 doesn't share with 26762 is that the former's arithmetic digital root is the same of its middle digit. Of the three and five digit palindromes in the range up to 40000, there are only 36 that satisfy this condition. They are (permalink):

919, 929, 939, 949, 959, 969, 979, 989, 999, 18181, 18281, 18381, 18481, 18581, 18681, 18781, 18881, 18981, 27172, 27272, 27372, 27472, 27572, 27672, 27772, 27872, 27972, 36163, 36263, 36363, 36463, 36563, 36663, 36763, 36863, 36963

For example, the arithmetic digital root of 27372 is 2 + 7 + 3 + 7 + 2 = 21 and 2 + 1 = 3. The middle digit of 27372 is 3.

Saturday, 24 February 2024

Thinning the Ranks

Every now and again I encounter a number associated with my diurnal age that seems to have no interesting properties from my perspective. In such cases, I have to be a little creative and such is the case for the number: 27355. After a little thought, I experimented with home primes and asked the question: how many iterations of factorise and concatenate are required to reach a home prime. Well, it turns out that three iterations are required:$$ \begin{align} 27355 &= 5 \times 5471 \rightarrow 55471 \\ 55471 &=13 \times 17 \times 251 \rightarrow 1317251 \\1317251 &=13 \times 19 \times 5333 \rightarrow 13195333 \end{align}$$Now in the range up to 40,000, there are well over 3,000 composite numbers with this property so it's hardly very special. These numbers belong to OEIS A046423:


 A046423

Numbers requiring 3 steps to reach a prime under the prime factor concatenation procedure.


However, I noticed that the home prime for 27355 had exactly half of its digits equal to 3. It occurred to me to investigate how many composite numbers in the range up to 40,000 and belonging to OEIS A046423 had at least half their digits equal to 3. It turned out that there were only 191 numbers (permalink). This is what I meant by "thinning the ranks". It's interesting to investigate the frequency for other digits that comprise at least half of the digits of the home prime. Here are the statistics:

  • 0 --> no numbers
  • 1 --> 120 numbers
  • 2 --> 2 numbers
  • 3 --> 191 numbers
  • 4 --> 3 numbers
  • 5 --> 2 numbers
  • 6 --> no numbers
  • 7 --> 69 numbers
  • 8 --> no numbers
  • 9 --> 11 numbers
The algorithm is easily modified to accommodate different size iterations. Here are some more statistics for different numbers of iterations involving the digit 3 in the range up to 40,000 (permalink):

  • 1 iteration --> 600 numbers
  • 2 iterations --> 441 numbers
  • 3 iterations --> 191 numbers
  • 4 iterations --> 105 numbers
  • 5 iterations --> 48 numbers
  • 6 iterations --> 34 numbers
  • 7 iterations --> 12 numbers
  • 8 iterations --> 6 numbers
  • 9 iterations --> no numbers
So as can be seen, any number can be made more special by imposing more conditions. For example, the numbers that require 8 iterations to reach a home prime that has at least half of its digits equal to 3 are 4017, 4242, 4667, 7474, 31355 and 39309 with the following details (permalink):

  • 4017 --> 3337715393
  • 4242 --> 23393307373
  • 4667 --> 33433193
  • 7474 --> 23393307373
  • 31355 --> 3332943503
  • 39309 --> 3337715393
The very next number after 27355 provides another excellent opportunity to thin the ranks. This is because 27356 is only one step removed from its home prime:$$27356 \rightarrow 227977$$Now 16.8% of numbers in the range up to 40,000 have this property so again its hardly special. However, 27356 has the property that its home prime contains three occurrences of the digit "7". Only 139 or 0.348 % of the numbers have this property (see permalink). Again the algorithm is easily modified to accommodate other digits. Here are the statistics:

  • digit 0 occurs 3 times --> no numbers
  • digit 1 occurs 3 times --> 440 numbers
  • digit 2 occurs 3 times --> 645 numbers
  • digit 3 occurs 3 times --> 565 numbers
  • digit 4 occurs 3 times --> 4 numbers
  • digit 5 occurs 3 times --> 83 numbers
  • digit 6 occurs 3 times --> 1 number
  • digit 7 occurs 3 times --> 139 numbers
  • digit 8 occurs 3 times --> 1 number
  • digit 9 occurs 3 times --> 23 numbers
Yes another example is provided by OEIS A187073:


 A187073

Composite square-free numbers whose average prime factor is a prime number.



In the range up to 40,000, there are 1609 such numbers. How can we thin this sequence out? Well, firstly let's consider only sphenic numbers. This immediately cuts the number to 594. Now how many of these follow a 1-2-3 progression in terms of the lengths of their prime factors? Only 308. Still too many? Let's apply the condition that the prime factors can have no digits in common. This leaves us with only 13 and these numbers are:

  • 15369 = 3 * 47 * 109 with prime average of 53
  • 15515 = 5 * 29 * 107 with prime average of 47
  • 17135 = 5 * 23 * 149 with prime average of 59
  • 22865 = 5 * 17 * 269 with prime average of 97
  • 24215 = 5 * 29 * 167 with prime average of 67
  • 26619 = 3 * 19 * 467 with prime average of 163
  • 29949 = 3 * 67 * 149 with prime average of 73
  • 32809 = 7 * 43 * 109 with prime average of 53
  • 33065 = 5 * 17 * 389 with prime average of 137
  • 33909 = 3 * 89 * 127 with prime average of 73
  • 36879 = 3 * 19 * 647 with prime average of 223
  • 37639 = 7 * 19 * 283 with prime average of 103
  • 39759 = 3 * 29 * 457 with prime average of 163
                        Notice that all these numbers, while conforming to the requirement of OEIS A187073, are sphenic, have factors in a 1-2-3 progression with no digits in common between any of the factors.

                        Wednesday, 18 January 2023

                        What's Special About 516493?

                        5 1 6 4 9 3

                        I got to thinking about primes that remain prime under the operation of prime + digit sum. The acronym "sod" standing for sum of digits is commonly used in this context. There are many primes that satisfy. For example, 11 has a digit sum of 2 and 11 + 2 = 13 which is prime. If we repeat the operation we get 13 + 4 = 17 which is still prime. However, repeating the operation again yields 17 + 8 = 25 which is composite.

                        The primes that remain prime for only one application of the prime + sod operation constitute OEIS A048523 (permalink):


                         A048523

                         Primes for which only one iteration of 'Prime plus its digit sum equals a prime' is possible.



                        The initial members are:

                        13, 19, 37, 53, 71, 73, 97, 103, 127, 163, 181, 233, 271, 307, 383, 389, 431, 433, 499, 509, 563, 587, 631, 701, 743, 787, 811, 857, 859, 947, 1009, 1049, 1061, 1087, 1153, 1171, 1223, 1283, 1423, 1483, 1489, 1553, 1597, 1601, 1607, 1733, 1801, 1861, 1867

                        There are 7939 such primes in the range up to one million. Notice that 11 is not included here because it produces a prime again. The primes, like 11, that remain prime for only two applications of the prime + sod operation constitute OEIS A048524 (permalink):


                         A048524

                        Primes for which only two iterations of 'Prime plus its digit sum equals a prime' are possible.



                        The initial members of the sequence are:

                        11, 59, 101, 149, 167, 257, 293, 367, 419, 479, 547, 617, 727, 839, 1409, 1579, 1847, 2039, 2129, 2617, 2657, 2837, 3449, 3517, 3539, 3607, 3719, 4217, 4637, 4877, 5689, 5807, 5861, 6037, 6257, 6761, 7027, 7517, 8039, 8741, 8969, 9371, 9377, 10667

                        There are 1111 such primes in the range up to one million. The primes that remain prime for only three applications of the prime + sod operation constitute OEIS A048525 (permalink):


                         A048525

                        Primes for which only three iterations of 'Prime plus its digit sum equals a prime' are possible.



                        The initial members of the sequence are:

                        277, 1559, 5779, 7489, 11279, 15091, 22093, 37811, 43579, 46279, 48541, 49957, 53479, 54751, 60589, 68473, 72883, 74821, 83621, 85621, 90793, 91921, 93901, 97501, 107981, 110899, 111799, 120193, 153379, 157739, 170299, 180731, 184441

                        There are 136 such primes in the range up to one million. The primes that remain prime for only four applications of the prime + sod operation constitute OEIS A048526 (permalink):


                         A048526

                        Primes for which only four iterations of 'Prime plus its digit sum equals a prime' are possible.



                        The initial members of the sequence are:

                        37783, 85601, 259631, 268721, 350941, 371939, 378901, 516521, 665111, 733331, 883331, 967781, 1047929, 1056521, 1081721, 1258811, 1427411, 1480573, 1515929, 1584901, 1614929, 1842131, 1875311, 1885981, 2027801, 2044873, 2450531

                        There are only 12 such primes in the range up to one million. The primes that remain prime for only five applications of the prime + sod operation constitute OEIS A048527 (permalink):


                         A048527

                        Primes for which only five iterations of 'Prime plus its digit sum equals a prime' are possible.



                        The initial members of the sequence are:

                        516493, 1056493, 1427383, 1885943, 3166183, 3805183, 4241593, 6621283, 7646953, 12912283, 17987839, 32106493, 107152093, 120224773, 131144473, 133210873, 139388891, 142782877, 150326173, 155382923, 177865819, 184081943, 227795839, 242376877, 264174877

                        There is only one such prime in the range up to one million and that is 516493 and that is why it is deserving of this special post. The progression is shown below where True = Prime and False = Composite:

                        516493 True
                        516521 True
                        516541 True
                        516563 True
                        516589 True
                        516623 True
                        516646 False

                        516493 is the only prime in the range up to one million that generates five successive primes under the prime + sum of digits operation

                        There are primes that go further than five iterations. For example, 286330897 survives seven iterations (link). This is the progression:

                        286330897 True
                        286330943 True
                        286330981 True
                        286331021 True
                        286331047 True
                        286331081 True
                        286331113 True
                        286331141 True
                        286331170 False

                        The number 56676324799 survives eight iterations (link). This is the progression:

                        56676324799 True
                        56676324863 True
                        56676324919 True
                        56676324977 True
                        56676325039 True
                        56676325091 True
                        56676325141 True
                        56676325187 True
                        56676325243 True
                        56676325292 False

                        Presumably there is no limit to the number of iterations.

                        Saturday, 21 August 2021

                        Analysis of a Recursive Process

                        Today I turned 26438 days old and one of the properties of this number is that it's a member of OEIS A048128:


                         A048128

                        Becomes prime or 4 after exactly 6 iterations of f(x) = sum of prime factors of x.


                        Approximately 10.7% of the numbers in the range up to 26438 satisfy this criterion. The sum of the prime factors is calculated with multiplicity. I was encouraged to investigate how this percentage changed as the number of iterations decreased and increased from six. I decided to increase the range up to 100,000. In this range, the percentage increases to 12.63%. Here is a permalink to the algorithm that I developed in SageMathCell to calculate these percentages.


                        The results for the various iterations were as follows:
                        • 0:   09.59%
                        • 1:   12.29%
                        • 2:   15.21%
                        • 3:   15.24%
                        • 4:   13.44%
                        • 5:   15.31%
                        • 6:   12.63%
                        • 7:   04.89%
                        • 8:   01.18%
                        • 9:   00.21%
                        • 10: 0.020%
                        • 11: 0.020%
                        No number between 1 and 100,000 survives 12 iterations. Only two numbers survive 11 iterations and these are 27933 and 55694. Let's look at the trajectory of these two numbers. 
                        • 27933, 9314, 4659, 1556, 393, 134, 69, 26, 15, 8, 6, 5
                        • 55694, 27849, 9286, 4645, 934, 469, 74, 39, 16, 8, 6, 5


                        As can be seen, both end in the prime number 5. The key to 55694's longevity is its repeated factorisation into biprimes with one small and one large factor. These are the factorisations:
                        • 55694 = 2 * 27847
                        • 27849 = 3 * 9283
                        • 9286 = 2 * 4643
                        • 4645 = 5 * 929
                        • 934 = 2 * 467
                        • 469 = 7 * 67
                        • 74 = 2 * 37
                        • 39 = 3 * 13
                        • 16 = 2 * 2 * 2 * 2
                        • 8 = 2 * 2 * 2
                        • 6 = 2 * 3
                        • 5 is prime
                        Here is a permalink to an algorithm that will calculate the trajectory of any number under this recursive process. Figure 1 shows a graph of the trajectory of 55694.

                        Figure 1

                        How do things change when we consider only the prime factor without multiplicity? Here are the results:
                        • 0:   09.59%
                        • 1:   11.81%
                        • 2:   14.78%
                        • 3:   26.51%
                        • 4:   21.27%
                        • 5:   11.08%
                        • 6:   3.955%
                        • 7:   0.899%
                        • 8:   0.093%
                        • 9:   0.006%
                        • 10: 0.000%
                        • 11: 0.000%
                        Because the sum of the prime factors without multiplicity is always equal to or smaller than the sum with multiplicity, the numbers will in general reach 4 or a prime more quickly.

                        Sunday, 6 June 2021

                        26362: Another Special Palindrome

                        The day that I turned 26262 days old I dedicated a post to the number and titled it 26262: A Special Palindrome. That was on February 21st 2021. Today I'm enjoying the next successive palindromic day, having turned 26362 days old. 

                        Now this is a somewhat unusual palindrome in that it is not a member of OEIS A067030. 


                        A067030



                        Numbers \(n\) that are of the form \(k\) + reverse(\(k\)) for at least one \(k\).



                        Let's be clear firstly that such numbers are not common. The 1000th such number is 38772 which translates to a percentage density of less than 2.6%. The first such numbers are:
                        0, 2, 4, 6, 8, 10, 11, 12, 14, 16, 18, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 121, 132, 141, 143, 154, 161, 165, 176, 181, 187, 198, 201, 202, 221, 222, 241, 242, 261, 262, 281, 282, 302, 303, 322, 323, 342, 343, 362, 363, 382, 383, 403, 404, 423, 424, 443 
                        Of these first 56 members of the sequence, 29 (more than 50%) are palindromic. This is not surprising because most numbers, under the repeated Reverse and Add operation, lead to a palindrome. 196 is the first number that apparently does not. Let's look at the palindromes not belonging to this sequence: 

                        131, 151, 171, 191, 212, 232, 252, 272, 292, 313, 333, 353, 373, 393, 434

                        All of them lead to palindromes under Reverse and Add, as shown below:

                        131 requires 1 steps to reach the palindrome 262
                        151 requires 2 steps to reach the palindrome 505
                        171 requires 2 steps to reach the palindrome 585
                        191 requires 4 steps to reach the palindrome 2552
                        212 requires 1 steps to reach the palindrome 424
                        232 requires 1 steps to reach the palindrome 464
                        252 requires 2 steps to reach the palindrome 909
                        272 requires 2 steps to reach the palindrome 989
                        292 requires 8 steps to reach the palindrome 233332
                        313 requires 1 steps to reach the palindrome 626
                        333 requires 1 steps to reach the palindrome 666
                        353 requires 3 steps to reach the palindrome 4444
                        373 requires 4 steps to reach the palindrome 9559
                        393 requires 4 steps to reach the palindrome 9339
                        434 requires 1 steps to reach the palindrome 868

                        26362 as it turns out is a member of OEIS A070001:


                         A070001

                        Palindromes whose 'Reverse and Add' trajectory (presumably) does not lead to another palindrome.

                         The initial members of this sequence are:

                        4994, 8778, 9999, 11811, 19591, 22822, 23532, 23632, 23932, 24542, 24742, 24842, 24942, 26362, 27372, 29792, 29892, 33933, 34543, 34743, 34943, 39493, 44744, 46064, 46164, 46364, 46564, 46964, 47274, 47574, 48284, 48584, 48684, 48884

                        These palindromes are not regarded as potential Lychrel numbers because they are already palindromes and some of them are the result or end point of \(k\) + reverse(\(k)\) iterations. However, some are not and these, I think, deserve special consideration:

                        19591, 23532, 23932, 24542, 24742, 24942, 26362, 27372, 29792, 33933, 34543, 34743, 34943, 39493, 44744, 46164, 46364, 46564, 46964, 47574, 48584

                        So 26362 is only the 7th palindrome to have the simultaneous property that:

                        • it cannot be derived from \(k\) + reverse(\(k\)) for one or more values of \(k\)
                        • its Reverse and Add trajectory (presumably) does not lead to another palindrome
                        There already two sevens associated with the number because \(7^2\) is a factor, so we have a lucky triple 7.


                        This is not the first time that I've written about palindromic numbers. Apart from my 26262: A Special Palindrome post, I've written about:
                        In researching this post, I came across a category of primes known as Palindromic Wing Primes or PMPs defined as "numbers that are primes, palindromic in base 10, and consisting of one central digit surrounded by two wings having an equal amount of identical digits and different from the central one". Examples are:

                        101
                        99999199999
                        333333313333333
                        7777777777772777777777777
                        11111111111111111111111111111111411111111111111111111111111111111

                        Some of these primes are regarded as potential Lychrel candidates and are listed in OEIS A320516 (with the rule that palindromes are ineligible being relaxed):


                         A320516

                        Palindromic wing primes that are also Lychrel candidates.        
                            

                        Initial members are:
                        7774777, 777767777, 77777677777, 99999199999, 1111118111111, 7777774777777, 111111181111111, 333333373333333, 77777777677777777, 99999999299999999, 9999999992999999999, 33333333333733333333333, 77777777777677777777777, 333333333333373333333333333

                        More information about PWPs can be found here. Palindromes and any numbers can be tested for Lychrel candidature using SageMathCell. A permalink is attached to the screenshoot in Figure 1.

                        Figure 1: permalink 

                        Sunday, 25 August 2019

                        The PrimeLatz Conjecture

                        The PrimeLatz Conjecture is so named in deference to and because of its similarity to the Collatz Conjecture that I've written about in earlier posts, namely:
                        The so-called Collatz Trajectory refers to the sequence of numbers generated by the following rule. Start with any positive integer. If the number is even, divide it by 2. If the number is odd, multiply by 3 and add 1. The conjecture is that the sequence of numbers thus generates will always lead to 1. So far, no exceptions have been found.

                        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.

                        Take the case of 82. Here is the sequence:

                        82 41 184 92 46 23 120 60 30 15 74 37 168 84 42 21 104 52 26 13 72 36 18 9 50 25 122 61 272 136 68 34 17 88 44 22 11 60 ...

                        The sequence repeats after 11 is reached. Because 11 is odd, the next three primes are added. Thus 11 + 13 + 17 + 19 = 60 but 60 was reached earlier when 120 was divided by 2. Let's take another example, this time 84. The sequence is:

                        84 42 21 104 52 26 13 72 36 18 9 50 25 122 61 272 136 68 34 17 88 44 22 11 60 30 15 74 37 168 84 ...


                        Most numbers fall into a loop fairly quickly but what's of interest are those numbers that are more stubborn, such as 83. I deliberately chose numbers that were one above and one below 83 to emphasise the difference. Here is what the OEIS says about the behaviour of 83 where \(a(n)\) represents the sequence of terms:
                        Most small initial values have a very small orbit of few more than the 30 elements of the loop. 
                        N = 83 = a(0) is the most remarkable exception (having an orbit of 16180 + 30 elements), which motivates this sequence.  
                        N = 443 = A293978(0) is another exception, with an orbit of 9066+30 elements, and N = 209 also has a comparatively large orbit of 941 + 30 elements, distinct from those of 83 and 443.
                        The initial value a(0) = 83 is odd, so we add to 83 the next 3 primes (89, 97 and 101) to get a(1) = 370. 
                        370 is even, so we divide by 2 to get a(2) = 185, and so on. 
                        After 8337 iterations, we get a(8337) = 10780054699424618132644155893087038044817868609971935265882538442720. 
                        This is the largest value we will reach. Since this is even we divide by 2 to get a(8338). The result a(8338) is again even, so we divide by 2 once more to get a(8339), and so on... 
                        After iteration 16171, we reach a(16171) = 768. The next 8 iterations consist in dividing by 2, until we get a(16179) = 3. Since this is odd, we add the next three primes (5, 7 and 11) to reach a(16180) = 26 = A193230(14). This is an element of the loop: 30 iterations later, we get again 26, and the sequence has become periodic.
                        All numbers less than 100 million eventually fall into the following loop:
                        9,50,25,122,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

                        ADDENDUM 10th May 2020:

                        I'm now approaching my 26000th day on Earth and I've noticed that, in the orbit of 83, there is a cluster of numbers between 25000 and 31000 with wide gaps on either side. Figure 1 shows what I mean:

                        Figure 1

                        There is a gap of over 10000 from 15456 to 25710 and then a gap of over 20000 from 30912 to 51536. As I write this on the 10th May 2020, I'm 25970 days old and this number is in the 83 orbit. There are a total of 54 numbers that fall in the range from 25710 to 30912.

                        The full orbit of 83 can be viewed, in comma-delimited format, by following this link (it's 176 pages long):

                        https://docs.google.com/document/d/1uP-sBqDNjbhkEqK8IEDG-doN2QeYXnq0K8QObWkzPWU/edit?usp=sharing