Showing posts with label reverse. Show all posts
Showing posts with label reverse. Show all posts

Saturday, 20 September 2025

Seven Eleven Rules

I was struggling to find something that caught my fancy regarding the number associated with my diurnal age today: 27929. I thought I'd look at its reverse, 92972, and compare their factorisations. The results were:$$ \begin{align} 27929 &= 11 \times 2539 \\ 92972 &=2^2 \times 11 \times 2113 \end{align} $$Clearly, the number and its reverse share a common prime factor of 11. I then realised that 27929 has a digit sum of 29 and the two digits, when added together, give 11. So I then decided to look for numbers with the following properties:

  • number is divisible by 11
  • its reverse is also divisible by 11
  • its sum of digits gives a number whose digits sum to 11
It turns out that there are only 30 numbers that satisfy these criteria in the range up to 40000. They are:

20999, 21989, 22979, 23969, 24959, 25949, 26939, 27929, 28919, 29909, 30899, 30998, 31889, 31988, 32879, 32978, 33869, 33968, 34859, 34958, 35849, 35948, 36839, 36938, 37829, 37928, 38819, 38918, 39809, 39908

The details are (permalink):

  number   factors              reverse   factors              digit sum   sum

  20999    11 * 23 * 83         99902     2 * 11 * 19 * 239    29          11
  21989    11 * 1999            98912     2^5 * 11 * 281       29          11
  22979    11 * 2089            97922     2 * 11 * 4451        29          11
  23969    11 * 2179            96932     2^2 * 11 * 2203      29          11
  24959    11 * 2269            95942     2 * 7^2 * 11 * 89    29          11
  25949    7 * 11 * 337         94952     2^3 * 11 * 13 * 83   29          11
  26939    11 * 31 * 79         93962     2 * 11 * 4271        29          11
  27929    11 * 2539            92972     2^2 * 11 * 2113      29          11
  28919    11^2 * 239           91982     2 * 11 * 37 * 113    29          11
  29909    11 * 2719            90992     2^4 * 11^2 * 47      29          11
  30899    11 * 53^2            99803     11 * 43 * 211        29          11
  30998    2 * 11 * 1409        89903     11^2 * 743           29          11
  31889    11 * 13 * 223        98813     11 * 13 * 691        29          11
  31988    2^2 * 11 * 727       88913     11 * 59 * 137        29          11
  32879    7^2 * 11 * 61        97823     11 * 8893            29          11
  32978    2 * 11 * 1499        87923     11 * 7993            29          11
  33869    11 * 3079            96833     11 * 8803            29          11
  33968    2^4 * 11 * 193       86933     7 * 11 * 1129        29          11
  34859    11 * 3169            95843     11 * 8713            29          11
  34958    2 * 7 * 11 * 227     85943     11 * 13 * 601        29          11
  35849    11 * 3259            94853     11 * 8623            29          11
  35948    2^2 * 11 * 19 * 43   84953     11 * 7723            29          11
  36839    11 * 17 * 197        93863     7 * 11 * 23 * 53     29          11
  36938    2 * 11 * 23 * 73     83963     11 * 17 * 449        29          11
  37829    11 * 19 * 181        92873     11 * 8443            29          11
  37928    2^3 * 11 * 431       82973     11 * 19 * 397        29          11
  38819    11 * 3529            91883     11 * 8353            29          11
  38918    2 * 11 * 29 * 61     81983     11 * 29 * 257        29          11
  39809    7 * 11^2 * 47        90893     11 * 8263            29          11
  39908    2^2 * 11 * 907       80993     11 * 37 * 199        29          11


The algorithm can be modified to search for prime numbers other than 11. For example, there are 80 numbers in the range up to 40000 that satisfy these criteria:
  • number is divisible by 7
  • its reverse is also divisible by 7
  • its sum of digits gives a number whose digits sum to 7
These numbers are (permalink):

259, 952, 1078, 1708, 2527, 2779, 3346, 3598, 4165, 5614, 5866, 6433, 6685, 7252, 8071, 8701, 8953, 9079, 9709, 9772, 10087, 10717, 10969, 11536, 11788, 12103, 12355, 13174, 13804, 14623, 14875, 15442, 15694, 17017, 17269, 17962, 18088, 18718, 19537, 19789, 20545, 20797, 21364, 22183, 22813, 23884, 24451, 25207, 25459, 26026, 26278, 26908, 26971, 27097, 27727, 27979, 28546, 28798, 29113, 29365, 30121, 30373, 31129, 31192, 31822, 32641, 32893, 33649, 34216, 34468, 35035, 35287, 35917, 36736, 36988, 37303, 37555, 38122, 38374, 39823

The details are (permalink):

  number   factors             reverse   factors                digit sum   sum

  259      7 * 37              952       2^3 * 7 * 17           16          7
  952      2^3 * 7 * 17        259       7 * 37                 16          7
  1078     2 * 7^2 * 11        8701      7 * 11 * 113           16          7
  1708     2^2 * 7 * 61        8071      7 * 1153               16          7
  2527     7 * 19^2            7252      2^2 * 7^2 * 37         16          7
  2779     7 * 397             9772      2^2 * 7 * 349          25          7
  3346     2 * 7 * 239         6433      7 * 919                16          7
  3598     2 * 7 * 257         8953      7 * 1279               25          7
  4165     5 * 7^2 * 17        5614      2 * 7 * 401            16          7
  5614     2 * 7 * 401         4165      5 * 7^2 * 17           16          7
  5866     2 * 7 * 419         6685      5 * 7 * 191            25          7
  6433     7 * 919             3346      2 * 7 * 239            16          7
  6685     5 * 7 * 191         5866      2 * 7 * 419            25          7
  7252     2^2 * 7^2 * 37      2527      7 * 19^2               16          7
  8071     7 * 1153            1708      2^2 * 7 * 61           16          7
  8701     7 * 11 * 113        1078      2 * 7^2 * 11           16          7
  8953     7 * 1279            3598      2 * 7 * 257            25          7
  9079     7 * 1297            9709      7 * 19 * 73            25          7
  9709     7 * 19 * 73         9079      7 * 1297               25          7
  9772     2^2 * 7 * 349       2779      7 * 397                25          7
  10087    7 * 11 * 131        78001     7 * 11 * 1013          16          7
  10717    7 * 1531            71701     7 * 10243              16          7
  10969    7 * 1567            96901     7 * 109 * 127          25          7
  11536    2^4 * 7 * 103       63511     7 * 43 * 211           16          7
  11788    2^2 * 7 * 421       88711     7 * 19 * 23 * 29       25          7
  12103    7^2 * 13 * 19       30121     7 * 13 * 331           7           7
  12355    5 * 7 * 353         55321     7^2 * 1129             16          7
  13174    2 * 7 * 941         47131     7 * 6733               16          7
  13804    2^2 * 7 * 17 * 29   40831     7 * 19 * 307           16          7
  14623    7 * 2089            32641     7 * 4663               16          7
  14875    5^3 * 7 * 17        57841     7 * 8263               25          7
  15442    2 * 7 * 1103        24451     7^2 * 499              16          7
  15694    2 * 7 * 19 * 59     49651     7 * 41 * 173           25          7
  17017    7 * 11 * 13 * 17    71071     7 * 11 * 13 * 71       16          7
  17269    7 * 2467            96271     7 * 17 * 809           25          7
  17962    2 * 7 * 1283        26971     7 * 3853               25          7
  18088    2^3 * 7 * 17 * 19   88081     7 * 12583              25          7
  18718    2 * 7^2 * 191       81781     7^2 * 1669             25          7
  19537    7 * 2791            73591     7 * 10513              25          7
  19789    7 * 11 * 257        98791     7 * 11 * 1283          34          7
  20545    5 * 7 * 587         54502     2 * 7 * 17 * 229       16          7
  20797    7 * 2971            79702     2 * 7 * 5693           25          7
  21364    2^2 * 7^2 * 109     46312     2^3 * 7 * 827          16          7
  22183    7 * 3169            38122     2 * 7^2 * 389          16          7
  22813    7 * 3259            31822     2 * 7 * 2273           16          7
  23884    2^2 * 7 * 853       48832     2^6 * 7 * 109          25          7
  24451    7^2 * 499           15442     2 * 7 * 1103           16          7
  25207    7 * 13 * 277        70252     2^2 * 7 * 13 * 193     16          7
  25459    7 * 3637            95452     2^2 * 7^2 * 487        25          7
  26026    2 * 7 * 11 * 13^2   62062     2 * 7 * 11 * 13 * 31   16          7
  26278    2 * 7 * 1877        87262     2 * 7 * 23 * 271       25          7
  26908    2^2 * 7 * 31^2      80962     2 * 7 * 5783           25          7
  26971    7 * 3853            17962     2 * 7 * 1283           25          7
  27097    7^3 * 79            79072     2^5 * 7 * 353          25          7
  27727    7 * 17 * 233        72772     2^2 * 7 * 23 * 113     25          7
  27979    7^2 * 571           97972     2^2 * 7 * 3499         34          7
  28546    2 * 7 * 2039        64582     2 * 7^2 * 659          25          7
  28798    2 * 7 * 11^2 * 17   89782     2 * 7 * 11^2 * 53      34          7
  29113    7 * 4159            31192     2^3 * 7 * 557          16          7
  29365    5 * 7 * 839         56392     2^3 * 7 * 19 * 53      25          7
  30121    7 * 13 * 331        12103     7^2 * 13 * 19          7           7
  30373    7 * 4339            37303     7 * 73^2               16          7
  31129    7 * 4447            92113     7 * 13159              16          7
  31192    2^3 * 7 * 557       29113     7 * 4159               16          7
  31822    2 * 7 * 2273        22813     7 * 3259               16          7
  32641    7 * 4663            14623     7 * 2089               16          7
  32893    7 * 37 * 127        39823     7 * 5689               25          7
  33649    7 * 11 * 19 * 23    94633     7 * 11 * 1229          25          7
  34216    2^3 * 7 * 13 * 47   61243     7 * 13 * 673           16          7
  34468    2^2 * 7 * 1231      86443     7 * 53 * 233           25          7
  35035    5 * 7^2 * 11 * 13   53053     7 * 11 * 13 * 53       16          7
  35287    7 * 71^2            78253     7^2 * 1597             25          7
  35917    7^2 * 733           71953     7 * 19 * 541           25          7
  36736    2^7 * 7 * 41        63763     7 * 9109               25          7
  36988    2^2 * 7 * 1321      88963     7 * 71 * 179           34          7
  37303    7 * 73^2            30373     7 * 4339               16          7
  37555    5 * 7 * 29 * 37     55573     7 * 17 * 467           25          7
  38122    2 * 7^2 * 389       22183     7 * 3169               16          7
  38374    2 * 7 * 2741        47383     7^2 * 967              25          7
  39823    7 * 5689            32893     7 * 37 * 127           25          7

Friday, 1 August 2025

Numbers Reversed

What numbers in the range up to 40000 are palindromes formed by the multiplication of a number and its reversal? 

Let's require that the numbers being multiplied are not themselves palindromes because palindromic numbers when multiplied together always form palindromes. We find that only four numbers satisfy: 252, 20502, 23632, 26962 (see permalink). The details are shown in the table below: 


The next number is 2005002 formed by the multiplication of 1002 and 2001. All the numbers being multiplied only consist of the digits 0, 1 and 2 as far as I can tell. For example, 40220902204 is a product of 200102 and 201002. There are no other starting numbers larger than 200102 in the range up to one million because of this restriction. Above one million, the first suitable number is 1000002 which multiplied by its reversal 2000001 produces the palindrome 2000005000002. In fact, any number formed from the digits 0, 1 and 2 (that does not end in 0) will produce a palindrome when multiplied by its reversal.

We can break away from this 0, 1, 2 restriction if we ask:
What numbers in the range up to 40000 are palindromes formed by the multiplication of a number and its reversal plus 1? 
Well, once again, in the range up to 40000, there aren't many. In fact there are only 404, 575 and 737 (see permalink) with details shown in the table below.


The next number after 23 is 318317 which, when multiplied by 713813, gives 227218812722.

Thursday, 13 March 2025

Other Special Classes of Interprimes

On the 1st November 2023, I posted on A Special Class of Interprime and these were non-palindromic composite numbers located between twin primes which, when reversed, are also located between twin primes. Some work both ways while some are only one way because they end in a zero. Figure 1 shows an example of the former while Figure 2 shows an example of the latter.


Figure 1


Figure 2

Today I turned 27738 days old and this number is an interprime number between twin primes which when concatenated with itself forms a number which is also an interprime between twin primes. The result for 27738 is shown in Figure 3.


Figure 3

Numbers of this sort belong to OEIS A235109 :


A235109     Averages q of twin prime pairs, such that q concatenated to q is also the average of a twin prime pair.


The initial members are (
permalink):

42, 102, 108, 180, 192, 270, 312, 420, 522, 660, 822, 882, 1230, 1482, 4242, 4788, 8820, 10332, 11550, 13692, 14550, 14562, 14868, 15732, 17910, 18522, 20550, 21648, 22620, 23670, 23832, 26262, 27738, 35838, 38922, 39042, 40128, 42018, 43962, 44532, 46440

As a variation on this, we could concatenate an interprime with its reversal, thus forming a palindrome. This is shown in Figure 4.


Figure 4

Up to 40000, the initial interprimes with this property are (permalink) 240, 270, 2142, 8388, 22092, 22962, 23832, 24420, 24918, 26262, 27690 and 28110. The sequence does not appear in the OEIS. The members of this sequence are, to be fair, rather sparse and could be made more numerous if the condition that the interprime lay between twin primes was relaxed. If we simply require that the interprime, when concatenated with its reverse, is also an interprime then in the range up to 40000, 263 numbers satisfy. The numbers are (permalink):

9, 15, 21, 42, 93, 102, 105, 108, 160, 240, 246, 270, 279, 324, 386, 432, 754, 810, 909, 933, 1092, 1302, 1452, 1611, 1998, 2142, 2205, 2295, 2322, 2336, 2470, 2568, 2667, 2892, 2900, 2946, 3021, 3326, 3423, 3453, 3465, 3558, 3588, 3627, 3672, 3736, 3885, 3921, 4002, 4065, 4076, 4131, 4353, 4422, 4646, 4742, 4785, 5193, 5439, 5481, 5502, 5529, 5607, 5804, 6107, 6340, 6376, 6798, 6969, 7182, 7212, 7494, 8097, 8169, 8388, 8437, 8844, 8908, 8985, 9394, 9678, 9865, 10008, 10101, 10794, 10815, 10875, 10944, 10998, 11226, 11445, 11523, 11817, 12024, 12111, 12252, 12489, 12500, 12514, 12826, 12947, 13056, 13101, 13320, 13374, 13482, 13560, 13674, 13740, 13881, 13965, 14064, 14415, 14592, 14715, 15015, 15087, 15534, 15664, 16230, 16396, 16799, 17388, 17529, 17958, 18042, 18288, 18360, 18447, 18531, 18737, 19149, 19314, 19548, 19704, 19857, 20022, 20049, 20057, 20225, 20358, 20403, 20687, 20745, 20751, 20808, 21015, 21104, 21189, 21202, 21381, 21404, 21558, 21969, 22092, 22272, 22719, 22866, 22904, 22962, 23124, 23631, 23832, 24036, 24144, 24333, 24420, 24522, 24804, 24855, 24918, 25001, 25080, 25305, 25417, 25455, 25470, 25578, 25595, 25761, 25932, 25960, 26180, 26262, 26412, 26582, 26637, 26675, 26748, 27075, 27429, 27546, 27597, 27690, 27999, 28110, 28117, 28253, 28314, 28410, 28629, 28692, 28869, 29247, 29577, 29720, 29826, 29865, 29937, 30106, 30165, 30217, 30270, 30693, 31149, 31152, 31182, 31269, 31536, 31617, 31653, 31977, 32244, 32325, 32700, 32914, 33186, 33288, 33573, 33588, 33621, 33639, 33854, 33939, 34125, 34290, 34412, 34590, 34683, 34743, 34874, 34962, 35094, 35421, 35674, 35802, 36003, 36442, 36486, 36648, 36694, 36764, 37220, 37514, 37548, 38385, 38856, 39093, 39159, 39447, 39627, 39852, 39999

Let's take 93 from the previous list as an example. It is an interprime that lies midway between 89 and 97. Concatenated with its reverse (39), we get 9339 and this number is midway between 9337 and 9341. Figure 5 illustrates this.


Figure 5

Similarly we could relax the interprime condition for interprimes that are concatenated with themselves (but not reversed). There are 345 interprimes in the range up to 40000 that qualify. An example is 21, an interprime between 19 and 23, that forms 2121, an interprime between 2113 and 2129.


Figure 6

The interprimes between 27700 and 40000 with this property are (permalink):

..., 27738, 27888, 27945, 27990, 28281, 28515, 28613, 28740, 28815, 28851, 28994, 29013, 29170, 29237, 29307, 29448, 29835, 29953, 30000, 30038, 30264, 30300, 30310, 30378, 30468, 30555, 30846, 30856, 30902, 31080, 31122, 31269, 31335, 31347, 31660, 31854, 31960, 32298, 32361, 32715, 32925, 32990, 33018, 33235, 33351, 33465, 33594, 33717, 33840, 33860, 34224, 34734, 34743, 34848, 35325, 35556, 35571, 35838, 35980, 36189, 36462, 36680, 37008, 37053, 37176, 37576, 37850, 38076, 38238, 38310, 38331, 38685, 38922, 39042, 39084, 39093, 39105, 39363, 39378, 39447, 39546, 39691, 39765, 39774, 39894, ...

Lastly, if we relax the interprime condition that the interprime and its reverse must lie between twin primes, then there are 629 numbers that satisfy in the range up to 40000 (permalink) but I won't list those here.

Monday, 22 July 2024

Reversible Seven Factor Numbers

In an recent post titled Remarkable Reversals on June 45h 2024, I covered some of the content that will appear in this current post but here I'll focus more on the actual factorisations of the reversible numbers that can be found in the range up to 40,000. This is the range that most interests me because numbers associated with a person's diurnal age fall within this range.

There are numbers with seven factors (counted with multiplicity) that, when reversed, produce new numbers that also have seven factors (again counted with multiplicity). The number associated with my diurnal age today is one such number. That number is 27504 with the following property:$$ \begin{align} 27504 &= 2^4 \times 3^2 \times 191 \\ 40572 &= 2^2 \times 3^2 \times 7^2 \times 23 \end{align}$$The numbers up to 40,000 with this property are shown below with factorisations of numbers and reversals shown in Figure 1:

8820, 21240, 21708, 21780, 21920, 23280, 23472, 23625, 23800, 25560, 25584, 25758, 26280, 27432, 27504, 27888, 27900, 28836, 29250, 29403, 29736, 29970, 30492, 34884, 36828


Figure 1: permalink

In the range up to 40,000, there are only only three numbers with eight factors such that their reversals also have eight factors. These are 16560, 25515 and 27864 with factorisations shown in Figure 2.


Figure 2: permalink

In the range up to 40,000, there are four numbers with nine factors such that their reversals also have nine factors. These number are 21168, 23424, 23616 and 27456 with factorisations shown in Figure 3.


Figure 3: permalink

For ten factors and beyond, there are no numbers in the range up to 40,000. In my earlier post (Remarkable Reversals), I focused in particular on the number nine factor number 27456 because it has the interesting property that:$$ \begin{align} 27456 &=2^6 \times 3 \times 11 \times 13 \\65472 &=31 \times 11 \times 3 \times 2^6 \end{align}$$

Thursday, 30 May 2024

Fibonacci Sequence and Selfie Numbers

I came across a useful 47 page resource titled Fibonacci Sequence and Selfie Numbers when searching for properties associated with 27451, the number representing how old I am today in days. The article begins as follows:

Numbers represented by their own digits by certain operations are considered as ”Selfie Numbers”. There are many ways of representing ”Selfie Numbers”, such as, numbers written in digit’s order or its reverse. It can also be represented in increasing and/or decreasing order of digits. This is generally obtained by use of basis operations along with factorial and square-root, etc. In this work we have written ”Selfie Numbers” using Fibonacci sequence value in composition form in terms of digit’s order and its reverse.

So for 27451 if we take the digits in order and use F(n) to represent the n-th Fibonacci number than we can write it as F(2 + F(7)) × 45 + 1. In fact, 27451 is one of a group of numbers that can be represented in this way. See Figure 1.


Figure 1

Numbers that can be represented in this way are not that frequent. The next group is shown in Figure 2.


Figure 2

After this the next group does not occur until 43460. Some numbers can be represented in terms of their digit order and the reverse. See Figure 3.


Figure 3


All in all, a useful resource and I've uploaded the PDF to my Google Drive where I can access it whenever I'm struggling to find an interesting property for a number associated with my diurnal age. The author of this paper is absolutely prolific and has published many other papers as well. These are listed in the article and one example is a 55 page paper titled Single Digit Representations of Natural Numbers. The abstract is as follows:

In this work, we established symmetric representation of numbers where one can use any of 9 digits giving the same number. The representations of natural numbers from 0 to 1000 are given using only single digit in all the nine cases, i.e., 1, 2, 3, 4, 5, 6, 7, 8 and 9. This is done only using basic operations: addition, subtraction, multiplication, potentiation and division.

For example, 37 can be written as:$$ \begin{align} 37 &= \frac{111}{1+1+1}\\ &=\frac{222}{2+2+2} \\ &= \frac{333}{3+3+3} \text{ etc.} \end{align}$$Overall, this author's papers seem ideally suited to my Number Theory needs and I'll download them all and add them to my Google Drive for easy access in the future.

Wednesday, 1 November 2023

A Special Class of Interprime

Sometimes mathematical properties can be represented effectively by means of visual aids. This can mean graphs of course but not exclusively. Take for example, OEIS A103741:


 A103741

\(a(n)\) is a non-palindromic composite located between twin primes whose reverse, which is less than it, is also located between twin primes.


The number associated with my diurnal age today, 27240, is a member of this sequence because it is in between two adjacent primes, 27239 and 27241. When reversed to 4372, this reversal is also adjacent to two primes, namely 4371 and 4373. Visually this can be represented as shown in Figure 1 and it is quite effective. Notice how the reversal only works one way, from the larger number to the smaller and not vice versa, as shown by the directional arrows.


Figure 1

The initial members of this sequence are:

60, 240, 270, 600, 810, 822, 2130, 2340, 2802, 8010, 8220, 8430, 8838, 8862, 20550, 22740, 23202, 23370, 23910, 25410, 26880, 27240, 28410, 28572, 28662, 29022, 29760, 80472, 81702, 81930, 81972, 82140, 82530, 83220, 83340, 83640, 85620

What's interesting about this sequence is that there is a huge gap between 29760 and the next term 80472. This is more clearly seen in Figure 2 where the previous numbers have been plotted.


Figure 2

Figure 3 illustrates the number 80472 (note how the reversal here works both ways as shown by the directional arrows):


Figure 3

These types of interprimes thus fall into two categories: ones ending in 0 and ones ending in other digits. The former, like 27240, lead to interprimes that cannot then be reversed to return the original number. The latter, like 80472, lead to interprimes that can be reversed to return the original number.

Wednesday, 14 June 2023

The RATS Sequence Revisited

It was on Saturday, 26th September 2020, that I first wrote about the RATS sequence, the acronym standing for Reverse --> Add --> Then Sort. On that occasion I was looking at the number 26109 that is a member of OEIS A114613:


A114613

Starting numbers for which the RATS sequence has eventual period 3.      


Yesterday the number associated with my diurnal age, 27099, is the next member of that sequence. The sequence runs (permalink):

20169, 20709, 21159, 22149, 23139, 24129, 25119, 26109, 27099, 28089, 29079, 30159, 30168, 30708, 30789, 31149, 31158, 31779, 32139, 32148, 32769, 33129, 33138, 33759, 34119, 34128, 34749, 35109, 35118, 35739, 36108, 36729, 37098, 37719, 38088, 38709, 39078, 39699, ...

As can be seen, the members of this sequence are few and far between. Up to 40,000, there are only 38 terms. In the case of 27099 the progression is:

27099, 111267, 337788, 1122255, 4446666, 1111113, 2222244, 4446666

There are sequences with different periods but for most numbers the progression is infinite. See Table 1:


Table 1

The original post contains more information that I won't repeat here. Using my diurnal age today (27100) as an example, we see the divergent period-2 pattern emerging, with the red showing the progression of this period-2 pattern (permalink).

27100
22277
49999
134999
113344
555566
1111222
2333333
5566666
11222333
44444455
88889999
178888888
156777779
113344555
666677888
1444555555
167999
116677
238889
1122277
4448888
12333337
55666688
133333444
556667777
1233334444
5566667777
12333334444
55666667777
123333334444
556666667777
1233333334444
5566666667777
12333333334444
55666666667777
123333333334444
556666666667777
1233333333334444
5566666666667777

It won't be until I turn 28089 days old that I'll meet this sequence again. The Wolfram Demonstration Project also features the RATS sequence and displays the progression of terms up till the start of the period-2 pattern. See Table 2.


Table 2

Sunday, 29 January 2023

Iteration: Reverse and Add Sum of Digits

My previous post, titled Iteration: Reverse and Subtract Maximum Digit, encouraged me to look at some variants on this theme. I discovered that Reverse and Add Sum of Digits is interesting. In the range up to 100,000, this iteration always produces a loop. The trajectory of maximum length is achieved by 84761 with a length of 126. Here is the trajectory:

84761, 16774, 47786, 68806, 60914, 41926, 62936, 63952, 25961, 16975, 57989, 99013, 31121, 12121, 12128, 82135, 53147, 74155, 55169, 96181, 18194, 49204, 40313, 31315, 51326, 62332, 23342, 24346, 64361, 16366, 66383, 38392, 29408, 80515, 51527, 72535, 53549, 94561, 16574, 47584, 48602, 20704, 40715, 51721, 12731, 13735, 53750, 5755, 5597, 7981, 1922, 2305, 5042, 2416, 6155, 5533, 3371, 1747, 7490, 967, 791, 214, 419, 928, 848, 868, 890, 115, 518, 829, 947, 769, 989, 1015, 5108, 8029, 9227, 7249, 9449, 9475, 5774, 4798, 9002, 2020, 206, 610, 23, 37, 83, 49, 107, 709, 923, 343, 353, 364, 476, 691, 212, 217, 722, 238, 845, 565, 581, 199, 1010, 103, 305, 511, 122, 226, 632, 247, 755, 574, 491, 208, 812, 229, 935, 556, 671, 190, 101, 103

Figure 1 shows a graph of the trajectory.


Figure 1: permalink

Figure 2 shows the same graph by with a logarithmic scale for the y axis.


Figure 2: permalink

Figure 3 shows a plot of the trajectory lengths for the first 100,000 numbers.


Figure 3: permalink

The average trajectory length is a little of over 43. As the numbers get bigger, it's not surprising that the trajectory lengths grow larger. For example, take the set of numbers corresponding to the dates in 2023 (see Turning Dates Into Numbers). For this set of numbers, the average trajectory length is a little over 72 and the record is achieved by 20230518 (corresponding to 18th May 2023) with a trajectory length of 162:

20230518, 81503223, 32230542, 24503244, 44230566, 66503274, 47230599, 99503313, 31330632, 23603334, 43330656, 65603364, 46330689, 98603403, 30430722, 22703424, 42430746, 64703454, 45430779, 97703493, 39430821, 12803523, 32530845, 54803553, 35530878, 87803592, 29530920, 2903622, 2263116, 6113643, 3463140, 413664, 466338, 833694, 496371, 173724, 427395, 593754, 457428, 824784, 487461, 164814, 418485, 584844, 448518, 815874, 478551, 155904, 409575, 575934, 439608, 806964, 469641, 146994, 499674, 477033, 330798, 897063, 360831, 138084, 480855, 558114, 411879, 978144, 441912, 219165, 561936, 639195, 591969, 969234, 433002, 200346, 643017, 710367, 763041, 140388, 883065, 560418, 814089, 980448, 844122, 221469, 964146, 641499, 994179, 971538, 835212, 212559, 955236, 632589, 985269, 962628, 826302, 203649, 946326, 623679, 976359, 953718, 817392, 293748, 847425, 524778, 877458, 854817, 718491, 194847, 748524, 425877, 778557, 755916, 619590, 95946, 64992, 29976, 68025, 52107, 70140, 4119, 9129, 9240, 444, 456, 669, 987, 813, 330, 39, 105, 507, 717, 732, 249, 957, 780, 102, 204, 408, 816, 633, 348, 858, 879, 1002, 2004, 4008, 8016, 6123, 3228, 8238, 8349, 9462, 2670, 777, 798, 921, 141, 147, 753, 372, 285, 597, 816

Figure 4 shows a graph of this trajectory:


Figure 4: permalink

Figure 5 shows the same trajectory but uses a logarithmic scale for the y axis:


Figure 5: permalink

I suspect that a loop is eventually reached for any number, no matter how large. However, I can't prove this but a proof may be possible. This iteration that I've just examined is just another of many possible iterations and I may investigate others at a future date.

Saturday, 28 January 2023

What's Special About 26962?

I'm following my tradition of making a special post for my palindromic days. The last one was 26862 and titled What's Special About 26862? Now I've reached 26962 and this palindrome has some interesting properties. The first is that it can be split up into two factors, each of which is the reverse of the other (with square numbers such as 121 excluded).

26962 = 122 x 221 = 221 x 122

There are not many palindromes with this property in the range up to one million. Here is the list:

  • 252 =12 x 21 = 21 x 12
  • 20502 = 102 x 201 = 201 x 102
  • 23632 = 112 x 211 = 211 x 112
  • 26962 = 122 x 221 = 221 x 122
As can be seen, 26962 is last palindrome with this property in the range up to one million. We have to extend the range in order to find more. In the range between one and two million, the following palindromes are found (permalink):
  • 1113111 = 1011 x 1101 = 1101 x 1011
  • 1226221 = 1021 x 1201 = 1201 x 1021
  • 1357531 = 1121 x 1211 = 1211 x 1121
Notice how all the factors are comprised of the digits 0, 1 and 2 only. If we relax the rule that square numbers are excluded then, with their inclusion, 26962 is a member of OEIS A158642:


 A158642

Palindromic numbers which are the product of a number n and its reversal (n written backwards)



The members of this sequence, up to two million, are:

0, 1, 4, 9, 121, 252, 484, 10201, 12321, 14641, 20502, 23632, 26962, 40804, 44944, 1002001, 1113111, 1226221, 1234321, 1357531

The previously mentioned non-square numbers are marked in blue.

********************************************

26962 is a palindrome which is 
a product of a pair of emirpimes

In the case of 26962, it can be noted that the factors 122 and 221 are products of emirpimes:
  • 122 = 2 x 61
  • 221 = 13 x 17
This property of being a product of emirpimes qualifies 26962 for membership in OEIS A158126:


 A158126

Products of emirpimes pairs, sorted.                                    


The initial members of the sequence are:

765, 1612, 3627, 4606, 4930, 26962, 39483, 48763, 58765, 61306, 69723, 85405, 102910, 107485, 118809, 129682, 134458, 136467, 140572, 146047, 148930, 151209, 155038, 162409, 178555, 194242, 196315, 203098, 213310, 236421, 283798, 291247

********************************************

26962 is a palindrome 
with four distinct prime factors

26962 has four distinct prime factors: 2, 13, 17 and 61. Palindromes with this property are fairly rare and constitute OEIS A046394

 
 A046394

Palindromes with exactly four distinct prime factors.                              



The initial members of this sequence, up to 100,000, are (permalink):

858, 2002, 2442, 3003, 4774, 5005, 5115, 6666, 10101, 15351, 17871, 22422, 22722, 24242, 26562, 26962, 28482, 35853, 36363, 41314, 43734, 43834, 45654, 47874, 49494, 49794, 49894, 51015, 51315, 51415, 53535, 53835, 53935, 56865, 58485, 59295, 59595, 60006, 62526, 62826, 64246, 64446, 66666, 66766, 68286, 73437, 74347, 78387, 81618, 81718, 83638, 83838, 87078, 87178, 89598, 89698, 92829, 96369, 98889

26962 is also a palindrome in base 11, being represented as 19291. This property qualifies it for membership in OEIS A180454.

********************************************

26962 can be written as a sum of two distinct palindromic primes in three different ways

Still on the topic of palindromes, 26962 is a member of OEIS A356854:


 A356854

Palindromes that can be written in more than one way as the sum of two distinct palindromic primes.



The primes are 10301 + 16661 = 10601 + 16361 = 11411 + 15551 = 26962.

The initial members of the sequence are (permalink):

282, 484, 858, 888, 21912, 22722, 23832, 24642, 25752, 26662, 26762, 26862, 26962, 27672, 27772, 27872, 27972, 28482, 28782, 28882, 28982, 29692, 29792, 29892, 29992, 40704, 41514, 41614, 41814, 42624, 42824, 42924, 43434, 43734, 43834, 43934, 44744, 44844, 44944, 45354

********************************************

26962 is a palindromic Ulam number

26962 is also an Ulam number and so, being a palindromic Ulam number, it qualifies for membership in OEIS A173542:


 A173542

Palindromic Ulam numbers.   
                                       


The initial members of the sequence are:

1, 2, 3, 4, 6, 8, 11, 77, 99, 131, 282, 363, 414, 434, 585, 646, 949, 2112, 2332, 2552, 2662, 5335, 5665, 8008, 8338, 8668, 10501, 13531, 13931, 15251, 16961, 17071, 18381, 18581, 18681, 22122, 22322, 23632, 23932, 25452, 26962, 28582, 28682, 30703, 30803, 32123