Showing posts with label base independent. Show all posts
Showing posts with label base independent. Show all posts

Tuesday, 27 January 2026

Number's Factors to Sequence Algorithm 1

Suppose we take any positive integer \(n \gt 1\) and apply the following rules to it:
  • if prime, double it and add 1: \(n \rightarrow 2n+1\)
  • if composite, determine its number of factors \(f\) counted with multiplicity
  • if \( n \pmod f \equiv 0\) then \(n \rightarrow \dfrac{n}{f} \)
  • if \( n \pmod f \not\equiv 0 \) then \(n \rightarrow n \times f\)
Keep repeating this process until a loop is reached or call a stop after a fixed number of iterations. Let's use 28058 as an example. The sequence generated is 28058, 14029, 28059, 9353, 18706, 56118, 224472, 37412, 9353 and the details are as follows:

  • \(28058 = 2 \times 14029\) and there are two factors
    2 divides 28056 to give 14209

  • \(14029\) is prime
    multiplying by 2 and adding 1 we get 28059

  • \(28059 = 3 \times 47 \times 199\) and there are three factors
    3 divides 28059 to give 9353

  • \(9353 = 47 \times 199\) and there are two factors but 2 doesn't divide 9353
    multiplying by 2 gives 18706

  • \(18706 = 2 \times 47 \times 199\) and there are three factors but 3 doesn't divide 18706
    multiplying by 3 gives 56118

  • \(56118 = 2 \times 3 \times 47 \times 199\) and there are four factors but 4 doesn't divide 56118
    multiplying by 4 gives 224472

  • \(224472 = 2^3 \times 3 \times 47 \times 199\) and there are six factors (with multiplicity)
    6 divides 224472 to give 37412

  • \(37412 = 2^2 \times 47 \times 199\) and there are four factors (with multiplicity)
    4 divides 37412 to give 9353

  • \(9353\) occurred earlier in the sequence and so we have a loop
Figure 1 shows the trajectory.


Figure 1

Some numbers return to their starting points. 27056 is one such number. It's sequence is 28056, 4676, 1169, 2338, 7014, 28056. What appeals to me about this sequence is that it is \( \textbf{base independent}\). Here is permalink to generate the sequence of any number entered into it.

An investigation into what numbers produced sequences of record lengths returned the following number in the range up to one million:

2, 3, 6, 8, 13, 19, 38, 57, 76, 304, 1024, 1579, 2401, 3584, 10331, 12119, 12500, 15379, 24251, 30689, 48661, 57122, 66749, 116603, 155201, 232801, 465602, 698403, 931204

The final number in the list (931204) produces a sequence of length 155. Here are the full details for all the numbers in the list (permalink):
2 --> 11
3 --> 15
6 --> 16
8 --> 18
13 --> 20
19 --> 24
38 --> 25
57 --> 27
76 --> 29
304 --> 32
1024 --> 34
1579 --> 40
2401 --> 43
3584 --> 49
10331 --> 51
12119 --> 53
12500 --> 61
15379 --> 64
24251 --> 65
30689 --> 66
48661 --> 69
57122 --> 92
66749 --> 105
116603 --> 145
155201 --> 146
232801 --> 150
465602 --> 151
698403 --> 153
931204 --> 155

The sequence for 931204 is as follows: 

931204, 2793612, 698403, 1396806, 465602, 232801, 465603, 931206, 310402, 155201, 310403, 1241612, 7449672, 931209, 4656045, 27936270, 223490160, 2458391760, 204865980, 1843793820, 167617620, 16761762, 134094096, 1475035056, 122919588, 13657732, 95604124, 764832992, 69530272, 695302720, 8343632640, 556242176, 7231148288, 516510592, 6198127104, 92971906560, 5468935680, 341808480, 28484040, 256356360, 2819919960, 234993330, 26110370, 182772590, 1462180720, 132925520, 13292552, 1661569, 8307845, 49847070, 398776560, 4386542160, 365545180, 3289906620, 299082420, 29908242, 239265936, 2631925296, 219327108, 1973943972, 179449452, 1794494520, 149541210, 16615690, 2373670, 14242020, 113936160, 1253297760, 104441480, 939973320, 85452120, 8545212, 68361696, 751978656, 62664888, 563983992, 51271272, 512712720, 42726060, 4747340, 33231380, 265851040, 2924361440, 35092337280, 2339489152, 179960704, 2159528448, 32392926720, 550679754240, 30593319680, 458899795200, 26994105600, 1687131600, 140594300, 1265348700, 115031700, 11503170, 92025360, 1012278960, 84356580, 759209220, 69019020, 6901902, 55215216, 607367376, 50613948, 5623772, 803396, 4820376, 602547, 3012735, 18076410, 144611280, 13146480, 1314648, 164331, 821655, 4929930, 39439440, 433833840, 36152820, 4016980, 28118860, 224950880, 20450080, 2045008, 255626, 1278130, 7668780, 61350240, 674852640, 56237720, 506139480, 46012680, 4601268, 36810144, 404911584, 33742632, 303683688, 27607608, 276076080, 23006340, 2556260, 365180, 2191080, 273885, 54777, 219108, 36518, 146072, 876432, 109554, 547770, 91295, 365180

The range of values in this sequence is extreme, ranging from a minimum of 36,518 to a maximum of 550,679,754,240. Figure 2 shows the trajectory with a log scale being necessary for the \(y\) axis.


Figure 2

Saturday, 16 November 2024

An Interesting Intersection

I've never encountered an intersection of the arithmetic derivative and the totient function before until looking at one of the properties associated with the number 27620, my diurnal age yesterday. This number has an interesting property that qualifies it for membership in OEIS A352332:


A352332
: numbers \(k\) for which \(k = \phi(k') + \phi(k'') \), where \( \phi \) is the Euler totient function (A000010), \(k'\) is the arithmetic derivative of \(k\) (A003415) and \(k''\) is the second arithmetic derivative of \(k\) (A068346).

Let's look at 27620 and its arithmetic derivatives (denoted by ' and '') and their totients (denoted by \( \phi \) ). Firstly:$$ \begin{align} 27620 &= 2^2 \times 5 \times 1381\\  (27620)' &=33164 \\(27620)'' &= (33164)'\\ &=33168 \\ \phi(33164) &= 16580 \\ \phi(33168) &= 11040 \\ 27620 &= 16580 + 11040 \end{align} $$Up to 40000, the members of this sequence are 4, 260, 294, 740, 1460, 3140, 3860, 5540, 8420, 10820, 15140, 19940, 21860, 24020, 24260, 27620 and 37460 (permalink). Clearly, numbers satisfying these criteria are few and far between.

This got me thinking about whether there were any numbers that satisfied the criterion that they were simply the sum of their first and second arithmetic derivatives, ignoring the totient function. There are only three numbers in the range up to 100,000 that satisfy. They are 6, 42, 15590 and 47058. Here is the breakdown:$$ \begin{align} 6 &= 5 + 1\\42 &= 41 + 1\\15590 &= 10923 + 466\\47058 &= 47057 + 1 \end{align}$$It can be noted that in all but 15590, the first derivative yields a prime and thus the second derivative is 1.

What if, instead of the totient, we use the sum of the divisors (\(\sigma\)) of the number? In the range up to 100,000, no numbers satisfy but if we use the sum of the PROPER divisors, then a single number qualifies and that is 50 (permalink). Let's look more closely:$$ \begin{align} 50 &= 2 \times 5^2 \\ (50)' &= 45 \\ \sigma(45) -45&= 78 - 45 \\ &=33\\(50)'' &=(45)'\\ &=39\\ \sigma(39)-39 &= 56-39\\ &= 17 \\50 &= 33 +17 \end{align} $$It should be noted that numbers like 50, 15590 and 27620 with the specific properties that have been mentioned in this post retain these properties in bases other than 10. In other words, the properties are base independent.

Monday, 11 December 2023

Fibonacci Numbers in the Abundancy Index

I've made several posts over the years concerning numbers and their associated abundancy. The abundancy of a number \(n\) is defined as:$$ \frac{\sigma_1(n)}{n} $$The abundancy of a number is sometimes referred to as its abundancy index. The number associated with my diurnal age today, 27280, is a member of OEIS  A349687:


 A349687

Numbers whose numerator and denominator of their abundancy index are both Fibonacci numbers.


The initial members of the sequence are (permalink):

1, 2, 6, 15, 24, 26, 28, 84, 90, 96, 120, 270, 330, 496, 672, 1335, 1488, 1540, 1638, 8128, 24384, 27280, 44109, 68200, 131040, 447040, 523776, 18506880, 22256640, 33550336, 36197280, 38257095, 65688320, 91963648, 95472000, 100651008, 102136320, 176432256, 197308800

The initial Fibonacci numbers are as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657

In the case of 27280 we have:$$ \begin{align} \frac{\sigma_1(27280)}{27280} &= \frac{71424}{27280}\\ &= \frac{144}{55} \end{align} $$We find that two earlier members of the OEIS sequence, 330 and 1540, have this same abundancy as do two later members, 68200 and 447040. I only checked up to one million so there will be many more numbers with the same abundancy as 27280. Numbers with the same abundancy are called friendly numbers. These number properties are base independent.

A variation on the above would be use the set of square numbers instead of the Fibonacci numbers. Up to 40,000, the square numbers are:

1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000, 10201, 10404, 10609, 10816, 11025, 11236, 11449, 11664, 11881, 12100, 12321, 12544, 12769, 12996, 13225, 13456, 13689, 13924, 14161, 14400, 14641, 14884, 15129, 15376, 15625, 15876, 16129, 16384, 16641, 16900, 17161, 17424, 17689, 17956, 18225, 18496, 18769, 19044, 19321, 19600, 19881, 20164, 20449, 20736, 21025, 21316, 21609, 21904, 22201, 22500, 22801, 23104, 23409, 23716, 24025, 24336, 24649, 24964, 25281, 25600, 25921, 26244, 26569, 26896, 27225, 27556, 27889, 28224, 28561, 28900, 29241, 29584, 29929, 30276, 30625, 30976, 31329, 31684, 32041, 32400, 32761, 33124, 33489, 33856, 34225, 34596, 34969, 35344, 35721, 36100, 36481, 36864, 37249, 37636, 38025, 38416, 38809, 39204, 39601, 40000

We find only 18 numbers qualify (permalink): 

1, 40, 81, 135, 216, 224, 400, 819, 1372, 3240, 3744, 4650, 6318, 18144, 21700, 27930, 30240, 32760

Here is the breakdown:

1 --> 1/1 = 1/1
40 --> 90/40 = 9/4
81 --> 121/81 = 121/81
135 --> 240/135 = 16/9
216 --> 600/216 = 25/9
224 --> 504/224 = 9/4
400 --> 961/400 = 961/400
819 --> 1456/819 = 16/9
1372 --> 2800/1372 = 100/49
3240 --> 10890/3240 = 121/36
3744 --> 11466/3744 = 49/16
4650 --> 11904/4650 = 64/25
6318 --> 15288/6318 = 196/81
18144 --> 60984/18144 = 121/36
21700 --> 55552/21700 = 64/25
27930 --> 82080/27930 = 144/49
30240 --> 120960/30240 = 4/1
32760 --> 131040/32760 = 4/1

These numbers belong to OEIS A069070.