A304491 Last or deepest exponent in the power-tower for n.
1, 2, 3, 2, 5, 6, 7, 3, 2, 10, 11, 12, 13, 14, 15, 2, 17, 18, 19, 20, 21, 22, 23, 24, 2, 26, 3, 28, 29, 30, 31, 5, 33, 34, 35, 2, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 2, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 65, 66, 67, 68, 69
Offset: 1
Keywords
Examples
We have 16 = 2^2^2, so a(16) = 2. We have 64 = 2^6, so a(64) = 6. We have 81 = 3^2^2, so a(81) = 2. We have 256 = 2^2^3, so a(256) = 3.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
a[n_]:=If[n==1,1,With[{g=GCD@@FactorInteger[n][[All,2]]},If[g==1,n,a[g]]]]; Array[a,100]
-
PARI
a(n)={my(t=n); while(t, n=t; t=ispower(t)); n} \\ Andrew Howroyd, Aug 26 2018
Comments