Showing posts with label sextuplets. Show all posts
Showing posts with label sextuplets. Show all posts

Thursday, 9 July 2026

More On The RDIV Algorithm

Under the RDIV or Recurring Digital Invariant Variant (a weird name I know) Algorithm, all numbers that are not narcissistic will enter a loop or terminate in a narcissistic number. I was interested in the proportion of numbers that terminate in a narcissistic number and so I had Gemini create an algorithm (permalink) to determine this. In the range up to 40000, there are 12224 such numbers which account for 30.56% of the range. These include the few numbers that are narcissistic themselves namely 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,153, 370, 371, 407, 1634, 8208 and 9474 within the range. 

Here is a fuller list of narcissistic numbers (OEIS A005188):

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748, 92727, 93084, 548834, 1741725, 4210818, 9800817, 9926315, 24678050, 24678051, 88593477, 146511208, 472335975, 534494836, 912985153, 4679307774, 32164049650, 32164049651, 40028394225, 42678290603

While 12224 numbers are far too numerous to list here, we can thin the numbers by considering only triplets - meaning groups of three consecutive numbers that all lead to narcissistic numbers. Take for example, the numbers 28220, 28221 and 28222. Let's look at  their trajectories under the RDIV algorithm (permalink for generation). It will be seen that all three terminate in narcissistic numbers.

==================================================
RDIV TRAJECTORY ANALYSIS FOR INPUT: 28220
==================================================
Full Trajectory Visited:
28220, 32864, 41843, 35060, 11144, 2051, 642, 288, 
1032, 98, 145, 190, 730, 370
Loop Entry Point: 370 (encountered at step 14) Pre-period Length: 13 step(s) before entering cycle Cycle Length: 1 distinct number(s) in the loop Canonical Cycle: 370

================================================== RDIV TRAJECTORY ANALYSIS FOR INPUT: 28221 ================================================== Full Trajectory Visited: 28221, 32865, 43944, 62364, 16851, 43671, 25851,
39051, 62418, 41601, 8802, 8208 Loop Entry Point: 8208 (encountered at step 12) Pre-period Length: 11 step(s) before entering cycle Cycle Length: 1 distinct number(s) in the loop Canonical Cycle: 8208 ==================================================

==================================================
RDIV TRAJECTORY ANALYSIS FOR INPUT: 28222
==================================================
Full Trajectory Visited:
28222, 32896, 99868, 191410, 535540, 51700, 19933, 118585,
555540, 66596, 85502, 39050, 62417, 25640, 11957, 78983,
141635, 67108, 57352, 23332, 793, 1099, 13123, 520, 133,
55, 50, 25, 29, 85, 89, 145, 190, 730, 370
Loop Entry Point: 370 (encountered at step 35) Pre-period Length: 34 step(s) before entering cycle Cycle Length: 1 distinct number(s) in the loop Canonical Cycle: 370 ==================================================

In the range up to 40000 there are 1786 such triplets and if we restrict the range to those above 28000, there are only 220 triplets. The central members of each triplet are listed below:

28134, 28221, 28314, 28365, 28563, 28635, 28653, 29121, 29211, 29278, 29728, 29729, 29792, 29972, 30006, 30051, 30055, 30060, 30061, 30151, 30160, 30221, 30222, 30223, 30224, 30233, 30234, 30242, 30249, 30250, 30251, 30252, 30280, 30323, 30324, 30343, 30422, 30433, 30501, 30505, 30510, 30511, 30520, 30521, 30522, 30561, 30601, 30610, 30651, 30820, 31051, 31060, 31111, 31112, 31113, 31114, 31115, 31132, 31133, 31142, 31143, 31284, 31312, 31313, 31412, 31413, 31474, 31475, 31501, 31510, 31744, 31745, 31824, 31839, 32021, 32022, 32023, 32024, 32033, 32034, 32042, 32049, 32050, 32051, 32052, 32080, 32184, 32200, 32201, 32202, 32203, 32204, 32221, 32246, 32254, 32303, 32304, 32402, 32409, 32410, 32426, 32453, 32501, 32502, 32519, 32524, 32529, 32543, 32649, 32685, 32800, 32814, 32865, 33023, 33024, 33043, 33112, 33113, 33199, 33203, 33204, 33310, 33332, 33403, 33556, 33564, 33573, 33574, 33654, 33753, 33754, 34022, 34033, 34112, 34113, 34174, 34175, 34202, 34209, 34210, 34226, 34253, 34303, 34470, 34482, 34523, 34629, 34714, 34715, 34809, 34842, 35001, 35005, 35010, 35011, 35020, 35021, 35022, 35061, 35101, 35110, 35201, 35202, 35219, 35224, 35229, 35243, 35356, 35364, 35373, 35374, 35423, 35500, 35536, 35557, 35558, 35564, 35565, 35601, 35634, 35654, 35655, 35733, 35734, 36001, 36010, 36051, 36249, 36285, 36354, 36429, 36501, 36534, 36554, 36555, 36740, 36825, 37144, 37145, 37353, 37354, 37414, 37415, 37533, 37534, 37640, 37898, 37988, 38020, 38124, 38139, 38214, 38265, 38409, 38442, 38625, 38798, 38978, 39788, 39878

What if we look for quadruplets of such numbers, that is four consecutive numbers such that each of them leads to a narcissistic number under the RDIV algorithm. There are 843 such quadruplets. Let's consider 29727, 29728, 29729 and 29730 (permalink for generation):

==================================================
RDIV TRAJECTORY ANALYSIS FOR INPUT: 29727
==================================================
Full Trajectory Visited:
29727, 92727

Loop Entry Point:   92727 (encountered at step 2)
Pre-period Length:  1 step(s) before entering cycle
Cycle Length:       1 distinct number(s) in the loop
Canonical Cycle:    92727
==================================================

==================================================
RDIV TRAJECTORY ANALYSIS FOR INPUT: 29728
==================================================
Full Trajectory Visited:
29728, 108688, 833089, 1057187, 3822365, 2459843, 
6993329, 14633345, 2220997, 10389865, 78677956,
80868197, 100822787, 349143695, 787435454, 219637307,
478245278, 351621107, 52404626, 3881441, 4229261,
5079674, 6804500, 2471597, 6524693, 5439665, 5517662,
1539794, 10486178, 41064387, 24359267, 50954372,
49665125, 47252996, 93994532, 129609702, 825273306,
186642546, 166928742, 582410385, 272624046, 61034823,
18535747, 29160166, 48085827, 56552866, 22988195,
120039012, 387441198, 696753525, 453809058, 660044022,
20680704, 24287425, 23064482, 18594977, 114856422,
146773863, 235381845, 272643729, 478488762, 493962894,
1307101374, 566117175, 104768859, 708502518, 312695826,
543767442, 93544662, 46934467, 52373923, 49222342,
43185378, 39788517, 88527942, 82822627, 40999873,
151754277, 125229729, 817149759, 991981191, 1683899688,
11389527500, 42046156391, 32164049651 Loop Entry Point: 32164049651 (encountered at step 85) Pre-period Length: 84 step(s) before entering cycle Cycle Length: 1 distinct number(s) in the loop Canonical Cycle: 32164049651 ==================================================

==================================================
RDIV TRAJECTORY ANALYSIS FOR INPUT: 29729
==================================================
Full Trajectory Visited:
29729, 134969, 1114364, 314894, 802507, 395482, 814099, 
1329123, 4787601, 4040559, 4971987, 13326561, 3763237,
1933711, 5610889, 9335335, 4947967, 11525728, 23323781,
22562213, 2077827, 4568037, 3297327, 6434685, 2770104,
1663599, 10206123, 1686691, 7719931, 11215213, 397702,
767532, 298372, 912091, 1062948, 7176570, 2828691,
9257466, 6261021, 560130, 63011, 8021, 4113, 339,
783, 882, 1032, 98, 145, 190, 730, 370 Loop Entry Point: 370 (encountered at step 52) Pre-period Length: 51 step(s) before entering cycle Cycle Length: 1 distinct number(s) in the loop Canonical Cycle: 370 ==================================================
==================================================
RDIV TRAJECTORY ANALYSIS FOR INPUT: 29730
==================================================
Full Trajectory Visited:
29730, 76131, 24828, 66624, 24384, 35091, 62418, 41601, 
8802, 8208 Loop Entry Point: 8208 (encountered at step 10) Pre-period Length: 9 step(s) before entering cycle Cycle Length: 1 distinct number(s) in the loop Canonical Cycle: 8208 ==================================================

Because there are four consecutive numbers, only the first and smallest will be listed and so in this case the number would be 29727. In the range between 28000 and 40000, here are the 60 initial or smallest members of each quadruplet:

29727, 30059, 30220, 30221, 30222, 30232, 30248, 30249, 30250, 30322, 30509, 30519, 30520, 31110, 31111, 31112, 31113, 31131, 31141, 31311, 31411, 31473, 31743, 32020, 32021, 32022, 32032, 32048, 32049, 32050, 32199, 32200, 32201, 32202, 32302, 32408, 32500, 33022, 33111, 33202, 33572, 33752, 34111, 34173, 34208, 34713, 35009, 35019, 35020, 35200, 35372, 35556, 35563, 35653, 35732, 36553, 37143, 37352, 37413, 37532

As for quintuplets, there are 451 of them in the range up to 40000. However, above 28000 there are only 16 and the initial or smallest members of each are:

30220, 30221, 30248, 30249, 30519, 31110, 31111, 31112, 32020, 32021, 32048, 32049, 32199, 32200, 32201, 35019

There are eight sextuplets: 30220, 30248, 31110, 31111, 32020, 32048, 32199, 32200.

There are two septuplets: 31110 and 32199 and no octuplets within the range.

Monday, 31 January 2022

One Step Away

I've written about home primes before in the following posts:

I was reminded of the term again today when I was searching for properties associated with the number representing my diurnal age: 26601. This was one of those numbers that crop up from time to time that seemingly, after exhausting all my usual resources, have no interesting properties. Of course, they invariably do and it's up to me to discover them.

After some time, I hit on the idea of home primes. These are the primes formed when the factors of a composite number are concatenated to form a new number. The process is continued until a prime number is reached. For example, let's consider the number 9 that has a home prime of 311.

9 = 3 x 3 → 33 = 3 x 11 → 311 which is prime

It occurred to me that 26601 = 3 x 8867 --> 38867 is prime. In other words, it only takes one step for 26601 to get to its home prime. Some numbers, the smallest being 49, haven't been shown as yet to reach a home prime but I've written about these Home Primes post. What I was interested in here was finding all the numbers in the range up to 40,000 that reach their home primes in only one step.

I developed a SageMath algorithm (permalink) to find these numbers and it turns out that there are 6699 of them, representing about 16.7% of the total numbers in the range. These numbers form OEIS A046411


A046411



Composite numbers the concatenation of whose prime factors is a prime.



The initial members of the sequence are:
6, 12, 18, 21, 22, 28, 33, 39, 46, 51, 52, 54, 58, 63, 66, 70, 82, 84, 93, 98, 111, 115, 117, 133, 141, 142, 148, 154, 159, 162, 165, 166, 171, 172, 175, 177, 182, 187, 198, 201, 205, 207, 210, 219, 220, 226, 232, 235, 237, 245, 246, 247, 249, 253, 255, 261, 262, 264, 266, 267, 268, 274, 279, 282, 291, 292, 294, 297, 301, 310, 319, 327, 338, 350, 355, 358, 376, 384, 385, 387, 388, 391, 392, 399, 406, 408, 411, 423, 426, 427, 430, 432, 434, 435, 436, 440, 442, 459, 468, 472, 475, 476, 478, 489, 494, 498, 501, 502, 504, 505, 511, 516, 525, 531, 534, 535, 538, 543, 549, 552, 562, 565, 568, 573, 574, 583, 584, 586, 589, 595, 598, 608, 615, 620, 622, 628, 630, 632, 639, 657, 664, 679, 684, 686, 687, 694, 696, 697, 705, 721, 728, 741, 742, 752, 753, 756, 759, 763, 766, 771, 772, 775, 778, 781, 783, 786, 790, 793, 798, 799, 801, 804, 813, 816, 819, 820, 833, 835, 837, 856, 860, 871, 872, 875, 884, 885, 888, 889, 895, 901, 904, 916, 921, 924, 930, 934, 938, 939, 943, 946, 949, 963, 968, 985, 993, ...

So I had my "interesting" property now for 26601 and duly tweeted about it. See Figure 1:


Figure 1: source

I was interested as expected in runs of such numbers. How many pairs, triplets, quadruplets etc. are there in a given range. I decided to extend my range to one million and see what came up. What I found is that there are:
  • 137125 singletons representing 13.7% of the numbers in the range
    (remember it was 16.7% in the range up to 40,000): link

  • 18854 pairs of numbers representing 37708 numbers or 3.77%: link

  • 2557 triplets representing 7671 numbers or 0.767%: link

  • 358 quadruplets representing 1432 numbers or 0.143%

  • 50 quintuplets representing 250 numbers or 0.0250%

  • sextuplets representing 54 numbers or 0.00540%

  • 2 septuplets representing 14 numbers or 0.00140%

  • 1 octuplet representing 8 numbers or 0.000800%
These pairs, triplets, quadruplets, quintuplets, sextuplets, septuplets and octuplets are not necessarily stand-alone. For example, the two septuplets, beginning with 45162 and 45163, together form the octuplet 45162, 45163, 45164, 45165, 45166, 45167, 45168, 45169 (see post titled What's Special About 45162? uploaded on September 3rd 2022). I could modify the algorithm to generate stand-alone groups but I think the overview I've given is sufficient.