%I #9 Nov 30 2016 23:46:14
%S 1,1,1,2,3,2,2,1,1,1,2,3,4,4,3,3,2,2,1,1,1,2,3,4,5,6,5,5,4,4,3,3,2,2,
%T 1,1,1,2,3,4,5,6,7,7,6,6,5,5,4,4,3,3,2,2,1,1,1,2,3,4,5,6,7,8,9,8,8,7,
%U 7,6,6,5,5,4,4,3,3,2,2,1,1,1,2,3,4,5,6,7,8,9,10,10,9,9,8,8,7,7,6,6,5,5,4,4
%N One of a family of six fractal sequences that transform to each other.
%C Let A be the sequence A114729 (1, 1, 1, 2, 3, 2, 2, 1, 1, 1, ...), B be the sequence A114730 (1, 1, 2, 2, 1, 1, 1, 2, 3, 4, ...) and C be the sequence A114731 (1, 2, 1, 1, 1, 2, 3, 3, 2, 2, ...). Let D be the sequence A114732 (1, 2, 3, 1, 1, 2, 3, 4, 5, 6, ...), E be the sequence A114733 (1, 2, 1, 2, 3, 4, 5, 3, 1, 1, ...) and F be the sequence A114734 (1, 1, 2, 3, 4, 2, 1, 2, 3, 4, ...). Then:
%C - A upper trims to B
%C - B upper trims to C
%C - C upper trims to A
%C - A lower trims to C
%C - B lower trims to A
%C - C lower trims to B
%C - D gives the number of times each element of A occurs
%C - E gives the number of times each element of B occurs
%C - F gives the number of times each element of C occurs
%C - A gives the number of times each element of D occurs
%C - B gives the number of times each element of E occurs
%C - C gives the number of times each element of F occurs
%C - D lower trims to E
%C - E lower trims to F
%C - F lower trims to D
%C - D upper trims to F
%C - E upper trims to D
%C - F upper trims to E
%e D(7)=3 and that's the second 3 in sequence D, so A(7)=2.
%t c[n_] := Flatten[ Table[{Range[3 Floor[(k - 1)/2] + 2],
%t Table[{i, i}, {i, Floor[k/2] + k, 1, -1}]}, {k, n}]];
%t uppertrim[list_] := Fold[DeleteCases[#1, #2, 1, 1] &, list, Range[Max[list]]];
%t lowertrim[list_] := DeleteCases[list - 1, 0];
%t numbertimes[list_] := Table[Length@Position[Take[list, k], list[[k]]], {k, Length[list]}];
%t a[n_] := uppertrim[c[n]];
%t b[n_] := uppertrim[a[n]];
%t d[n_] := numbertimes[a[n]];
%t e[n_] := numbertimes[b[n]];
%t f[n_] := numbertimes[c[n]];
%t a[6] (* _Birkas Gyorgy_, Apr 21 2011 *)
%Y Cf. A114730, A114731, A114732, A114733, A114733.
%K nonn
%O 1,4
%A _Kerry Mitchell_, Dec 28 2005