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 A342176 #8 Mar 18 2021 08:20:03 %S A342176 0,0,2,0,3,2,1,0,8,8,8,8,8,8,8,0,8,8,18,8,8,8,2,8,8,8,26,8,26,8,8,0,8, %T A342176 8,8,8,6,18,8,8,8,8,32,8,8,2,7,32,29,8,8,8,18,26,8,8,56,26,42,8,8,8,8, %U A342176 0,8,8,58,8,2,8,18,8,1,6,8,56 %N A342176 Tower of primes modulo n: a(n) = (2^3^5^7^ ... ^prime(n)) mod n. %C A342176 a(n) = 0 iff n is a power of 2. %e A342176 a(1) = 0 = 2 mod 1. a(2) = 0 = 2^3 mod 2. a(3) = 2 = 2^3^5 = 2^243 = 2 mod 3. %o A342176 (PARI) { a(n, m=n, s=2) = local(g); if(s==prime(n), return(n%m)); g=s^valuation(m, s); m\=g; lift(chinese(Mod(0, g), Mod(s, m)^a(n, eulerphi(m), nextprime(s+1)) )) } %Y A342176 Cf. A000040. %K A342176 nonn %O A342176 1,3 %A A342176 _Peter Schorn_, Mar 04 2021