Thursday, 15 May 2025

Revisiting Fibodiv and Repfigit Numbers

On the 21st January 2024, I made a post titled Fibodiv Numbers and today I'm revisiting this topic because 27801, the number associated with my diurnal age today, is one such number. There aren't many of them. In the range up to one million, there are only 233. Up to 40,000 these are (permalink):

14, 19, 28, 47, 61, 75, 122, 149, 183, 199, 244, 298, 305, 323, 366, 427, 488, 497, 549, 646, 795, 911, 969, 1292, 1301, 1499, 1822, 1999, 2087, 2602, 2733, 2998, 3089, 3248, 3379, 3644, 3903, 4555, 4997, 5204, 5466, 6178, 6377, 6496, 6505, 7288, 7806, 7995, 8199, 8845, 9107, 9161, 9267, 9744, 10408, 11709, 12356, 12992, 13010, 14311, 14999, 15445, 15612, 16913, 17690, 18214, 18322, 18534, 19515, 19999, 20816, 20987, 21623, 22117, 23418, 24712, 24719, 26020, 27321, 27483, 27801, 28622, 29107, 29923, 29998, 30890, 31224, 32498, 32525, 33826, 33979, 35127, 36428, 36644, 37729, 39030

These numbers form OEIS A130792: numbers k whose representation can be split in two parts which can be used as seeds for a Fibonacci-like sequence containing k itself. 

In that OEIS entry Mathematica code has been entered which is incomprehensible to me but fortunately Google Gemini (or similar) can be used to convert this code to Python that can then be run in SageMathCell. The Python code runs perfectly and quickly generates the 233 Fibodiv numbers. Gemini also provides an explanation of how the code works and additional help can be obtained if needed (link). This ease of converting from any programming language to a language of ones own choice is very useful.

So let's see how 27801 earns it right of inclusion into OEIS A130792 (permalink):27,801,828,1629,2457,4086,6543,10629,17172,27801We see how the two parts of 27801, 27 and 801, serve as seeds for a Fibonacci-like sequence that eventually generates the number 27801.

Now Repfigit numbers are similar to Fibodiv numbers and in fact the two digit Repfigit numbers are also Fibodiv numbers. I discussed these in my post On Turning 75 on April 3rd 2024. They belong to OEIS A007629: Repfigit (REPetitive FIbonacci-like diGIT) numbers (or Keith numbers): numbers n with k digits such that a Fibonacci-like sequence can be defined using as seeds the digits of n and then at each step adding the last k terms. If n itself appears in the sequence, then it is a repfigit number. Up to 40000, the members of this sequence are (permalink):

14, 19, 28, 47, 61, 75, 197, 742, 1104, 1537, 2208, 2580, 3684, 4788, 7385, 7647, 7909, 31331, 34285, 34348

An example is 197 with three digits such that:1,9,7,17,33,57,107,197We can see that:1+9+7=179+7+17=337+17+33=5717+33+57=10733+57+107=197A full list of Keith numbers can be found at this site. 

Wednesday, 14 May 2025

Some Interesting Integer Ratios

The number 27800 (my diurnal age today) has the following divisors: 1, 2, 4, 5, 8, 10, 20, 25, 40, 50, 100, 139, 200, 278, 556, 695, 1112, 1390, 2780, 3475, 5560, 6950, 13900, 27800. If we concatenate these divisors in the order shown (from smallest to largest) we get the rather large integer shown below.

1245810202540501001392002785566951112139027803475556069501390027800

The sum of these divisors is 65100 and it so happens that 65100 divides this concatenated number without remainder to give:

19136869470668218147342592712241952567419781927427896612924578

Numbers with this property belong to OEIS A308486: numbers such that the sum of divisors divides the concatenation (in ascending order) of divisors. The initial members up to 40000 are (permalink):

1, 2, 6, 10, 40, 98, 112, 120, 1904, 2680, 4040, 4128, 5136, 9920, 12224, 17900, 20880, 27800

Looking at the number 98 in the list we see that its divisors are 1, 2, 7, 14, 49 and 98 that have a total sum of 171 and whose concatenated divisors form the number 127144998. Thus we have:127144998171=2×33×19×12392332×19=2×3×123932=743538What if we consider the concatenation of a number's factors (with repetition) and whether it can be divided by its sum of factors (again with repetition). We need to ignore the prime numbers or else they will all get included. There are 277 composite numbers satisfying the criterion in the range up to 40000 (permalink):

8, 14, 20, 24, 27, 62, 125, 150, 160, 180, 194, 218, 300, 343, 452, 510, 512, 548, 570, 605, 612, 627, 651, 662, 663, 720, 935, 1183, 1210, 1235, 1331, 1335, 1575, 1676, 1994, 2090, 2106, 2130, 2197, 2218, 2303, 2337, 2345, 2350, 2428, 2436, 2640, 2667, 2675, 2679, 2744, 3087, 3102, 3108, 3168, 3237, 3275, 3399, 3509, 3553, 3740, 3835, 4029, 4046, 4125, 4180, 4347, 4384, 4392, 4410, 4488, 4565, 4704, 4805, 4913, 5015, 5037, 5047, 5120, 5551, 5829, 5888, 5968, 6223, 6250, 6549, 6662, 6666, 6747, 6837, 6859, 6888, 6923, 7030, 7189, 7337, 7448, 7449, 7462, 7488, 8000, 8064, 8165, 8246, 8421, 8624, 8742, 8853, 8949, 9000, 9331, 9344, 9709, 9804, 9975, 9990, 10017, 10125, 10146, 10240, 10387, 10800, 10854, 10865, 10879, 10989, 11045, 11121, 11205, 11264, 11704, 11891, 12032, 12152, 12167, 12288, 12337, 13237, 13243, 13277, 13284, 13702, 13792, 13824, 13858, 14308, 14457, 14555, 14580, 15015, 15025, 15042, 15054, 15301, 15552, 15820, 16038, 16428, 16549, 16827, 16856, 17347, 17496, 17600, 17850, 17914, 17949, 18172, 18213, 18377, 18495, 18821, 18963, 19135, 19425, 19513, 19683, 19860, 19885, 19910, 20041, 20083, 20727, 20746, 20878, 20951, 21033, 21175, 21197, 21340, 21965, 21978, 22008, 22021, 22152, 22275, 22317, 23069, 23280, 23548, 23715, 23785, 23998, 24037, 24244, 24389, 24986, 25182, 25344, 25647, 26129, 26754, 27010, 27480, 27664, 27832, 27880, 28006, 28037, 28566, 28577, 28840, 28896, 29064, 29281, 29326, 29388, 29602, 29614, 29624, 29783, 29791, 30082, 30186, 30226, 30229, 30240, 30420, 30814, 30825, 31097, 31349, 31412, 31581, 31780, 32076, 32418, 32640, 32697, 33292, 33473, 33480, 34132, 34133, 34481, 34521, 34773, 35046, 35557, 35616, 36022, 36040, 36162, 36176, 36478, 36504, 37026, 37789, 38024, 38200, 38340, 38399, 38480, 38658, 39292, 39406, 39463

This sequence of numbers is NOT to be found in the OEIS. Let's look at one of the numbers in the above list, namely 27832.27832=23×72×71The concatenated factors form the number 2227771 and the sum of these divisors is 91. Thus we have:222777191=7×13×244817×13=24481There are other variations on the two themes covered in this post. For example, we could consider only the proper divisors of a number and look for numbers whose proper divisors, when concatenated from smallest to largest, are divisible by the sum of the proper divisors. We need to exclude prime numbers because the proper divisor in every case is 1 and thus will divide any number. There are 38 composite numbers in the range up to 40000 (permalink):

4, 15, 18, 24, 69, 208, 247, 501, 559, 565, 692, 697, 1501, 2077, 2257, 2759, 3551, 3661, 4135, 4227, 5123, 5461, 5536, 6109, 8640, 10821, 12179, 12667, 13631, 16939, 19781, 23587, 24307, 26827, 27331, 30701, 33877, 38887

Let's consider 69 in the previous list. It has proper divisors of 1, 3 and 23 that form the concatenated number 1323 with a sum of 27. Thus we have:132327=33×7233=72=49Again this sequence is NOT to be found in the OEIS. Interestingly, the concatenated proper divisors of 8640 (one of the sequence members) form the following enormous cancatenated number:

12345689101215161820242730323640454854606472809096108120135144160180192216240270288320360432480540576720864960108014401728216028804320

Tuesday, 13 May 2025

An Interesting Sequence of Primes

Consider the sequence of primes and the products of their digits (POD). As the primes increase, these products will reach record values as certain primes are encountered. Table 1 shows these primes above 20000 together with their record products (permalink):


Table 1

Here are the primes without their products (listed in OEIS A230041):

2, 3, 5, 7, 19, 29, 37, 47, 59, 79, 89, 199, 269, 359, 379, 389, 479, 499, 599, 797, 887, 997, 1889, 1999, 2689, 2699, 2789, 2999, 3889, 3989, 4789, 4799, 4889, 4999, 6899, 8999, 25999, 27799, 28789, 28979, 29989, 37799, 37889, 39799, 39989

27799 is the number associated with my diurnal age today which is why I was alerted to this sequence. If we consider both prime and non-prime numbers then the results are shown in Table 2 for numbers greater than 20000.


Table 2

Here is a list of the numbers with record breaking products up to 40000 (see OEIS A095706):

2, 3, 4, 5, 6, 7, 8, 9, 25, 26, 27, 28, 29, 37, 38, 39, 47, 48, 49, 58, 59, 68, 69, 78, 79, 88, 89, 99, 259, 268, 269, 278, 279, 288, 289, 299, 378, 379, 388, 389, 399, 479, 488, 489, 499, 589, 599, 689, 699, 789, 799, 889, 899, 999, 2599, 2689, 2699, 2789, 2799, 2889, 2899, 2999, 3789, 3799, 3889, 3899, 3999, 4799, 4889, 4899, 4999, 5899, 5999, 6899, 6999, 7899, 7999, 8899, 8999, 9999, 25999, 26899, 26999, 27899, 27999, 28899, 28999, 29999, 37899, 37999, 38899, 38999, 39999

Saturday, 10 May 2025

An Interesting Looping Digit Sequence

A paucity of information about a number always challenges me to find something interesting about the number. Such was the case with the number associated with my diurnal age today: 27796. I could see that the first two digits of the number, 2 and 7, added to give the fourth digit and the fourth digit plus the fifth digit gave the rightmost digit (6) of the resultant sum (16). This was almost a Fibonacci sequence mod 10 except that the repeated digit 7 got in the way. 

So I devised the following set of rules. 

  1. Let a and b be the first two digits of the sequence (a,b)
  2. If b7, c=a+b(mod10) gives the next digit
  3. Let a,b=b,c
  4. If b=7 then c=7 and d=a+b(mod10) give the next two digits
  5. Let a,b=c,d
Applying these rules when a=2 and b=7 gives the following 68 member sequence (permalink):

[2, 7, 7, 9, 6, 5, 1, 6, 7, 7, 3, 0, 3, 3, 6, 9, 5, 4, 9, 3, 2, 5, 7, 7, 2, 9, 1, 0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 7, 0, 7, 7, 7, 7, 4, 1, 5, 6, 1, 7, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 7, 5]

How might we define 27796 in terms of this sequence? Well, perhaps like this. 27796 is the concatenation of the first five digits of the previous sequence created according to the rules 1 to 5 defined above. The digits of the sequence repeat when the 69th term is reached. The final two digits, 7 and 5, mark the end of the sequence because:7+5=2(mod10)5+2=7Thus we have the same two digits, 2 and 7, that we started with. Figure 1 shows the progression of digits.


Figure 1: permalink

It can be considered that we are building a 68 digit number from a starting two digit number of 27. We might represent the number thus (with the superscript 7 representing the digit that is repeated and the overline indicating the cycle of 68 digits):72779698775The number builds as follows:27,277,2779,27796,If we start with a=0 and b=1, as in the classic Fibonacci sequence, we still end up with a cycle of 68 and 7 is still the digit that's repeated. Here is the sequence (permalink) with Figure 2 showing the progression in graphical format:

[0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 7, 0, 7, 7, 7, 7, 4, 1, 5, 6, 1, 7, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 7, 5, 2, 7, 7, 9, 6, 5, 1, 6, 7, 7, 3, 0, 3, 3, 6, 9, 5, 4, 9, 3, 2, 5, 7, 7, 2, 9, 1, 0]

Figure 2: permalink

It's easy to modify the algorithm so that a digit other than 7 gets repeated. Let's repeat the digit 6. In this case we end up with following 64 member looping sequence (permalink) with Figure 3 showing the progression in graphical format:

[2, 7, 9, 6, 6, 5, 1, 6, 6, 7, 3, 0, 3, 3, 6, 6, 9, 5, 4, 9, 3, 2, 5, 7, 2, 9, 1, 0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 0, 7, 7, 4, 1, 5, 6, 6, 1, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 5]

Figure 3: permalink

This time we can consider that we are building a 64 digit number:62796699875The number builds as follows:27,279,2796,27966,Thus 27966 could similarly be described as the concatenation of the first five digits of the previous sequence created according to the rules 1 to 5 defined above. The digits of the sequence repeat when the 65th term is reached. There are many other combinations of digits that could be explored but the point of this post is that interesting number patterns can always be found with just a little scrutiny and imagination.

I've made two previous posts about numbers whose digits display Fibonacci-like properties. These posts are Additive Fibonacci-like Numbers in August 2024 and Consolidating Fibonacci-like Numbers in November of 2024. In the former post I looked at numbers like 28191 where the arithmetic digital root was invoked to reveal a Fibonacci-like progression:2+8=1018+1=91+9=101Here the digital root of the two previous digits determines the next digit which is then concatenated with the previous digits. This process again produces a looping sequence of digits and a 24 digit number that repeats endlessly (permalink):2,8,1,9,1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6 281911235843718988764156Alternatively, the digital root of all the previous digits can be used to determine the next digit. For example, 26875 where:2+6=82+6+8=1672+6+8+7=235In Consolidating Fibonacci-like Numbers, I considered numbers in base 10 that display Fibonacci-like properties when converted to other bases. I did not use digital roots for these cases, only digit sums. For example, 27802 in base 14:27802=a1bc14a+1=b1+b=c

Thursday, 8 May 2025

Encoding Secret Numbers

The previous post about Heinz numbers got me thinking about how secret numbers that we might use as pass numbers for access to various services could be encoded. Let say we have a secret number 659347 that we want to encode using the one to one correspondence between Heinz numbers and integer sequences. Let's treat 659347 as a Heinz number, generate the corresponding integer sequence and then concatenate the numbers in the sequence:Heinz(659347)=(134,19,6)134196If we concatenate the numbers in this sequence, there is ambiguity because the sequences (1341, 96) or (13419, 6) give the same result when the members are concatenated. It would thus be necessary to introduce a dot between the sequence members so as to resemble an IP address. An additional dummy 0 could be added so that it does indeed look like an IP address (0 cannot appear in any Heinz integer sequence). Thus we would have (permalink):Heinz(659347)=(134,19,6)134.19.6 or134.19.6.0The point is that 134.19.6 or 134.19.6.0 can be written in plain sight and there's no way to decode the encrypted secret number (unless you know the magic word: Heinz).

An alternative method would be use the Gray Code. I've written about this in a post titled Gray Code in June of 2023. Here the secret number undergoes the following transformation:659347=101000001111100100112111100001000010110102=985178Again this number (985178) can be written in plain sight and there's no way to decode it without the magic phrase: Gray Code. Another encoding mechanism is Binary Complement. See my post Binary Complement from October of 2024. Here the encoding goes as follows:659347=101000001111100100112010111110000011011002=389228There is a problem once we try to decode from 389228. If we convert this number to binary then we don't have a leading zero anymore, we have 1011111000001101100. We need to add this leading zero because binary complements always have a leading zero. Once we do this, we can flip each 0 to 1 and each 1 to 0 to recover our secret number once we convert from binary. If one wanted to be really devious then two or even three encoding techniques could be used sequentially. 

Wednesday, 7 May 2025

The Heinz Number

I'm surprised that I've not had cause to mention the concept of Heinz numbers before. I've probably seen references to them but ignored them as not being all that interesting or relevant. Clearly, I misjudged them. Here is how Gemini described them:

The Heinz number of an integer partition is a way to map each integer partition to a unique positive integer. Given an integer partition (y1,y2,,yk) where y1y2yk1, the Heinz number is calculated as the product of the prime numbers corresponding to the parts of the partition. Specifically, if pi denotes the i-th prime number where p1=2,p2=3,p3=5 and so on, then the Heinz number of the partition is given by:Heinz(y1,y2,,yk)=py1×py2××pykIt's very simple to calculate the Heinz number. Let's take the partition (4, 2, 1, 1) of the integer 8 (permalink):Heinz(4,2,1,1)=7×3×2×2=84Conversely it's easy to work back from a given number, regarding it as a Heinz number, and determine the corresponding integer sequence. For example, let's take the number 27792 (permalink):27792=193×32×24=Heinz(44,2,2,1,1,1,1)because 193 is the 44th prime, 3 is the second prime and 2 is the first prime. So there is a one to one correspondence between every positive integer and a unique integer sequence. Prime numbers are associated with an integer partition that has only one member. For example:Heinz(27793)=3034because 27793 is the 3034th prime number. I'll include now some additional information that Gemini provided about these types of numbers.

Significance and Usefulness:

  1. Bijective Correspondence: The Heinz number establishes a one-to-one correspondence (a bijection) between the set of all integer partitions and the set of positive integers. This means every integer partition has a unique Heinz number, and every positive integer is the Heinz number of exactly one integer partition. This allows us to represent and study integer partitions through the lens of integers and their prime factorizations.

  2. Encoding Partitions: The Heinz number provides a compact way to encode an integer partition as a single integer. This can be useful in various contexts, such as storing or indexing partitions.

  3. Relating Additive and Multiplicative Structures: Integer partitions are inherently additive structures (the parts sum to the integer being partitioned). The Heinz number connects this additive structure to the multiplicative structure of integers (through the product of primes). This connection can sometimes reveal new properties or insights about partitions by leveraging our understanding of number theory.

  4. Ordering Partitions: The Heinz number can be used to define a specific ordering of integer partitions. Sorting partitions by their Heinz numbers yields a particular sequence.

  5. Connection to Other Mathematical Objects: The concept of the Heinz number has been extended and used in the study of related combinatorial objects. For example, it appears in the context of connected integer partitions and multisets.

I asked the following question of Gemini:

What do we know about the name (Heinz) that is used to identify these numbers? Does it refer to a mathematician who invented them?

Here was the response: 

It's a great question about the origin of the name "Heinz number" in the context of integer partitions!

Based on my current knowledge, the term "Heinz number" in relation to integer partitions does not refer to a specific mathematician named Heinz who invented or first studied this mapping.

The use of the name "Heinz" in this context appears to be a playful or informal assignment, likely stemming from the famous H.J. Heinz Company, known for its "57 Varieties" slogan.

Here's why this connection is plausible:

  • Uniqueness and Variety: Just as the Heinz company boasted a large number of unique food varieties, the Heinz number uniquely identifies each integer partition. This sense of a one-to-one correspondence or a unique label for a "variety" of partitions might have inspired the informal naming.  
  • Memorability: The name "Heinz" and the associated "57 Varieties" are widely recognizable, making "Heinz number" a somewhat catchy and memorable term, even if it's not a formal mathematical designation.

It's important to note that in formal mathematical literature, you are more likely to encounter this concept described as a bijection between integer partitions and positive integers based on the product of primes, without the specific name "Heinz number."

While there have been mathematicians named Heinz (for example, Heinz Prüfer who worked on abelian groups, and the Heinz mean is named after a different E. Heinz), there is no readily available information linking any of them to the specific construction of this prime-based mapping of integer partitions.

Therefore, the "Heinz number" for integer partitions is likely an informal, descriptive name that plays on the well-known "Heinz" brand and its association with variety and distinctness, rather than honoring a specific mathematical inventor.

It's a fascinating example of how informal language and cultural references can sometimes enter mathematical discussions, even if they don't become part of the formal nomenclature. 

Tuesday, 6 May 2025

Numbers as Sums of Two Squares and Two Cubes

One of the properties of the number associated with my diurnal age today (27792) is that it can be expressed as a sum of two squares as well as a sum of two cubes:27792=842+1442=233+253This immediately caused me to wonder how frequent numbers of this sort are. I asked Gemini to write me a Python program that would output a list of non-negative, non-zero numbers in the range up to 40000 with this dual property. I'm getting lazy I know. Previously, I would have created the SageMath code myself but ... well, this is the future I guess. Here is a link to the code.

As it turns out, such numbers are not that frequent. Here is the list:

65, 370, 468, 520, 637, 730, 793, 1125, 1241, 1332, 1853, 2205, 2745, 2960, 3744, 3925, 4097, 4160, 4706, 4825, 4941, 5096, 5256, 5840, 5913, 6344, 6641, 6984, 7202, 8125, 9000, 9325, 9386, 9477, 9773, 9928, 10656, 11458, 12005, 12168, 12913, 13357, 13498, 13949, 14824, 15626, 15633, 15689, 16021, 16354, 17261, 17640, 18369, 18737, 19721, 19773, 21953, 21960, 22681, 23680, 24901, 26117, 27792, 29449, 29818, 29952, 31213, 31400, 31850, 32389, 32776, 33280, 33650, 34704, 35037, 36650, 37577, 37648, 37681, 38600, 39429, 39528

I was surprised not to find this sequence in the OEIS. I asked Gemini to also give a breakdown of the numbers in terms of their squares and cubes. Figure 1 shows the result.


Figure 1

Some of these numbers may be expressible as sums of two squares and sums of two cubes in more than one way but at least one of the possible ways is shown in the two rightmost columns. For 27792 however, the story does end there because it turns out that this number is member of OEIS A273498: numbers that are the sum of two positive squares, a positive square and a positive cube, and two positive cubes. So for 27792, we have:27792=842+1442=1252+233=233+253We can see that:253=(52)3=(53)2=1252Thus in general if the base is a square number raised to the third power then the swap to a base that is cubic number raised to a square power is always possible. Additionally, if we have a 1 then it can be written as 12 or 13

I asked Gemini again to write a Python program that would generate a list of such numbers up to 40000. There were some minor hiccups with this code when entered into SageMathCell as Gemini comments upon:
My apologies for the persistent error. It seems SageMathCell might be interpreting the f-string syntax slightly differently or having an issue with the way the curly braces are nested, particularly around the conditional expression. Let's try a slightly different approach to formatting the output string, using the .format() method instead of f-strings. This might be more compatible with SageMathCell.
In the end the code timed out on SageMathCell and so I used the SageMath app on my MacBook Air to implement the code. The execution took quite some time to complete but in the end it succeeded. Here is the output (link to code):

65, 468, 730, 793, 1241, 1332, 2745, 4097, 4160, 4825, 5096, 5840, 5913, 6344, 8125, 9000, 9325, 9928, 12168, 13357, 13498, 14824, 15626, 15633, 15689, 16354, 17640, 18369, 18737, 19721, 19773, 21953, 22681, 27792, 29449, 29952, 32776, 34704, 36650, 37577

Figure 2 shows the breakdown of the individual numbers.


Figure 2

Clearly these numbers are a subset of the numbers in the previous list. The display of the code in Gemini is quite colourful and helpful as can be seen in Figure 3 that shows a snippet of the code:


Figure 3

Sunday, 4 May 2025

Another Weird Day

It's been 560 days since my last weird day. Today I turned 27790 days old and once again it's weird. I've written about this type of number before in blog posts titled Weird Numbers on August 4th 2019 and also in an earlier post titled Zumkellar Numbers, Half Zumkellar Numbers and Pseudoperfect Numbers on November 22nd 2018.

Most abundant numbers are pseudoperfect meaning that a subset of their proper divisors can be chosen so that their sum is equal to the number. If the sum of all the proper divisors of a number equals the number itself, then the number is said to be perfect. The first few perfect numbers are 6, 28, 496, 8128 and 33550336. An example of an abundant number that is pseudoperfect is 24 with proper divisors of 1, 2, 3, 4, 6, 8 and 12. Adding these gives 36 so the number is clearly abundant. However, if we add the proper divisors without including 12, we reach 24 and so the number is pseudoperfect.

There are two types of weird numbers: primitive and non-primitive. A non-primitive weird number is a number that is a multiple of a weird number. The primitive weird numbers up to 40000 are 70, 836, 4030, 5830, 7192, 7912, 9272, 10792 and 17272. Here is a list of all weird numbers (primitive and non-primitive) up to 40000:

70, 836, 4030, 5830, 7192, 7912, 9272, 10430, 10570, 10792, 10990, 11410, 11690, 12110, 12530, 12670, 13370, 13510, 13790, 13930, 14770, 15610, 15890, 16030, 16310, 16730, 16870, 17272, 17570, 17990, 18410, 18830, 18970, 19390, 19670, 19810, 20510, 21490, 21770, 21910, 22190, 23170, 23590, 24290, 24430, 24710, 25130, 25690, 26110, 26530, 26810, 27230, 27790, 28070, 28630, 29330, 29470, 30170, 30310, 30730, 31010, 31430, 31990, 32270, 32410, 32690, 33530, 34090, 34370, 34930, 35210, 35630, 36470, 36610, 37870, 38290, 38990, 39410, 39830, 39970

All the numbers above with the exception of the primitive weird numbers in red are multiples of 70. Any weird number multiplied by a prime number that is greater than the sum of the divisors of the numbers is itself weird. Thus 70 has a sum of divisors of 144 and the first prime above this is 149. 70 x 149 produces the weird number 10430.

As can be seen, my next weird number (28070) is 280 days away and after that there is a gap of 560 days to my next weird number (28630). The gaps of course are determined by the distance between successive prime numbers. Thus:27790=70×39728070=70×40128630=70×409Here is a fuller list of primitive weird numbers (link):

70, 836, 4030, 5830, 7192, 7912, 9272, 10792, 17272, 45356, 73616, 83312, 91388, 113072, 243892, 254012, 338572, 343876, 388076, 519712, 539744, 555616, 682592, 786208, 1188256, 1229152, 1713592, 1901728, 2081824, 2189024, 3963968, 4128448

While this post is a little repetitive, I feel it's important to acknowledge the occurrence of weird numbers when they occur because of their rarity.

Friday, 2 May 2025

A Variation on the Descent to Zero

In my post on the 23rd of April 2025 titled Descent to Zero, I considered the smallest numbers that take a certain number of steps to reach 0 under "k max product of two numbers whose concatenation is k". What happens if we change this slightly so that the rule is now "k max product of two prime numbers whose concatenation is k".

This is highly restrictive because only numbers that can be split into a pair of prime numbers in one or more ways are eligible for consideration. For example, 246 is dismissed but 235 is eligible for consideration because it can be split into 23 x 5. Moreover, the process of splitting into primes needs to continue until zero is reached if the number is to be a candidate for the smallest number. Here are the numbers that require from 1 to 9 steps to reach zero:1,22,55,115,235,475,3389,13457,35743The breakdown is as follows:

  • Descent of 9 steps to zero: 35743 --> 17229, 3893, 1167, 737, 511, 55, 25, 10, 0
  • Descent of 8 steps to zero: 13457 --> 5941, 4705, 235, 115, 55, 25, 10, 0
  • Descent of 7 steps to zero: 3389 --> 1167, 737, 511, 55, 25, 10, 0
  • Descent of 6 steps to zero: 475 --> 235, 115, 55, 25, 10, 0
  • Descent of 5 steps to zero: 235 --> 115, 55, 25, 10, 0
  • Descent of 4 steps to zero: 115 --> 55, 25, 10, 0
  • Descent of 3 steps to zero: 55 --> 25, 10, 0
  • Descent of 2 steps to zero: 22 --> 4, 0
  • Descent of 1 step to zero: 1 --> 0
The convention is that single digits or 10 get mapped to zero. Let's look at how 35743 reaches zero:357433×5743=172291722917×229=574357435×743=38933893389×3=1167116711×67=73773773×7=5115115×11=55555×5=25252×5=10100Note that other prime number products are possible. For example 5743 could be split into 57 x 43 but this is smaller than 5 x 5743. Similarly, 737 could be split into 7 x 37 but again this is smaller than 73 x 7.

There are in fact only 127 numbers in the range from 11 to 40000 that can be reduced down to 10 or a single digit. They are (permalink) with record breakers shown in red:

22, 23, 25, 32, 33, 52, 55, 112, 113, 115, 202, 203, 205, 211, 235, 297, 302, 303, 311, 415, 475, 502, 505, 511, 523, 541, 547, 583, 729, 737, 773, 835, 1012, 1013, 1015, 1102, 1103, 1105, 1153, 1167, 1512, 1675, 2002, 2003, 2005, 2011, 2101, 2151, 2251, 2305, 2512, 3002, 3003, 3011, 3101, 3389, 3893, 4015, 4105, 4437, 4615, 4705, 5002, 5005, 5011, 5023, 5041, 5047, 5083, 5101, 5167, 5401, 5461, 5821, 5941, 6711, 7029, 7073, 7171, 7443, 8215, 8305, 9415, 10102, 10103, 10105, 10171, 11002, 11003, 11005, 11053, 11067, 11191, 11491, 11643, 12743, 13457, 14537, 15102, 16705, 17229, 19111, 20002, 20003, 20005, 20011, 20101, 20151, 20251, 23005, 24183, 25051, 25102, 25501, 29659, 30002, 30003, 30011, 30101, 30389, 31971, 32237, 33881, 35743, 36437, 38813, 38903

This permalink will allow you to enter any of the above numbers and receive as output the descent of the number to 10 or a single digit. For example, entering the number 38903 produces the following output:
Starting with: 38903
Dividing 38903 into prime parts and multiplying gives: 1167
Dividing 1167 into prime parts and multiplying gives: 737
Dividing 737 into prime parts and multiplying gives: 511
Dividing 511 into prime parts and multiplying gives: 55
Dividing 55 into prime parts and multiplying gives: 25
Dividing 25 into prime parts and multiplying gives: 10
Reached: 10