From charlesreid1

My interview question:

Tetration. A bit of background on what tetration is. This notation will let you write what are, unquestionably, the biggest number you've ever seen in your life.

Notation for progressively larger numbers.

What is the remainder when you divide the number 5 tetrated by 11?

Use Fermat's Little Theorem (1640), which states that a^{p-1} - 1 is an integer multiple of p:

a^{p-1} \equiv 1{ \pmod {p} }

a^{p-1} \equiv 1 \pmod p

5 tetrated can be written as 5 to the power of 5^5^5^5 mod 10, mod 11

Simplify that mod 10 expression - 5 to any power is 5, so power simplifies to 5

Expression simplifies to 5 to the 5 mod 11, or 3125 mod 11

Divisibility trick for 11: Start with right most digit, and sum up the odd terms. Then start with the tens place digit, and sum up the even terms. Compute the quantity odd minus even. This is the remainder when you divide by 11.