OFFSET
1,6
COMMENTS
This sequence is eventually constant: for all n > Mega, a(n) = Mega.
LINKS
Katie Steckles, Katie's #MegaFavNumbers - the MEGISTON, and Steinhaus-Moser notation, video (2020)
Hugo Steinhaus, Mathematical Snapshots, 2nd ed., New York: Oxford University Press, 1951, p. 19. [These numbers are not mentioned in the first (1938) edition.]
Eric Weisstein's World of Mathematics, Mega.
Wikipedia, Steinhaus-Moser notation.
Index entries for linear recurrences with constant coefficients, signature (1).
FORMULA
a(n) = (2 in a circle) mod n = (256 in a square) mod n = (...((256 in a triangle) in a triangle)... in a triangle) mod n [with 256 triangles], where k in a triangle = k^k, k in a square = k in k triangles, and k in a circle = k in k squares.
PROG
(PARI) a(n)=my(m=lcm(eulerphi(n), n), t=Mod(256, m), e, last=t); for(i=1, 256, e=lift(t); t=t^(e+m); if(t==last, return(e%n)); last=t); lift(t)%n
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Aug 26 2020
STATUS
approved