OFFSET
1,2
COMMENTS
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) = x_k.
MATHEMATICA
nn=100;
a[n_]:=If[n==1, 1, With[{g=GCD@@FactorInteger[n][[All, 2]]}, If[g==1, n, a[g]]]];
rads=Union[Array[a, nn]];
Table[a[n], {n, nn}]/.Table[rads[[i]]->i, {i, Length[rads]}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 13 2018
STATUS
approved