OFFSET
0,3
FORMULA
Involves substitutions 1-> {1, 2}, 2->{1, 3}, 3->1.
MATHEMATICA
Hofstadter[n_Integer? Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n - 1]] + Hofstadter[n - Hofstadter[n - 2]];
Hofstadter[0] = Hofstadter[1] = 1;
s[1] = {1, 2}; s[2] = {1, 3}; s[3] = {1};
t[a_] := Join[a, Flatten[s /@ a]];
p[0] = {1}; p[1] = t[{1}];
p[n_] := t[p[n - 1]];
Flatten[Table[p[If[n > 0, Hofstadter[n], n]], {n, 0, 7}]]
CROSSREFS
KEYWORD
nonn,uned,less
AUTHOR
Roger L. Bagula, Mar 30 2005
STATUS
approved