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 A304495 #13 Jul 28 2018 11:35:06 %S A304495 0,1,1,2,1,1,1,2,3,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1,5,1,3,1,1,1,1,2,1,1, %T A304495 1,6,1,1,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1, %U A304495 1,1,1,1,1,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,1,1,1,1,1 %N A304495 Decapitate the power-tower for n, i.e., remove the last (deepest) exponent. %C A304495 a(1) = 0 by convention. %C A304495 Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = c(x_1)^c(x_2)^c(x_3)^...^c(x_{k-1}). %H A304495 Antti Karttunen, <a href="/A304495/b304495.txt">Table of n, a(n) for n = 1..65537</a> %F A304495 a(m) <> 1 if m is a perfect power (A001597). - _Michel Marcus_, Jul 23 2018 %e A304495 We have 64 = 2^6, so a(64) = 2. %e A304495 We have 216 = 6^3, so a(216) = 6. %e A304495 We have 256 = 2^2^3, so a(256) = 2^2 = 4. %t A304495 tow[n_]:=If[n==1,{},With[{g=GCD@@FactorInteger[n][[All,2]]},If[g===1,{n},Prepend[tow[g],n^(1/g)]]]]; %t A304495 Table[If[n==1,0,Power@@Most[tow[n]]],{n,100}] %o A304495 (PARI) A304495(n) = if(1==n,0,my(e, r, tow = List([])); while((e = ispower(n,,&r)) > 1, listput(tow, r); n = e;); n = 1; while(length(tow)>0, e = tow[#tow]; listpop(tow); n = e^n;); (n)); \\ _Antti Karttunen_, Jul 23 2018 %Y A304495 Cf. A052409, A052410, A001597, A007916, A089723, A164337, A277562, A277564, A278028, A288636, A289023, A294336, A294337, A304481, A304491, A304492. %K A304495 nonn %O A304495 1,4 %A A304495 _Gus Wiseman_, May 13 2018 %E A304495 Name edited and more terms from _Antti Karttunen_, Jul 23 2018