OFFSET
0,3
MATHEMATICA
s[1] = {2, 3}; s[2] = {3, 4}; s[3] = {4}; s[4] = {1};
t[a_] := Join[a, Flatten[s /@ a]];
p[0] = {1}; p[1] = t[{1}]; p[n_] := t[p[n - 1]]
aa = Flatten[Table[p[n], {n, 0, 4}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Apr 25 2005
STATUS
approved