I'm trying to study the algebraic properties of the magma created by defining the binary operation $x*y$ to be:
$ x*y = (x \uparrow y) \bmod n $
where $ \uparrow $ is the symbol for tetration.
Doing so, the hardest commutation necessary for this kind of magma of order n is: $ (n-1) \uparrow (n-1) \bmod n $.
Using the standard algorithms for tetration and the modulus, this computation was instantaneous up to the magma of order 4. For the magma of order 5 however, with the computation $ 4 \uparrow 4 \bmod 5 $, I could not compute it after 2+ hours. Is this computation even tractable for a core i7 laptop? (I'm using a library that allows for arbitrarily large integers) Is there a better way to do this computation than with a standard (brute force) calculation?