cp's OEIS Frontend

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.

A213013 (2^3^4^5^...^n) mod n.

This page as a plain text file.
%I A213013 #10 Jul 22 2025 23:01:52
%S A213013 0,2,0,2,2,1,0,8,2,2,8,5,8,2,0,2,8,18,12,8,2,16,8,2,18,26,8,11,2,2,0,
%T A213013 2,2,22,8,31,18,5,32,2,8,27,24,17,16,8,32,43,2,2,44,45,26,2,8,56,40,
%U A213013 47,32,33,2,8,0,57,2,5,36,62,22,60,8,1,68,2,56,57,44,8,32,80,2,2,8,2
%N A213013 (2^3^4^5^...^n) mod n.
%C A213013 a(n) = 0 iff n is a power of 2.
%H A213013 Max Alekseyev, <a href="/A213013/b213013.txt">Table of n, a(n) for n = 2..1000</a>
%o A213013 (PARI) { a(n,m=n,s=2) = local(g); if(s==n, return(n%m)); g=factor(gcd(s,m)); for(i=1,matsize(g)[1], g[i,2]=valuation(m,g[i,1]); m\=g[i,1]^g[i,2]); g=prod(i=1,matsize(g)[1],g[i,1]^g[i,2]); lift( chinese( Mod(0,g), Mod(s,m)^a(n,eulerphi(m),s+1) )) }
%Y A213013 A variant of A092188.
%K A213013 nonn
%O A213013 2,2
%A A213013 _Max Alekseyev_, Jun 02 2012