Graham's number

Graham's number was devised in 1971 by Ron Graham to answer a particular question in Ramsey theory, a subfield in combinatorics. It was later quantified around 1976 via Don Knuth's up-arrow notation.

The Question
Suppose we take four vertices in a 2-dimensional square and connect them with lines. We can give them one of two colors: red or blue.

Vertices: 22 = 4 Lines: (4 * 3)/2 = 6 Ways to Color: 26 = 64

There are two specific ways to color in the square that are not allowed in this problem. They are as follows: Going up to a 3-dimensional cube, we have 6 2-D faces to color in. We can easily avoid these configurations in this dimension. The real challenge is to go into a much higher dimension.

3-D: Vertices: 23 = 8 Lines: (8 * 7)/2 = 28 Ways to Color: 228 = 268,435,456 Ways to Color with the Configurations: 63

4-D: Vertices: 24 = 16 Lines: (16 * 15)/2 = 120 Ways to Color: 2120 ~ 1.32922799578492 × 1036 Ways to Color with the Configurations: 1,073,741,823

5-D: Vertices: 25 = 32 Lines: (32 * 31)/2 = 496 Ways to Color: 2496 ~ 2.04586912993509 × 10149 Ways to Color with the Configurations: 9,671,406,556,917,033,397,649,407

n-D: Vertices: 2n Lines: nC2 Ways to Color: 2nC2

The question Graham answered was the following:
 * Is there a dimension in which it is impossible to avoid having a square in a flat plane with all six of its edges in the same color? If so, which dimension is it?

The Solution
As Graham calculated, such a dimension does indeed exist. Let's quantify it using up-arrow notation.

As a review:
 * $$3 \uparrow 3 = 3^{3} = 27$$
 * $$3 \uparrow\uparrow 3 = 3 \uparrow 3 \uparrow 3 = 3 \uparrow 27 = 3^{27} = 7,625,597,484,987$$
 * $$3 \uparrow\uparrow\uparrow 3 = 3 \uparrow\uparrow 3 \uparrow\uparrow 3 = 3 \uparrow\uparrow 7,625,597,484,987$$
 * $$3 \uparrow\uparrow\uparrow\uparrow 3 = 3 \uparrow\uparrow\uparrow 3 \uparrow\uparrow\uparrow 3 = 3 \uparrow\uparrow\uparrow 3 \uparrow\uparrow 7,625,597,484,987$$

Let's call 3↑↑↑↑3 G1. G1 is so large that it is well beyond a googolplex. By the way, we're not even close to Graham's number yet.

We can formulate these G values as the following:
 * $$G_{n} = 3 \uparrow^{G_{n-1}} 3$$

So, for instance:
 * $$G_{2} = 3 \uparrow^{G_{1}} 3$$

I do this so that way I can spare you from reading insanely many arrows at each G value. For G2, the number of arrows between the two 3's is the value of G1, which is 3↑↑↑↑3.

By now, you should grasp that adding one arrow between the 3's increases the value by a very large amount. Now, the number of arrows is so large that we can't even count it!

We continue this process of making G values until we reach the following:
 * $$G_{64} = 3 \uparrow^{G_{63}} 3$$

G64 is, in fact, the value of Graham's number. This number is so large that we don't know its first digit; we only know its last 500 digits, which are as follows:
 * ...02425950695064738395657479136519351798334535362521430035401260267716226721604198106522631693551887803881448314065252616878509555264605107117200099709291249544378887496062882911725063001303622934916080254594614945788714278323508292421020918258967535604308699380168924988926809951016905591995119502788717830837018340236474548882222161573228010132974509273445945043433009010969280253527518332898844615089404248265018193851562535796399618993967905496638003222348723967018485186439059104575627262464195387

In Graham's number dimensions, it is impossible to avoid the configurations described above.