OFFSET
1,6
COMMENTS
a(n) = (8^(8^(8^(8^ ... )))) mod n, provided sufficient 8's are in the tower such that adding more doesn't affect the value of a(n).
FORMULA
PROG
(PARI) a(n) = {my(b, c=0, d=n, k=1, x=1); while(k==1, z=x; y=1; b=1; while(z>0, while(y<z, d=eulerphi(d); y++); b=8^b-floor((8^b-1)/d)*d; z=z-1; y=1; d=n); if(c==b, k=0); c=b; x++); b%n; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 04 2020
STATUS
approved