It is given that $ {^{2021}2021}$ is a tetration and I want to find the remainder when it is divided by $13$.

Briefly , I am looking for $ {^{2021}2021}\pmod{13}$

My work :

$\color{purple}{Firstly:}$ I found $2021\equiv 6\pmod{13}$

$\color{blue}{Secondly:}$ I thought that $6^{\color{red}{a}}\equiv 6^{\color{red}{b}}\pmod{13}$ should be satisfied.

$\color{orange}{Thirdly:}$ $a\equiv b\pmod{12}$ by Euler's phi function.Then , i said that $a\equiv 11$ and $b\equiv -1$

$\color{red}{Fourthly:}$ I said that $6^{11^m}\equiv 6^{(-1)^m}\pmod{13}$ and there left $2020$ superscript for tetration. Therefore , I said that it must be equal to $6^{(-1)^{2020}}\equiv6\pmod{13}$

$\therefore$ Answer is $6$

Is my solution correct , if not , can you share any trick or shortcut for finding remainders when we encounter tetrations..

$\color{red}{NOTE:}$ WHAT IS TETRATION $\rightarrow $ https://en.wikipedia.org/wiki/Tetration

$\color{red}{NOTE-2:}$ I would rather colorful answer for the sake of @terasalisbon :)


  • $\begingroup$ How did you get $11$ as the first exponent in the tower? Reducing $2021$ modulo $12$ gives $5$, which is not congruent to $11$ (or $-1$) modulo $12$. $\endgroup$
    – Christoph
    Jan 28, 2021 at 18:32
  • $\begingroup$ @Christoph I thought that i should refrain from dealing with $2021's$ , so i made up two numbers which are related to $\phi 13$ $\endgroup$ Jan 28, 2021 at 18:34
  • 1
    $\begingroup$ Please request for a nice colourful answer! +1 $\endgroup$ Jan 28, 2021 at 18:37
  • 1
    $\begingroup$ @TeresaLisbon :))) $\endgroup$ Jan 28, 2021 at 18:38
  • 1
    $\begingroup$ @TeresaLisbon is it okey now :D $\endgroup$ Jan 28, 2021 at 18:41

3 Answers 3


The only thing you need to know is that looking at a power $a^b$ modulo $k$ you can reduce the base $a$ modulo $k$ and the exponent $b$ modulo $\varphi(k)$.

Hence, when you consider the a tetration $$ {}^{2021}2021 = \color{purple}{2021}^{\color{blue}{2021}^{\color{orange}{2021}^{\cdots^{\color{red}{2021}}}}}, $$ you can reduce the base modulo $13$ the first exponent modulo $\varphi(13)=12$, the third exponent modulo $\varphi(12)=4$, where already $2021\equiv 1 \pmod 4$.

Hence $$ {}^{2021}2021 \equiv \color{purple}6^{\color{blue}5^{\color{orange}1^{\cdots^{\color{red}{2021}}}}} \equiv 6^5 \equiv 7776 \equiv 2 \pmod{13}. $$

  • $\begingroup$ @thanks for this elegant and colorful answer :) $\endgroup$ Jan 28, 2021 at 18:42
  • $\begingroup$ $\color{green}{\text{You're welcome!}}$ $\endgroup$
    – Christoph
    Jan 28, 2021 at 18:43
  • $\begingroup$ Ah, I see the rainbow is out in full force! +1 , by the way today's lucky colour is platinum, so make sure that if you are writing answers there's plenty of platinum in there. $\endgroup$ Jan 28, 2021 at 18:52

Tetration is a repeated raising to a given power, a "tower" of exponents. Effectively this is worked right to left (or "top down" looking at the tower analogy).

So this is a massively tall tower of exponents, but oddly enough that doesn't matter; we'll only be interested in the bottom few elements to find the answer.

You start well to find that $2021\equiv 6 \bmod 13$.

Then from Fermat's little theorem we know that $2021^{12}\equiv 1 \bmod 13$ so $2021^a$ will cycle round values on a pattern of $12$ length (at most).

Checking that, we see $(6^i){\large|_{i=1}^{12}}\equiv (6,10,8,9,2,12,7,3,5,4,11,1) \bmod 13$ in that order.

So now stepping up the tower of exponents, consider $2021^a$ where $a=2021^b$. We know that we only need to consider the values of $a\bmod 12$ from the above cycle, so that implies that we need to look at $a = 2021^b = 5^b\bmod 12$. So how does $5$ cycle under an exponent $\bmod 12$? It's easy to find by calucaltion that $5^2 = 25\equiv 1\bmod 12$, so the cycle now is only length two - effectively, we only need to know whether $b$ is odd or even.

In the tower of exponents though we know that $b = 2021^c$, which is odd. So we have our result:

$${}^{2021}2021 \equiv 6^{5^{\text{odd}}} \equiv 6^5\equiv 2 \bmod 13$$


$^{2021}2021 = 2021^{^{2020}2021}\pmod{13}\equiv 2021^{^{2020}2021\pmod {12}}\pmod {13}\equiv 2021^{2021^{^{2019}2021}\pmod{12}}$


Now the order of $5^2 \equiv 1 \pmod 12$ so $5^{odd} \equiv 5 \pmod{12}$ and $5^{even}\equiv 1\pmod {12}$ and $^{2019}2021$ is odd.

So $6^{5^{^{2019}2021}\pmod{12}}\pmod {13}\equiv 6^5 \equiv 6^2*6^2*6\equiv (-3)^2*6\equiv 45\equiv 2 \pmod {13}$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .