Mathwords logoMathwords

Hyperoperation — Definition, Formula & Example

A hyperoperation is one level in an infinite ladder of operations. Each level repeats the one below it: multiplication repeats addition, exponentiation repeats multiplication, tetration repeats exponentiation, and the ladder continues without end.

The hyperoperation sequence is a family of binary operations Hn(a,b)H_n(a, b) on the natural numbers, indexed by n≥0n \geq 0. It starts from the successor function H0(a,b)=b+1H_0(a, b) = b + 1 and is defined recursively, so that H1H_1 is addition, H2H_2 is multiplication, H3H_3 is exponentiation, and H4H_4 is tetration. It is often written a[n]ba[n]b. For n≥3n \geq 3 it matches Knuth's up-arrow notation: Hn(a,b)=a↑n−2bH_n(a, b) = a \uparrow^{n-2} b.

Key Formula

Hn(a,b)={b+1n=0an=1, b=00n=2, b=01n≥3, b=0Hn−1(a, Hn(a, b−1))otherwiseH_n(a,b) = \begin{cases} b + 1 & n = 0 \\ a & n = 1,\ b = 0 \\ 0 & n = 2,\ b = 0 \\ 1 & n \geq 3,\ b = 0 \\ H_{n-1}\big(a,\ H_n(a,\ b-1)\big) & \text{otherwise} \end{cases}
Where:
  • nn = The level of the operation (0 = successor, 1 = addition, 2 = multiplication, 3 = exponentiation, 4 = tetration, and so on)
  • aa = The base, a natural number
  • bb = The second argument, which counts how many times the level below is applied

Worked Example

Problem: Keep the inputs fixed at a=3a = 3 and b=2b = 2. Evaluate Hn(3,2)H_n(3, 2) for levels n=1,2,3,4n = 1, 2, 3, 4 to see how the result changes as you move up the ladder.
Step 1: Levels 1 and 2 are addition and multiplication.
H1(3,2)=3+2=5,H2(3,2)=3×2=6H_1(3,2) = 3 + 2 = 5, \qquad H_2(3,2) = 3 \times 2 = 6
Step 2: Level 3 is exponentiation, which is repeated multiplication of the base.
H3(3,2)=32=9H_3(3,2) = 3^2 = 9
Step 3: For level 4, apply the recursive rule. First note that H4(3,1)=H3(3,H4(3,0))=31=3H_4(3,1) = H_3(3, H_4(3,0)) = 3^1 = 3. Then feed that result into level 3.
H4(3,2)=H3(3, H4(3,1))=H3(3, 3)=33=27H_4(3,2) = H_3\big(3,\ H_4(3,1)\big) = H_3(3,\ 3) = 3^3 = 27
Answer: The results are 5, 6, 9, and 27. The same two inputs give faster-growing outputs at each level, and the recursion always builds level nn out of level n−1n-1.

Why It Matters

Hyperoperations are the backbone of the Ackermann function, a standard example in computer science theory courses of a function that is computable but not primitive recursive. In fact, A(m,n)=Hm(2,n+3)−3A(m, n) = H_m(2, n+3) - 3. They also describe record-sized numbers such as Graham's number, which is built from stacked up-arrow operations.

Common Mistakes

Mistake: Assuming every level is commutative, the way addition and multiplication are.
Correction: Only levels 1 and 2 are commutative. From level 3 on, swapping the inputs changes the result: H3(2,3)=23=8H_3(2,3) = 2^3 = 8, but H3(3,2)=32=9H_3(3,2) = 3^2 = 9. Keep track of which input is the base.

Related Terms

  • Tetration — Level 4 of the hyperoperation sequence, repeated exponentiation
  • Knuth Up-Arrow Notation — Standard shorthand for writing hyperoperations from level 3 upward
  • Exponentiation — Level 3 of the sequence, built from repeated multiplication
  • Product — The result of level 2, repeated addition
  • Arithmetic — Contains the first three levels: addition, multiplication, powers
  • Power — Names the output of the level 3 hyperoperation