1,10

a(n) = (6^(6^(6^(6^(6^ ... ))))) mod n, provided sufficient 6s are in the tower such that adding more doesn't affect the value of a(n).

Wayne VanWeerthuizen, Table of n, a(n) for n = 1..10000

(Sage)

def tower6mod(n):

if ( n <= 12 ):

return 46656%n

else:

ep = euler_phi(n)

return power_mod(6, ep+tower6mod(ep), n)

Cf. A240162, A245970, A245971, A245972, A245974.

Sequence in context: A036481 A021610 A264807 * A214128 A166509 A200635

Adjacent sequences: A245970 A245971 A245972 * A245974 A245975 A245976

nonn,easy

Wayne VanWeerthuizen, Aug 08 2014

approved