Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the mod value of large exponential towers
ResourceFunction["TetrationMod"][n,h,m] returns the value of an exponential integer tower of value n and height h, taken mod m. |
in standard tetration notation. Find
:
| In[1]:= |
| Out[1]= |
TetrationMod allows fast evaluation of large arguments that would not be otherwise possible using Mod or PowerMod:
| In[2]:= |
| Out[2]= |
will not change for all h≥c, where c is a relatively small constant depending on n and m:
| In[3]:= |
| Out[3]= |
This means that even infinitely tall power towers have well-defined mod values for a given n, m.
Find the last 10 digits of the exponential tower 202120212021…, which is 1000 terms high:
| In[4]:= |
| Out[4]= |
In fact, you can see this will converge after reaching a height of 9:
| In[5]:= |
| Out[5]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License