This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A245973 #14 Mar 19 2020 16:23:06 %S A245973 0,0,0,0,1,0,1,0,0,6,5,0,1,8,6,0,1,0,1,16,15,16,2,0,6,14,0,8,23,6,1,0, %T A245973 27,18,1,0,1,20,27,16,18,36,1,16,36,2,36,0,43,6,18,40,47,0,16,8,39,52, %U A245973 9,36,9,32,36,0,1,60,14,52,48,36,6,0,1,38,6,20 %N A245973 Tower of 6s mod n. %C A245973 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). %H A245973 Wayne VanWeerthuizen, <a href="/A245973/b245973.txt">Table of n, a(n) for n = 1..10000</a> %o A245973 (Sage) %o A245973 def tower6mod(n): %o A245973 if ( n <= 12 ): %o A245973 return 46656%n %o A245973 else: %o A245973 ep = euler_phi(n) %o A245973 return power_mod(6,ep+tower6mod(ep),n) %Y A245973 Cf. A240162, A245970, A245971, A245972, A245974. %K A245973 nonn,easy %O A245973 1,10 %A A245973 _Wayne VanWeerthuizen_, Aug 08 2014