Home
๐Ÿงฎ

A blueprint for large numbers

Consider a modest function โ€œA,โ€ which takes a number and adds one to it.
A(1)=2A(2)=3A(99)=100\begin{aligned} A(1) &= 2 \\ A(2) &= 3 \\ A(99) &= 100 \end{aligned}
Itโ€™s not much of an operator, and is easily defeated by its counterpart: โ€œevil A.โ€
Aห‡(2)=1Aห‡(3)=2Aห‡(100)=99\begin{aligned} \check A(2) &= 1 \\ \check A(3) &= 2 \\ \check A(100) &= 99 \end{aligned}
We can apply โ€œAโ€ multiple times.
A(A(1))=A(2)=3A(A(A(A(1))))=5\begin{aligned} A(A(1)) = A(2) &= 3 \\ A(A(A(A(1)))) &= 5 \end{aligned}
Repeating โ€œAโ€ is a little tiring, so we can use a superscript to make things a little more concise.
A(A(1))=A2(1)=3A(A(A(A(10))))=A4(10)=14\begin{alignedat}{2} A(A(1)) &= A^2(1) &&= 3 \\ A(A(A(A(10)))) &= A^4(10) &&= 14 \end{alignedat}
Since the superscript implies โ€œadd 1 this many times,โ€ the following properties unfold:
An(1)=1+nAn(10)=10+nAn(99)=99+n\begin{aligned} A^n(1) &= 1 + n \\ A^n(10) &= 10 + n \\ A^n(99) &= 99 + n \end{aligned}
Or, more generally:
An(m)โ€„=โ€„mโ€…+โ€…nA^n(m)โ€„=โ€„mโ€…+โ€…n
Behold, addition!

๐Ÿ”— Small steps

Our goal is to make large numbers, so we may start throwing some of them at A in hopes of making them even bigger.
A1000(1000)=2000A1000000(1000000)=2000000\begin{aligned} A^{1000}(1000) &= 2000 \\ A^{1000000}(1000000) &= 2000000 \end{aligned}
But weโ€™re not making much progress. For starters, we have to pass in two big numbers - what a waste. Letโ€™s not repeat ourselves so much by creating a new function โ€œBโ€:
B(n)โ€„=โ€„An(n)B(n)โ€„=โ€„A^n(n)
Now we can pass large numbers into B just once - half the work (I checked!).
B(1000)=A1000(1000)=1000+1000=2000B(1000000)=2000000B(1000000000)=2000000000\begin{aligned} B(1000) &= A^{1000}(1000) \\ &= 1000 + 1000 \\ &= 2000 \\ B(1000000) &= 2000000 \\ B(1000000000) &= 2000000000 \end{aligned}
We can see that the following property holds:
B(n)=An(n)=n+n=2โ‹…nB(n) = A^n(n) = n + n = 2 \cdot n
Behold, multiplication!
Try as it might, โ€œevil Aโ€ canโ€™t stop our new friend โ€œBโ€ from taking our numbers to great heights.
Aห‡(n)=nโˆ’1B(n)=2โ‹…nAห‡(B(10))=20โˆ’1=19Aห‡(B(100))=199Aห‡(B(5000))=9999\begin{aligned} \check A(n) &= n - 1 \\ B(n) &= 2 \cdot n \\ \check A(B(10)) &= 20 - 1 = 19 \\ \check A(B(100)) &= 199 \\ \check A(B(5000)) &= 9999 \\ \end{aligned}
But โ€œevil Bโ€ can, stopping our numbers dead in their tracks.
Bห‡(n)=n2B(n)=2โ‹…nBห‡(B(10))=202=10Bห‡(B(100))=100Bห‡(B(5000))=5000\begin{aligned} \check B(n) &= \frac{n}{2} \\ B(n) &= 2 \cdot n \\ \check B(B(10)) &= \frac{20}{2} = 10 \\ \check B(B(100)) &= 100 \\ \check B(B(5000)) &= 5000 \\ \end{aligned}
Weโ€™ll need something stronger.

๐Ÿ”— Slightly bigger steps

We have a function โ€œBโ€ which doubles a number.
B(1)=2B(99)=198B(500)=1000\begin{aligned} B(1) &= 2 \\ B(99) &= 198 \\ B(500) &= 1000 \end{aligned}
We can apply โ€œBโ€ multiple times.
B(B(1))=B(2)=4B(B(B(10)))=80\begin{aligned} B(B(1)) = B(2) &= 4 \\ B(B(B(10))) &= 80 \end{aligned}
To shorten things, we can use our trusty friend, the superscript.
B(B(1))=B2(1)=4B(B(B(10)))=B3(10)=80\begin{alignedat}{2} B(B(1)) &= B^2(1) &&= 4 \\ B(B(B(10))) &= B^3(10) &&= 80 \end{alignedat}
This pattern may be a bit harder to spot, but we can handle it by expanding things a little.
B4(5)=2โ‹…B3(5)=2โ‹…2โ‹…B2(5)=2โ‹…2โ‹…2โ‹…B(5)=2โ‹…2โ‹…2โ‹…2โ‹…5=24โ‹…5\begin{aligned} B^4(5) &= 2 \cdot B^3(5) \\ &= 2 \cdot 2 \cdot B^2(5) \\ &= 2 \cdot 2 \cdot 2 \cdot B(5) \\ &= 2 \cdot 2 \cdot 2 \cdot 2 \cdot 5 \\ &= 2^4 \cdot 5 \end{aligned}
The following pattern emerges:
Bn(5)โ€„=โ€„2nโ€…โ‹…โ€…5B^n(5)โ€„=โ€„2^nโ€…\cdotโ€…5
Or, more generally:
Bn(m)โ€„=โ€„2nโ€…โ‹…โ€…mB^n(m)โ€„=โ€„2^nโ€…\cdotโ€…m
Behold, exponentiation!
Just as before, weโ€™ll consolidate m and n by introducing a new function โ€œC.โ€
C(n)=Bn(n)=2nโ‹…nC(n) = B^n(n) = 2^n \cdot n

๐Ÿ”— Getting there

Our numbers are starting to grow pretty quickly:
C(3)=23โ‹…3=24C(10)=210โ‹…10=10240C(100)=2100โ‹…100=12676506โ€ฆ\begin{alignedat}{2} C(3) &= 2^3 \cdot 3 &&= 24 \\ C(10) &= 2^{10} \cdot 10 &&= 10240 \\ C(100) &= 2^{100} \cdot 100 &&= 12676506\mathellipsis \end{alignedat}
Passing 100 to our friend โ€œCโ€ produces 126765060022822940149670320537600, which is a whopping 33 digits in length. Switch the 100 to 1000 and we get:
107150860718626732094842504906000
181056140481170553360744375038837
035105112493612249319837881569585
812759467291755314682518714528569
231404359845775746985748039345677
748242309854210746050623711418779
541821530464749835819412673987675
591655439460770629145711964776865
421676604298316526243868372056680
69376000
Coming in at 305 digits. Pretty huge - larger than the number of particles in the universe - but still easily represented here in this article.
Additionally, our โ€œevil Bโ€ from earlier is no match for us now.
Bห‡(n)=n2C(n)=2nโ‹…nBห‡(C(10))=5120Bห‡(C(100))=633825โ€ฆ(32 digits)Bห‡(C(1000))=535754โ€ฆ(304 digits)\begin{aligned} \check B(n) &= \frac{n}{2} \\ C(n) &= 2^n \cdot n \\ \check B(C(10)) &= 5120 \\ \check B(C(100)) &= 633825\mathellipsis \text{(32 digits)} \\ \check B(C(1000)) &= 535754\mathellipsis \text{(304 digits)}\\ \end{aligned}
Try as it might, โ€œevil Bโ€ can only occasionally knock a single digit off our numbers.
A new challenger approaches, however, that can take them out using its secret weapon - the logarithm.
Cห‡(n)=lgโก(n)C(n)=2nโ‹…nCห‡(C(10))=13.321โ€ฆCห‡(C(100))=106.643โ€ฆCห‡(C(1000))=1009.965โ€ฆ\begin{aligned} \check C(n) &= \lg(n) \\ C(n) &= 2^n \cdot n \\ \check C(C(10)) &= 13.321\mathellipsis \\ \check C(C(100)) &= 106.643\mathellipsis \\ \check C(C(1000)) &= 1009.965\mathellipsis \\ \end{aligned}
Our numbers are barely able to escape the mighty logarithm. Weโ€™ll need something stronger.

๐Ÿ”— To new heights

We have a function โ€œCโ€ which raises 2 to the power โ€œnโ€ and multiplies it by โ€œnโ€
C(n)=2nโ‹…nC(3)=23โ‹…3=24C(10)=210โ‹…10=10240\begin{alignedat}{2} C(n) &= 2^n \cdot n \\ C(3) &= 2^3 \cdot 3 &&= 24 \\ C(10) &= 2^{10} \cdot 10 &&= 10240 \\ \end{alignedat}
This function has a little sibling which does the same thing, but does not multiply by โ€œnโ€. It wonโ€™t produce numbers quite as big, but will be a little easier for us to work with.
Cห™(n)=2nCห™(3)=8Cห™(10)=1024\begin{aligned} \dot C(n) &= 2^n \\ \dot C(3) &= 8 \\ \dot C(10) &= 1024 \end{aligned}
We can apply โ€œlittle Cโ€ multiple times.
Cห™(n)=2nCห™(Cห™(n))=2Cห™(n)=22nCห™(Cห™(Cห™(n)))=2Cห™(Cห™(n))=22Cห™(n)=222n\begin{alignedat}{2} \dot C(n) &= 2^n \\ \dot C(\dot C(n)) &= 2^{\dot C(n)} &&= 2^{2^n} \\ \dot C(\dot C(\dot C(n))) &= 2^{\dot C(\dot C(n))} \\ &= 2^{2^{\dot C(n)}} &&= 2^{2^{2^{n}}} \end{alignedat}
Just as before, we can use our trusty friend the superscript.
Cห™5(n)=22222n\dot C^5(n) = 2^{2^{2^{2^{2^n}}}}
Repeated applications of โ€œlittle Cโ€ result in these fairly alien โ€œtowersโ€ of 2s. In particular:
Cห™m(n)=222โ‹…โ‹…โ‹…2nโŸm copies of 2\dot C^m(n) = \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2^n}}}}}}}_{\text{m copies of 2}}
Once again we can consolidate m and n:
D(n)=Cห™n(n)=222โ‹…โ‹…โ‹…2nโŸn copies of 2D(n) = \dot C^n(n) = \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2^n}}}}}}}_{\text{n copies of 2}}
Just as we removed the trailing end for โ€œCโ€, weโ€™ll remove the trailing n for โ€œDโ€ to simplify things.
C(n)=2nโ‹…nCห™(n)=2nD(n)=222โ‹…โ‹…โ‹…2nโŸn copies of 2Dห™(n)=222โ‹…โ‹…โ‹…2โŸn copies of 2\begin{aligned} C(n) &= 2^n \cdot n \\ \dot C(n) &= 2^n \\ D(n) &= \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2^n}}}}}}}_{\text{n copies of 2}} \\ \dot D(n) &= \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{\text{n copies of 2}} \end{aligned}
These โ€œtowers of exponentsโ€ are referred to as โ€œtetrationsโ€ and are typically represented using Knuthโ€™s up-arrow notation.
Dห™(5)=22222=2โ†‘โ†‘5\dot D(5) = 2^{2^{2^{2^2}}} = 2 \uparrow \uparrow 5
Theyโ€™re bizarre-looking, and growโ€ฆreally quickly. How quickly?
Dห™(2)=22=4Dห™(3)=222=16Dห™(4)=2222=65536Dห™(5)=22222=265536\begin{alignedat}{2} \dot D(2) &= 2^2 &&= 4 \\ \dot D(3) &= 2^{2^2} &&= 16 \\ \dot D(4) &= 2^{2^{2^2}} &&= 65536 \\ \dot D(5) &= 2^{2^{2^{2^2}}} &&= 2^{65536} \end{alignedat}
At just 5 items in, weโ€™re produced a number that is 19,729 digits in length. Much larger than anything weโ€™ve seen so far, but still tangible. In fact, I can print this number at size 11 font with 1" margins in just 7 sheets of paper (about 3,000 digits per page).
a print preview showing the very long number (20035299...) with
a print preview showing the very long number (20035299...) with "Total: 7 pagesโ€
Why stop there?
Dห™(6)=222222=???\dot D(6) = 2^{2^{2^{2^{2^2}}}} = \text{???}
What is this number? Concretely, itโ€™s 2 raised to the giant number we just saw. How much larger does that make it?
While we could print D(5) on 7 pages of paper, weโ€™ll need 7 pages of paper just to print the number of digits in D(6). What if we wanted to print D(6) itself? Weโ€™ll need about D(5) pages.
More specifically, weโ€™ll need D(5) / 3,000 pages, but D(5) is so massive the / 3,000 does absolutely nothing to it.
How about D(7)? Weโ€™ll need D(5) / 3,000 pages to print its digits, and D(6) / 3,000 pages to print the number itself. Thereโ€™s a pattern here, but not one that translates well into physical sheets of paper. Simply put, the numberโ€™s big.
In fact, our function generates numbers so big that โ€œevil Cโ€ is quickly drowned by them.
Cห‡(n)=lgโก(n)Cห‡(Dห™(2))=lgโก(22)=2Cห‡(Dห™(3))=lgโก(222)=22Cห‡(Dห™(4))=lgโก(2222)=222Cห‡(Dห™(5))=lgโก(22222)=2222Cห‡(Dห™(6))=lgโก(222222)=22222\begin{alignedat}{2} \check C(n) &= \lg(n) \\ \check C(\dot D(2)) &= \lg{(2^2)} &&= 2 \\ \check C(\dot D(3)) &= \lg{(2^{2^2})} &&= 2^2 \\ \check C(\dot D(4)) &= \lg{(2^{2^{2^2}})} &&= 2^{2^2} \\ \check C(\dot D(5)) &= \lg{(2^{2^{2^{2^2}}})} &&= 2^{2^{2^2}} \\ \check C(\dot D(6)) &= \lg{(2^{2^{2^{2^{2^2}}}})} &&= 2^{2^{2^{2^2}}} \end{alignedat}
Try as it might, โ€œevil Cโ€ can only knock off a single item from our ever-growing tower of exponents.
A tower of exponents is a real force to be reckoned with.

๐Ÿ”— But not big enough

We have a function โ€œDโ€ which generates a tower of 2s with a height of โ€œn.โ€
Dห™(n)=222โ‹…โ‹…โ‹…2โŸn copies of 2\dot D(n) = \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{\text{n copies of 2}}
We can apply this function to itself.
Dห™(Dห™(n))=Dห™(222โ‹…โ‹…โ‹…2โŸn copies of 2)=222โ‹…โ‹…โ‹…2โŸ(222โ‹…โ‹…โ‹…2โŸn copies of 2) copies of 2\begin{aligned} \dot D(\dot D(n)) &= \dot D(\underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{\text{n copies of 2}}) \\ &= \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{(\underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{\text{n copies of 2}})\text{ copies of 2}} \end{aligned}
In the previous section, we saw how D(n-1) dictated the number of digits for D(n). Well, D(D(n)) grows not on the level of exponents, but on the level of the number of exponents in the tower.
While D(6) was practically impossible to imagine, D(D(6)) is pure nightmare fuel. Letโ€™s continue.
Just as earlier, we can use a superscript to simplify things:
Dห™m(n)=222โ‹…โ‹…โ‹…2โŸ(222โ‹…โ‹…โ‹…2โŸ(โ‹…โ‹…โ‹…) copies of 2) copies of 2}m times\left. \dot D^m(n) = \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{(\underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{(\cdot^{\cdot^{\cdot}}) \text{ copies of 2}})\text{ copies of 2}} \right\} \text{m times}
And we can consolidate m and n like so:
E(n)=Dห™n(n)=222โ‹…โ‹…โ‹…2โŸ(222โ‹…โ‹…โ‹…2โŸ(โ‹…โ‹…โ‹…) copies of 2) copies of 2}n times\begin{aligned} E(n) &= \dot D^n(n) \\ &= \left. \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{(\underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{(\cdot^{\cdot^{\cdot}}) \text{ copies of 2}})\text{ copies of 2}} \right\} \text{n times} \end{aligned}
These towers-of-towers can be hard to read (and harder to write), so we can simplify things a bit using our previous up-arrow notation.
Dห™(n)=2โ†‘โ†‘nDห™(Dห™(n))=2โ†‘โ†‘(2โ†‘โ†‘n)Dห™(Dห™(Dห™(n)))=2โ†‘โ†‘(2โ†‘โ†‘(2โ†‘โ†‘n))Dห™m(n)=Dห™(Dห™(โ‹ฏDห™(n)))โŸm copies of Dห™=2โ†‘โ†‘(โ‹ฏ(2โ†‘โ†‘n))โŸm copies of 2\begin{aligned} \dot D(n) &= 2 \uparrow \uparrow n \\ \dot D(\dot D(n)) &= 2 \uparrow \uparrow (2 \uparrow \uparrow n) \\ \dot D(\dot D(\dot D(n))) &= 2 \uparrow \uparrow (2 \uparrow \uparrow (2 \uparrow \uparrow n)) \\ \dot D^m(n) &= \underbrace{\dot D(\dot D( \cdots \dot D(n)))}_{\text{m copies of } \dot D} \\ &= \underbrace{2 \uparrow \uparrow (\cdots (2 \uparrow \uparrow n))}_{\text{m copies of 2}} \end{aligned}
(and consolidate m and n):
E(n)=Dห™n(n)=2โ†‘โ†‘(2โ†‘โ†‘(โ‹ฏ(2โ†‘โ†‘n))โŸn copies of 2\begin{aligned} E(n) &= \dot D^n(n) \\ &= \underbrace{2 \uparrow \uparrow (2 \uparrow \uparrow (\cdots (2 \uparrow \uparrow n))}_{\text{n copies of 2}} \end{aligned}
Lastly, weโ€™ll want to get rid of that pesky โ€œnโ€ at the end and create a โ€œlittle Eโ€ just as we did for โ€œCโ€ and โ€œDโ€.
D(n)=222โ‹…โ‹…โ‹…2nโŸn copies of 2Dห™(n)=222โ‹…โ‹…โ‹…2โŸn copies of 2E(n)=2โ†‘โ†‘(2โ†‘โ†‘(โ‹ฏ(2โ†‘โ†‘n))โŸn copies of 2Eห™(n)=2โ†‘โ†‘(2โ†‘โ†‘(โ‹ฏ(2โ†‘โ†‘2))โŸn copies of 2\begin{aligned} D(n) &= \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2^n}}}}}}}_{\text{n copies of 2}} \\ \dot D(n) &= \underbrace{2^{2^{2^{\cdot^{\cdot^{\cdot^{2}}}}}}}_{\text{n copies of 2}} \\ E(n) &= \underbrace{2 \uparrow \uparrow (2 \uparrow \uparrow (\cdots (2 \uparrow \uparrow n))}_{\text{n copies of 2}} \\ \dot E(n) &= \underbrace{2 \uparrow \uparrow (2 \uparrow \uparrow (\cdots (2 \uparrow \uparrow 2))}_{\text{n copies of 2}} \end{aligned}
Conveniently, mathematicians have an elegant way to represent โ€œapply double-up-arrow n times,โ€ and all it takes is adding a third arrow.
Eห™(n)=2โ†‘โ†‘(2โ†‘โ†‘(โ‹ฏ(2โ†‘โ†‘2))โŸn copies of 2Eห™(n)=2โ†‘โ†‘โ†‘n\begin{aligned} \dot E(n) &= \underbrace{2 \uparrow \uparrow (2 \uparrow \uparrow (\cdots (2 \uparrow \uparrow 2))}_{\text{n copies of 2}} \\ \dot E(n) &= 2 \uparrow \uparrow \uparrow n \end{aligned}

๐Ÿ”— Arrows, arrows, arrows

In fact, if we repeat the process we used to generate โ€œBโ€ through โ€œEโ€:
Em(n)=E(E(โ‹ฏ(E(n))โŸm timesEn(n)=E(E(โ‹ฏ(E(n))โŸn timesF(n)=En(n)G(n)=Fn(n)H(n)=Gn(n)โ€ฆ\begin{aligned} E^m(n) &= \underbrace{E(E(\cdots(E(n))}_{\text{m times}} \\ E^n(n) &= \underbrace{E(E(\cdots(E(n))}_{\text{n times}} \\ F(n) &= E^n(n) \\ G(n) &= F^n(n) \\ H(n) &= G^n(n) \\ \dots \end{aligned}
All weโ€™re really doing is adding more arrows.
E(n)=2โ†‘โ†‘โ†‘nF(n)=2โ†‘โ†‘โ†‘โ†‘nG(n)=2โ†‘โ†‘โ†‘โ†‘โ†‘nH(n)=2โ†‘โ†‘โ†‘โ†‘โ†‘โ†‘nโ€ฆ\begin{aligned} E(n) &= 2 \uparrow \uparrow \uparrow n \\ F(n) &= 2 \uparrow \uparrow \uparrow \uparrow n \\ G(n) &= 2 \uparrow \uparrow \uparrow \uparrow \uparrow n \\ H(n) &= 2 \uparrow \uparrow \uparrow \uparrow \uparrow \uparrow n \\ \dots \end{aligned}
Eventually the arrows themselves will become unwieldy:
Z(n)=2โ†‘โ†‘โ‹ฏโ†‘nโŸ25 arrowsZ(n) = \underbrace{2 \uparrow \uparrow \cdots \uparrow n}_\text{25 arrows}
Worry not, for we can provide a superscript to the arrow itself. (Keep in mind that our numbers became incomprehensibly large 23 arrows ago.)
Z(n)=2โ†‘โ†‘โ‹ฏโ†‘nโŸ25 arrowsZ(n)=2โ†‘25n\begin{aligned} Z(n) &= \underbrace{2 \uparrow \uparrow \cdots \uparrow n}_\text{25 arrows} \\ Z(n) &= 2 \uparrow^{25} n \end{aligned}
So, what if we wanted to continue growing the number of arrows?
Iโ€™ll leave that to you, dear reader, for I am exhausted.
Thanks for reading :) If you enjoyed this article, youโ€™ll probably love Grahamโ€™s Number and TREE(3).