Saturday, 12 July 2025

13x+1 Record Breaker

The record breakers for the 3x + 1, 5x + 1, 7x + 1, 11x + 1, 13x + 1 and 17x + 1 Collatz mappings are a fairly exclusive set of numbers and its members from 27859 to 40000 are 27859, 28927, 30301, 30771, 32326, 32581, 34239, 35556, 35655, 35803, 37647, 38030, 39053, 39254 and 39281. Why start at 27859? Well this is the number associated with my diurnal age and the next celebration of such an event is about three years away when I reach 28927 days old. 27859 is associated with the 13x + 1 mapping where the numbers that mark the record breaking trajectory lengths are shown in Figure 1.


Figure 1: see blog post

Figure 2 shows the trajectory for 27859 using a logarithmic scale for the vertical axis.


Figure 2: permalink

The trajectory is as follows ending in a 7, 1, 14, 7 loop. The maximum value reached is an impressive 1,004,280,846,804. That's just over a trillion. That's why a logarithmic scale was needed for the vertical axis!

27859, 362168, 181084, 90542, 45271, 588524, 294262, 147131, 1912704, 956352, 478176, 239088, 119544, 59772, 29886, 14943, 4981, 64754, 32377, 420902, 210451, 2735864, 1367932, 683966, 341983, 4445780, 2222890, 1111445, 222289, 2889758, 1444879, 18783428, 9391714, 4695857, 61046142, 30523071, 10174357, 132266642, 66133321, 859733174, 429866587, 5588265632, 2794132816, 1397066408, 698533204, 349266602, 174633301, 2270232914, 1135116457, 14756513942, 7378256971, 95917340624, 47958670312, 23979335156, 11989667578, 5994833789, 856404827, 11133262752, 5566631376, 2783315688, 1391657844, 695828922, 347914461, 115971487, 1507629332, 753814666, 376907333, 34264303, 445435940, 222717970, 111358985, 22271797, 289533362, 144766681, 1881966854, 940983427, 12232784552, 6116392276, 3058196138, 1529098069, 19878274898, 9939137449, 129208786838, 64604393419, 839857114448, 419928557224, 209964278612, 104982139306, 52491069653, 4771915423, 433810493, 5639536410, 2819768205, 939922735, 187984547, 2443799112, 1221899556, 610949778, 305474889, 101824963, 1323724520, 661862260, 330931130, 165465565, 33093113, 430210470, 215105235, 71701745, 14340349, 186424538, 93212269, 1211759498, 605879749, 7876436738, 3938218369, 51196838798, 25598419399, 3656917057, 47539921742, 23769960871, 309009491324, 154504745662, 77252372831, 1004280846804, 502140423402, 251070211701, 83690070567, 27896690189, 362656972458, 181328486229, 60442828743, 20147609581, 1831600871, 23810811324, 11905405662, 5952702831, 1984234277, 25795045602, 12897522801, 4299174267, 1433058089, 18629755158, 9314877579, 3104959193, 443565599, 5766352788, 2883176394, 1441588197, 480529399, 68647057, 892411742, 446205871, 5800676324, 2900338162, 1450169081, 18852198054, 9426099027, 3142033009, 40846429118, 20423214559, 1856655869, 24136526298, 12068263149, 4022754383, 52295806980, 26147903490, 13073951745, 4357983915, 1452661305, 484220435, 96844087, 1258973132, 629486566, 314743283, 4091662680, 2045831340, 1022915670, 511457835, 170485945, 34097189, 4871027, 695861, 9046194, 4523097, 1507699, 19600088, 9800044, 4900022, 2450011, 31850144, 15925072, 7962536, 3981268, 1990634, 995317, 12939122, 6469561, 924223, 12014900, 6007450, 3003725, 600745, 120149, 1561938, 780969, 260323, 37189, 483458, 241729, 3142478, 1571239, 20426108, 10213054, 5106527, 66384852, 33192426, 16596213, 5532071, 71916924, 35958462, 17979231, 5993077, 77910002, 38955001, 506415014, 253207507, 36172501, 470242514, 235121257, 33588751, 4798393, 62379110, 31189555, 6237911, 81092844, 40546422, 20273211, 6757737, 2252579, 321797, 45971, 597624, 298812, 149406, 74703, 24901, 323714, 161857, 2104142, 1052071, 13676924, 6838462, 3419231, 44450004, 22225002, 11112501, 3704167, 48154172, 24077086, 12038543, 1094413, 14227370, 7113685, 1422737, 18495582, 9247791, 3082597, 440371, 5724824, 2862412, 1431206, 715603, 102229, 1328978, 664489, 94927, 13561, 176294, 88147, 1145912, 572956, 286478, 143239, 1862108, 931054, 465527, 6051852, 3025926, 1512963, 504321, 168107, 2185392, 1092696, 546348, 273174, 136587, 45529, 4139, 53808, 26904, 13452, 6726, 3363, 1121, 14574, 7287, 2429, 347, 4512, 2256, 1128, 564, 282, 141, 47, 612, 306, 153, 51, 17, 222, 111, 37, 482, 241, 3134, 1567, 20372, 10186, 5093, 463, 6020, 3010, 1505, 301, 43, 560, 280, 140, 70, 35, 7, 1, 14, 7

Friday, 11 July 2025

A Special Number: 3367

 Figure 1 shows an interesting result via Cliff Pickover.


To see why 3367 can be written as the various fractions shown, one approach is to consider a number of the form 0a0a0a where 1a99. Let's manipulate this number in the following way:0a0a0aa+a+a=a×0101013a=0101013=3367Thus when a=11 we have:0a0a0aa+a+a=11111111+11+11If a>99, then the pattern breaks down.

Thursday, 10 July 2025

A Peculiarity

Sometimes, when looking for properties of the number associated with my diurnal age, I struggle to find a property that interests me. Today was one such occasion and the number was 27857. However, I did notice a "peculiarity" as I call it and it involved both the sum of the number's digits cubed and the number's proper divisors. Firstly, the digits cubed:2785723+73+83+53+73=1331Next, let's consider the number's proper divisors:278571,89,313 as proper divisorssum of proper divisors =403=13×311331 when concatenated

This peculiarity is quite rare and in fact up to one hundred million, there is only one other number with this same property and that is 150809. The details are:15080913+53+03+83+03+93=13671508091,239,631 as proper divisorssum of proper divisors =871=13×671367 when concatenatedSo 27857 has a very interesting property after all, even if it is rather obscure. I still find it rather amazing that I was able to check up to one hundred million using SageMath on my M1 Macbook Air.

Wednesday, 9 July 2025

Partitions and Generating Functions

I asked Gemini to explain the statement:

“It’s long been known that you can associate
a polynomial equation to any partition.”

Here's what it came up with.

The statement refers to the relationship between an integer partition and a generating function, which is a way of encoding an infinite sequence of numbers as the coefficients of a formal power series. In this context, the "polynomial equation" is more accurately a generating function, which can be represented as a polynomial-like expression.


A partition of a positive integer n is a way of writing n as a sum of positive integers. The order of the addends (the parts of the partition) does not matter. For example, the partitions of the number 4 are:

  • 4

  • 3 + 1

  • 2 + 2

  • 2 + 1 + 1

  • 1 + 1 + 1 + 1

The statement means that for any given integer, we can construct a polynomial-like expression (a generating function) that "encodes" all of its possible partitions.

How the Association Works

The connection is established through the concept of generating functions. The generating function for the number of partitions of an integer n, denoted as p(n), can be expressed as an infinite product:P(x)=n=0p(n)xn=k=111xkLet's break down this formula:

  • p(n) This represents the number of partitions for an integer n

  • n=0p(n)xn This is the power series where the coefficient of xn is the number of partitions of n.

  • k=111xk This is the infinite product that generates these coefficients.


Each term in the product 11xk can be expanded as a geometric series:

  • 11x=1+x+x2+x3+ This represents using the number 1 as a part in the partition

  • 11x2=1+x2+x4+x6+ This represents using the number 2 as a part

  • 11x3=1+x3+x6+x9+ This represents using the number 3 as a part

  • And so on for all integers k.

When you multiply these series together, the coefficient of xn in the resulting series will be the total number of ways to form n by adding these parts.

Examples

Let's find the partitions for the number 3. The partitions are:

  • 3

  • 2 + 1

  • 1 + 1 + 1

There are 3 partitions of 3.


Now, let's see how the generating function gives us this result. We look at the expansion of the product:(1+x+x2+x3+)(1+x2+x4+)(1+x3+x6+)To get the term x3, we can combine terms from these expansions in the following ways:

  • From the first factor, take x3. This corresponds to the partition 1 + 1 + 1.

  • From the first factor, take x1, and from the second factor, take x2. This corresponds to the partition 1 + 2.

  • From the third factor, take x3. This corresponds to the partition 3.


The coefficient of x3 is therefore 3, which matches the number of partitions.


Here is another example for the partitions of 4, which we know is 5.


To find the coefficient of x4, we would consider combinations like:

  • x4 from the first factor: 1 + 1 + 1 + 1

  • x2 from the first factor and x2 from the second: 1 + 1 + 2

  • x1 from the first factor and x3 from the third: 1 + 3

  • x4 from the second factor: 2 + 2

  • x4 from the fourth factor: 4


The total number of ways to get x4 is 5, so the coefficient is 5.


In essence, the "polynomial" or generating function provides a systematic way to count the number of partitions for any integer by looking at the coefficients of the series expansion.

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

Building Sequences from a Seed Pair

 FIRST EXAMPLE

The numbers 1 and 4 have the interesting properties that:

  • their sum is prime: 1 + 4 = 5
  • their difference is prime: 4 - 1 = 3
  • their product (4) is the average of a pair of twin primes (3 and 5)
Let's make this the starting point of sequence and let the third member of the sequence be x. This gives us: 1,4,x. We want 4 and x to share the properties that 1 and 4 enjoyed. Namely:
  • 4 + x is prime
  • x - 4 is prime
  • 4 ×x is the average of a pair of twin primes
A little trial and error shows that the smallest value of x we are looking for is 15 because:
  • 4 + 15 = 19 is prime
  • 15 - 4 = 11 is prime
  • 4 × 15 =60 is average of a pair of twin pairs (59 and 61)
By using not trial and error but a simple algorithm we can find further terms. The result is OEIS A154493 and the initial terms are:

1, 4, 15, 28, 39, 50, 81, 350, 459, 512, 675, 944, 987, 1040, 1917, 1936, 2325, 2378, 2421, 2588, 2745, 2812, 3459, 3488, 3495, 3506, 5667, 5804, 6027, 6074, 24765, 24832, 25479, 25552, 27621, 27848, 27951, 27980, 34101, 34720, 34773, 35344

SECOND EXAMPLE

Let's take another seed pair with the simple property that the two numbers must add to a cubic number. We'll use 1 and 7 as our seed pair because: 1+7=8=23. This time the sequence generated begins thus (permalink):

1, 7, 20, 44, 81, 135, 208, 304, 425, 575, 756, 972, 1225, 1519, 1856, 2240, 2673, 3159, 3700, 4300, 4961, 5687, 6480, 7344, 8281, 9295, 10388, 11564, 12825, 14175, 15616, 17152, 18785, 20519, 22356, 24300, 26353, 28519, 30800, 33200, 35721, 38367

Here we see that the next pair (7 and 20) satisfy since:7+20=27=33.

THIRD EXAMPLE

Let's start with seed numbers 1 and 2 this time with the property that:
  • the sum of the two numbers has a digit sum that is prime
  • the product of the two numbers plus 1 has a digit product that is prime
The seed pair 1 and 2 satisfy since:
  • the sum of 1 and 2 is 3 and 3 is prime
  • the product of 1 and 2 plus 1 is 3 and 3 is prime
This leads to the following sequence: 1, 2, 9, 12, 13, 16, 18, 23, 24, 25, 27, 29, 32, 33, 34, 40, 45, 47, 51, 60, 62, 66, 100, ... (permalink). There are 2211 terms in the range up to 40000.

Tuesday, 1 July 2025

An Usual Application of Continued Fractions

Yesterday I turned 27487 days old. This is a prime number of days and this number together with the next three prime numbers form the following sequence:$$27847, 27851, 27883, 27893$$Now let's combine these numbers together to from a continued fraction:

                    1            
27847 + -------------------------
                        1        
         27851 + ----------------
                             1   
                  27883 + -------
                           27893 

This continued fraction is equivalent to the improper fraction:60318972554799133121660851250413with both numerator and denominator being prime. The first of the primes, 27847, qualifies it for membership in OEIS A270884:


A270884: smallest of FOUR consecutive prime numbers that when represented as a simple continued fraction, generates prime numbers in the numerator and denominator, when reduced.


The initial members are (permalink):

41, 367, 619, 659, 701, 2267, 2789, 3253, 3463, 6917, 8969, 9221, 11959, 13499, 14431, 17359, 17851, 20143, 22283, 23669, 26107, 27847, 28547, 28879, 29537, 32503, 32717, 32987, 37549

Let's look at the first of these numbers, 41, for another example. The four primes are thus 41, 43, 47 and 53.

            1        
41 + ----------------
               1     
      43 + ----------
                  1  
            47 + ----
                  53 

Here the continued fraction is equal to:4398061107209with both numerator and denominator being prime. Up to one million, the continued fractions of five and six runs of consecutive primes do not produce improper fractions with numerators and denominators that are prime. However, some runs of seven consecutive primes do. Up to 40,000 these are 223, 1579, 5881, 8293, 9013, 12347, 15121, 17783, 25523 and 38903 (permalink). Let's look at the first of these: 223.

                         1                    
223 + ----------------------------------------
                             1                
       227 + ---------------------------------
                                1             
              229 + --------------------------
                                    1         
                     233 + -------------------
                                       1      
                            239 + ------------
                                           1  
                                   241 + -----
                                          251 

This produces the fraction:39053357680436977175123705045789with both numerator and denominator prime. No numbers satisfy for runs of eight and nine consecutive primes but for runs of ten we have 5519, 13037, 18743 and 39857 (permalink). Let's look at 5519. The continued fraction (this time in compact format) is:5519;5521,5527,5531,5557,5563,5569,5573,5581,5591]=278861541321023262605148323938797098995052754705003449540186402260387567with the numerator and denominator prime.