OFFSET
1,2
COMMENTS
LINKS
Gus Wiseman, Table of n, a(n) for n = 1..10000
FORMULA
First appearance of n is a(A277576(n)). Last appearance of n is a(2^^{n-1}) where ^^ denotes iterated exponentiation (or tetration).
Number of appearances of n is the Catalan number |{k:a(k)=n}| = C_{n-1}.
EXAMPLE
a(1)=1, a(2)=1+a(1)=2, a(3)=1+a(2)=3, a(4)=1+a(1)+a(1)=3 because 4=c(1)^c(1), a(8)=1+a(1)+a(2)=4 because 8=c(1)^c(2), a(9)=1+a(2)+a(1)=4 because 9=c(2)^c(1), a(10)=1+a(6)=5 because 10=c(6).
MATHEMATICA
nn=10000;
radicalQ[1]:=False; radicalQ[n_]:=SameQ[GCD@@FactorInteger[n][[All, 2]], 1];
hyperfactor[1]:={}; hyperfactor[n_?radicalQ]:={n};
hyperfactor[n_]:=With[{g=GCD@@FactorInteger[n][[All, 2]]}, Prepend[hyperfactor[g], Product[Apply[Power[#1, #2/g]&, r], {r, FactorInteger[n]}]]];
rad[0]:=1; rad[n_?Positive]:=rad[n]=NestWhile[#+1&, rad[n-1]+1, Not[radicalQ[#]]&]; Set@@@Array[radPi[rad[#]]==#&, nn];
rnk[n_]:=rnk[n]=1+Total[rnk/@radPi/@hyperfactor[n]];
Array[rnk, nn]
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Gus Wiseman, Oct 23 2016
EXTENSIONS
Edited by N. J. A. Sloane, Nov 09 2016
STATUS
approved