Tool to compute and write pentation, the hyperoperation consisting in iterating tetration a certain number of times (Knuth notation: a ↑↑↑ b).
Pentation - dCode
Tag(s) : Arithmetics, Notation System
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Pentation (or iterated tetration) is a mathematical hyperoperation corresponding to repeated tetration. It allows numbers far larger than those conveniently represented using tetration to be expressed and is generally written as $ a \uparrow\uparrow\uparrow b $ (Knuth's up-arrow notation), where $ a $ is the base and $ b $ is the iteration parameter.
$$ a \uparrow\uparrow\uparrow b = \begin{cases} 1 & b = 0 \\ a & b = 1 \\ a \uparrow\uparrow (a \uparrow\uparrow\uparrow (b-1)) & b > 1 \end{cases} $$
Just as multiplication corresponds to repeated addition ($ 2 \times 3 = 2+2+2 $), exponentiation to repeated multiplication ($ 2^3 = 2 \times 2 \times 2 $), and tetration to repeated exponentiation, pentation corresponds to repeated tetration.
Pentation consists of iterating tetration: each step computes a tetration whose height is equal to the result of the preceding pentation.
$$ a \uparrow\uparrow\uparrow b = \underbrace{a \uparrow\uparrow (a \uparrow\uparrow (\cdots \uparrow\uparrow (a \uparrow\uparrow a)\cdots))}_{b-1 \text{ applications of } \uparrow\uparrow} $$
Example: $$ 2 \uparrow\uparrow\uparrow 2 = 2 \uparrow\uparrow 2 = 2^2 = 4 \\ 2 \uparrow\uparrow\uparrow 3 = 2 \uparrow\uparrow 4 = 2^{2^{2^2}} = 2^{16} = 65536 \\ 3 \uparrow\uparrow\uparrow 2 = 3 \uparrow\uparrow 3 = 3^{3^3} = 3^{27} = 7625597484987 $$
The computation is iterative: for $ b > 1 $, the first step is to calculate $ a \uparrow\uparrow a $, then repeatedly apply tetration with base $ a $ and height equal to the preceding result until the value corresponding to $ b $ is reached. Tetration is applied a total of $ b-1 $ times. Unlike tetration, which represents a power tower evaluated from top to bottom, pentation nests tetrations, with each result determining the height of the next tetration.
Pentation produces integers of a greater magnitude than those resulting from tetration; their decimal representation very quickly exhausts both computational and memory resources. The dCode calculator is capped at 1 million digits.
Pentation is repeated tetration, just as tetration is repeated exponentiation.
For $ b = 1 $, pentation gives the base itself:
Example: $ a \uparrow\uparrow\uparrow 1 = a $
For $ b = 2 $, pentation corresponds to tetration with base $ a $ and height $ a $:
Example: $ a \uparrow\uparrow\uparrow 2 = a \uparrow\uparrow a $
For $ b = 3 $, the height of the tetration is equal to the pentation result for $ b = 2 $:
Example: $ a \uparrow\uparrow\uparrow 3 = a \uparrow\uparrow (a \uparrow\uparrow a) $
After pentation comes hexation, which corresponds to repeated pentation and is written as $ a \uparrow\uparrow\uparrow\uparrow b $, just as pentation corresponds to repeated tetration.
Pentation belongs to the hierarchy of hyperoperations, the successive levels of which are commonly listed as follows: addition (1), multiplication (2), exponentiation (3), tetration (4), pentation (5), hexation (6), and so on.
The dCode calculator is designed for non-negative integer iteration parameters.
Extensions of pentation to non-integer parameters have been studied, but no consensus definition has emerged to date.
Pentation makes it possible to represent numbers so large that even tetration notation becomes impractical, particularly when the height of a power tower becomes extremely large. It is also useful for studying the hierarchy of hyperoperations and the growth of functions at extremely large scales.
Pentation can be implemented recursively from its mathematical definition using a tetration function:
// pseudo-code
function pentation(a, b) {
if (b == 0) return 1
if (b == 1) return a
return tetration(a, pentation(a, b - 1))
}
The iteration parameter $ b $ must be a non-negative integer. This implementation assumes that the tetration function accepts a non-negative integer height and that intermediate values remain representable. A practical implementation must also handle numerical overflow and resource limits.
dCode retains ownership of the "Pentation" source code. Any algorithm for the "Pentation" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Pentation" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Pentation" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Pentation" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Pentation on dCode.fr [online website], retrieved on 2026-11-26,