Showing posts with label Knuth. Show all posts
Showing posts with label Knuth. Show all posts

Thursday, 23 April 2026

Power Towers

The number associated with my diurnal age today, \( \textbf{28144}\), has the property that its power tower of digits is equal to its product of digits. That is to say:

2 ^ 8 ^ 1 ^ 4 ^ 4 = 2 x 8 x 1 x 4 x 4 = 36

Such numbers are relatively rare. In the range beyond 28144 up to 40000, there are only the following numbers that satisfy: 28182, 31111, 33113 and 33131.

Meanwhile, I thought it was time to clarify the reasons behind the right associativity of power towers and so I consulated Gemini. Here was the response:

Let's break down the mechanics of power towers, tetration, and the crucial role of associativity in how we evaluate these operations.

Associativity: The Order of Operations

In mathematics, associativity dictates how we group numbers when an expression contains multiple instances of the same operator.

  • Left-Associative: Operations are evaluated from left to right. Subtraction and division are left-associative by convention.
    For example, 10 − 5 − 2 is evaluated as (10 − 5) − 2 = 3.
  • Right-Associative: Operations are evaluated from right to left.

Exponentiation is mathematically defined as right-associative. When you see a sequence of exponents, you evaluate them from the top down.

Here is why this convention exists: if exponentiation were left-associative, it would be mathematically redundant. Let's look at 232.

  • If it were left-associative: (23)2 = 82 = 64.
    By the rules of exponents, (ab)c = ab × c. Therefore, a left-associative power tower is just a disguised way of multiplying exponents together (23 × 2 = 26 = 64). We already have multiplication, so we don't need a new convention for this.
  • Because it is right-associative: 2(32) = 29 = 512.
    Evaluating from the top-down creates a fundamentally new, uniquely powerful operation that cannot be simplified by basic multiplication.

Power Towers

A power tower is simply a visual stack of exponents, written as abcd.

Because of the right-associative rule, you always start at the highest point of the tower and work your way down to the base.

For example, to evaluate 2322:

  1. Start at the top: 22 = 4
  2. Move down one level: 34 = 81
  3. Calculate the final base: 281

The result is 2,417,851,639,229,258,349,412,352.

Tetration: Iterated Exponentiation

Tetration is a specific type of power tower where the base number is identical throughout the entire stack.

Just as multiplication is repeated addition, and exponentiation is repeated multiplication, tetration is repeated exponentiation. It is the fourth fundamental hyperoperation in mathematics (following addition, multiplication, and exponentiation).

Because standard exponentiation notation becomes visually cumbersome when stacked high, mathematicians use specific notations for tetration:

  • Knuth's Up-Arrow Notation: a ↑↑ n
  • Rudy Rucker's Superscript Prefix: na

In both notations, a is the base and n is the height of the tower.

Examples of Tetration:

  • 23 (or 3 ↑↑ 2) = 33 = 27
  • 33 (or 3 ↑↑ 3) = 333 = 327 = 7,625,597,484,987

The Computational Horizon

Tetration generates exponential growth at a scale that rapidly breaks the limits of standard computation.

If we take just one more step up the tower to 43 (or 3 ↑↑ 4), the expression becomes 3333, which evaluates to 37,625,597,484,987.

This number has over 3.6 trillion decimal digits. While theoretical mathematics can easily define and manipulate the expression 43, calculating the exact integer quickly leaves the realm of standard datatypes. Numbers at this scale become highly unrenderable in their full decimal form; storing just the digits of 43 as a standard text file would require terabytes of disk space. When computational number theory investigates numbers at or beyond this threshold, it relies on custom algorithms, modulo arithmetic, or symbolic representation frameworks to analyze the properties of the digits without attempting to hold the entire integer in memory.

Friday, 5 January 2024

Generalised Jacobsthal numbers.


Ernst Jacobsthal
(1882 - 1965)

The number associated with my diurnal age today, 27305, has the property that it is a member of OEIS A084640:

 
 A084640

Generalised Jacobsthal numbers.


There's not a great deal of information given about Jacobsthal numbers of any sort so I did some investigation which yielded the following information.

Fibonacci Numbers:$$F_n=F_{n-1}+F_{n-2}\\ \text{ where }n \geq 2, F_0=0, F_1=1$$The first 25 members of this sequence are:

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

Lucus Number:$$L_n=L_{n-1}+L_{n-2} \\ \text{ where } n \geq 2, L_0=2, L_1=1$$

The first 25 members of this sequence are:

2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443

Pell Numbers:$$P_n=2P_{n-1}+P_{n-2} \\ \text{ where } n \geq 2, P_0=0, P_1=1 $$The first 25 members of this sequence are:

0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, 33461, 80782, 195025, 470832, 1136689, 2744210, 6625109, 15994428, 38613965, 93222358, 225058681, 543339720, 1311738121, 3166815962

Pell-Lucus Numbers:$$Q_n=2Q_{n-1}+Q_{n-2} \\ \text{ where } n \geq 2, Q_0=Q_1=1$$The first 25 members of this sequence are:

1, 1, 3, 7, 17, 41, 99, 239, 577, 1393, 3363, 8119, 19601, 47321, 114243, 275807, 665857, 1607521, 3880899, 9369319, 22619537, 54608393, 131836323, 318281039, 768398401, 1855077841, 4478554083

Jacobsthal Numbers:$$J_n=J_{n-1}+2J_{n-2} \\ \text{ where } n \geq 2, J_0=0, J_1=1 $$The first 25 members of this sequence are:

0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621

Jacobsthal-Lucas Numbers:$$ j_n=j_{n-1}+2j_{n-2} \\ \text{ where } n \geq 2, j_0=j_1=2$$The first 25 members of this sequence are:

2, 2, 6, 10, 22, 42, 86, 170, 342, 682, 1366, 2730, 5462, 10922, 21846, 43690, 87382, 174762, 349526, 699050, 1398102, 2796202, 5592406, 11184810, 22369622, 44739242, 89478486

Thus the generalised Jacobsthal numbers referenced in OEIS A084640 arise by simply adding a constant to the formula for the Jacobsthal numbers shown earlier. The formula thus becomes:

An Example of Generalised Jacobsthal Numbers:$$J^{*}_n=J^{*}_{n-1}+J^{*}_{n-2}+4 \\ \text{where } n \geq 2, J^{*}_0=0, J^{*}_1=1$$The first 25 members of this sequence are (permalink):

0, 1, 5, 11, 25, 51, 105, 211, 425, 851, 1705, 3411, 6825, 13651, 27305, 54611, 109225, 218451, 436905, 873811, 1747625, 3495251, 6990505, 13981011, 27962025, 55924051, 111848105

The generating function is given by:$$ \frac{x(1+3x)}{(1-x^2)(1-2x)}$$The \(n\)-th term is given by:$$ \frac{(5 \times 2^n + (-1)^n - 6)}{3}$$All this doesn't tell us anything about the mathematician Jacobsthal and there's an interesting remark by Donald Knuth in the OEIS comments:

Don Knuth points out (personal communication) that Jacobsthal may never have seen the actual values of his sequence. However, Horadam uses the name "Jacobsthal sequence", such an important sequence needs a name, and there is a law that says the name for something should never be that of its discoverer. 
N. J. A. Sloane, Dec 26 2020

There is a biography of Ernst Jacobsthal to be found at MacTutor. 

Tuesday, 7 February 2017

Android, LaTeX, Termial and Surreal Numbers

Donald Ervin Knuth
January 10, 1938 (age 79)
Milwaukee, Wisconsin, U.S.
It was with great surprise that I discovered my LaTeX-based equations in the two previous posts were not displaying using the Chrome browser on my Android phone. I checked using the default Internet browser and the result was the same. I checked on my iPad, using both Chrome and Safari, and all was well. On Ubuntu (under VirtualBox), using Firefox, and in Windows (under VirtualBox), using Microsoft Edge and Chrome, there was again no problem.

It was only Android, at least version 5 which I'm using on my Note 3. Maybe there is support for LaTeX in the 6 and 7 versions of Android. However, there's surprisingly little information about this problem and certainly no open admission anywhere that LaTeX isn't supported by Android.

This leads on to the term termial. I stumbled across it as I researched LaTeX because its creator, Donald Knuth, invented the term in his The Art of Computer Programming. It was devised as an analogy of the factorial, so as to illustrate the extension of the latter to the real numbers. It's defined as follows:

Let n \(\in\) ℤ > 0 (that is a positive integer) then n? = \(\sum_{k=1}^{n} k \)

Let n \(\in\) ℝ (that is a real number) then n? = \(\frac{n(n+1)}{2}\)

So 4? = 4 + 3 + 2 + 1 = 10 and \(\frac{1}{2}\)? = \(\frac{3}{8}\)

The second formula works for integers because 4? = 4 x 5 ÷ 2 = 10.

Donald Knuth is certainly an interesting character. This is a link to his biography on Wikipedia. He wrote a book called Surreal Numbers and below is a video in which he discusses the inspiration behind the idea of surreal numbers and how he actually set about writing the book in six days.



The book is freely available on the Internet and I've downloaded a copy and added it to my library.