Showing posts with label sums. Show all posts
Showing posts with label sums. Show all posts

Tuesday, 18 August 2026

ODD - and EVEN + Improved Format

Some time ago I got Gemini to create a 197 page document that identifies attractors and vortices arising from the recursive ODD - and EVEN + algorithm. It also lists their number of captives. Today I got Gemini to summarise and reformat this information so that it is more readable using the exact same template it created for my August 15th post titled ODD + and EVEN - Improved Format. That 142 page document can be located here. Here are some excerpts:


Figure 1


Figure 2


Table 1


Table 2


Table 3

Table 4

Notice that while 8987 has the record number of captives under the ODD - and EVEN + recursive algorithm (in the range up to 40000), it has ZERO captives under the ODD + and EVEN - recursive algorithm. Conversely, while 38013 is a vortical in the mighty vortex {38013, 38012, 38006, 37995, 38028} with 564 captives under the ODD + and EVEN - recursive algorithm, it is a mere captive of the attractor 38050 under the ODD - and EVEN + recursive algorithm.

Friday, 14 August 2026

ODD + and EVEN - Trajectory Lengths

Let's revisit the ODD + and EVEN - algorithm that I first discussed in a post titled Odds and Evens from June of 2021. In that post, I looked at the trajectory lengths of numbers up to 100,000 and Figure 1 shows a graph summarising what I found.


Figure 1: permalink

I also found that in the range up to 100,000 there were 3725 numbers that are attractors, in other words the sums of their odd and even digits are equal. Of these, 301 are prime. These number belong to OEIS 
A036301:


 A036301

Numbers whose sum of even digits and sum of odd digits are equal.    

I then extended the range to 200,000 and found a number (158893) that required 91 steps before it entered a loop or, to put it another way, it was captured by a vortex. In this case, the vortex consisted of the vorticals 160028, 160013, 160012, 160006, 159995, 160033, 160034. Figure 2 shows a graph of the trajectories:


Figure 2: permalink

I noted that the
 average trajectory length has increased from 8.58 to 10.6. Back in 2021 I don't think I was using a Jupyter notebook and couldn't investigate further beyond 200,000 without SageMathCell timing out. With the Jupyter notebook, I was able to extend the search to one million and Figure 3 shows a graph of the trajectories:


Figure 3: permalink 
(will need a Jupyter notebook)

Over this range, the average trajectory length has increased to 14 and the record step length has increases to 287 compared to 91 in the range up to 200,000 and 81 in the range up to 100,000.

In that original blog post, I also looked at the proportion of numbers that were attractors compared to those numbers that were captives of attractors or that entered loops (this included vorticals and captives of vortices). I considered a range up to 100,000. These were the results (permalink): 
  • total of numbers that are captives of attractors 58977 up to 100000 or 59.0 percent
  • total of numbers that end in a loop is 37298 up to 100000 or 37.3 percent
  • total number of attractors up to 100000 is 3725 or 3.73 percent
Using my Jupyter notebook to extend the range to one million, the results were:

  • total of numbers that are captives of attractors is 511859 up to 1000000 or 51.2 percent

  • total of numbers that end in a loop is 463061 up to 1000000 or 46.3 percent
  • total number of attractors up to 1000000 is 25080 or 2.51 percent

Tuesday, 9 May 2023

Sums and Concatenations of Cubes and Squares

There's something very obvious about the number associated with my diurnal age today. The number is 27064 and the cubes (27 and 64) stand out clearly. In fact 27064 can be written as a sum of two cubes:$$ \begin{align} 27064 &=27000+64\\&=30^3+4^3 \end{align}$$Unfortunately, the number cannot be written as a concatenation of two cubes because the zero gets in the way. The problem is that 4 cubed has only two digits. However, the cubes of the numbers from 5 to 9 all have three digits and so the zero disappears. This allows us to write the following numbers as both sums and concatenations of two cubes. The symbol | indicates concatenation$$ \begin{align} 27125 =30^3+5^3 = 3^3|5^3\\27216 =30^3+6^3 = 3^3|6^3\\27343 = 30^3+7^3 = 3^3|7^3\\27512 = 30^3+ 8^3 = 3^3|8^3\\27729 = 30^3+9^3=3^3|9^3 \end{align} $$This series of numbers is the last that will occur in my lifetime because the next such sets of numbers will begin with 64125. However, if we were to consider sums of squares and concatenations of squares then I may see these come to pass. Consider the following sets of numbers, some of which occur more than once (permalink).$$ \begin{align} 36100= 114^2+152^2=6^2|10^2\\36121 =20^2+ 189^2=6^2|11^2\\36121 =61^2+ 180^2=6^2|11^2\\36196=40^2+ 186^2=6^2|14^2\\36324 =90^2+ 168^2=6^2|18^2\\36361 =60^2 +181^2=6^2|19^2\\36361=125^2+ 144^2=6^2|19^2\\36441=96^2+ 165^2=6^2|21^2\\36529=48^2+ 185^2=6^2|23^2\\36625=12^2+ 191^2=6^2|25^2\\36625=56^2+ 183^2=6^2|25^2\\36625=65^2+ 180^2=6^2|25^2\\36625=105^2+ 160^2=6^2|25^2\\36676=24^2+190^2=6^2|26^2\\36676=80^2+174^2=6^2|26^2\\36900 =6^2+ 192^2=6^2|30^2\\36900=48^2+ 186^2=6^2|30^2\\36900= 120^2+ 150^2=6^2|30^2 \end{align} $$The first of these numbers (36100) corresponds to Monday, February 3rd, 2048 by which time I'll be almost 88. Maybe I'll make it, maybe I won't.

Tuesday, 18 October 2022

More About Munchausen Numbers

On September 22nd 2022, I made a post titled "What's Special About 3435?" in which it was revealed that 3435 was the only Munchausen number in base 10, apart from the trivial case of 1. It has the property that \(3^3+4^4+3^3+5^5=3435\). The convention \(0^0=1\) is being applied whenever a zero is encountered in a number. Using this convention, Figure1 shows the Munchausen numbers in bases from 2 to 10.

Source
Let's look at the Munchausen numbers for base 4:$$29_{10}=131_4=1^1+3^3+1^1\\55_{10}=313_4=3^3+1^1+3^3$$Getting back to Munchausen numbers in base 10, I got to thinking about numbers that differed by only 1 under the \( \text{digit}^{\text{digit}} \) sum. This yielded an interesting result in the range up to 100 million (permalink):

32 --> 31
3153 --> 3152
6255 --> 6254
870206 --> 870205
1647371 --> 1647370
1647372 --> 1647373

We can see that 1647371 gives a result that is one below the number while the next consecutive number 1647372 gives a result that is one above the number. The result is that the averages are the same:$$\frac{1647371+1647372}{2}=\frac{1647370+1647373}{2}=1647371.5$$I thought that was a pretty interesting result. 

Another variation is to consider squares and cubes of numbers and beyond. By this I mean what numbers have the property that:$$ \text{number}^n=\sum(\text{digit}^{\text{digit}})$$where \(n\) can equal 1, 2, 3 etc.

So far we've only considered the case of \(n=1\). What about if \(n=2\)? In the range up to ten million, we find only the numbers 1, 2 and 216 satisfying the condition (permalink):
$$ \begin{align}\textbf{1}^2&= 1^1 \\

\textbf{2}^2 &= 2^2 \\
\textbf{216}^2 &= 2^2+1^1+6^6 \end{align} $$What about cubes? Here we find, again in the range up to ten million, that only 1, 3, 36 and 729 qualify (permalink):$$ \begin{align} \textbf{1}^3&= 1^3\\ \textbf{3}^3&= 3^3 \\ \textbf{36}^3 &= 3^3+6^6\\ \textbf{729}^3 &= 7^7+2^2+9^9 \end{align}$$Perhaps we could term such numbers Munchausen numbers of the second order (for squares), Munchausen numbers of the third order (for cubes) and so on.  I thought this was an interesting variation on the original theme. Obviously one could go on and look at higher orders but I'll stop at 3.

Tuesday, 23 November 2021

Numbers As Sums Of Palindromes

I've written about palindromes before in a variety of posts (just type palindromes into the search box for this site) but thus far I've not mentioned the representation of numbers as a sum of palindromes. Figure 1 shows a screenshot of a tweet from Cliff Pickover's Twitter feed:


Figure 1

I came across this tweet not long ago and immediately wrote a program (permalink) in SageMathCell to determine what these palindromic sums were for any given number. Below is the calculation box.


It turns out that for 26532, my diurnal age today, there are 193 different way to represent it as a sum of three palindromes. Here are examples of just a few of them:
  • 11 + 969 +25552
  • 414 + 7337 + 18781
  • 979 + 1111 + 24442
  • 5885 + 6006 + 14641
Most numbers, about 92%, can in fact be represented as a sum of two palindromes in one or more ways. However, 26532 is amongst the 8% minority that cannot. The numbers on either side of it however, can be represented as a sum of two palindromes. The program above can be easily modified to find these palindromes, just replace C = Combinations(P, 3) with C = Combinations(P, 2). Here are the results:
  • 26531 = 979 + 25552
  • 26533 = 171 + 26362 = 1991 + 24542
Between 26500 and 27000, the numbers that cannot be represented as a sum of two palindromes are:
26502, 26512, 26522, 26532, 26542, 26572, 26582, 26592, 26602, 26612, 26622, 26632, 26642, 26672, 26682, 26692, 26702, 26712, 26722, 26732, 26742, 26772, 26782, 26792, 26802, 26812, 26822, 26832, 26842, 26872, 26882, 26892, 26902, 26912, 26922, 26932, 26942, 26952, 26972, 26982, 26992
There are 41 such numbers representing 8.20% of the total of 500 numbers. It can be noted that all the numbers in this range are even and all end in 2. This pattern seems to repeat for other ranges. 

That's about it, a simple yet interesting property that divides numbers into two categories: those that can be represented as a sum of two palindromes and those that cannot.