OFFSET
1,4
COMMENTS
A fractal sequence is one where, when the first instance of each integer is removed, the original sequence results. We require also that these first instances occur in order: 1,1,2,3 is OK, but 1,1,3,2 is not. A finite sequence is an initial subsequence of (uncountably many) fractal sequences when the result after removing the first instance of each number is an initial subsequence. The total number of such sequences of length n is 2^{n-1}. At each index after the first, the next value can be either a new value or a uniquely determined repetition of some earlier value. Conjecture: column 1 of this array is A007059.
LINKS
C. Kimberling, Fractal sequences
FORMULA
If 2 <= n <= 2k-1, T(n,k) = C(n-2,k-2).
EXAMPLE
For n = 3, the 4 sequences are 1,1,1; 1,1,2; 1,2,1; and 1,2,3. Of these, 2 end in 1, 1 in 2 and 1 in 3, so row 3 is 2,1,1.
The table starts:
1
1,1
2,1,1
3,2,2,1
5,4,3,3,1
8,8,5,6,4,1
MATHEMATICA
uppertrim[list_] := Fold[DeleteCases[#1, #2, 1, 1] &, list, Range[Max[list]]]; to[list_, 0] := Append[list, Part[list, Length[uppertrim@list] + 1]]; to[list_, 1] := Append[list, Max@list + 1]; allfractal[n_] := Fold[to[#1, #2] &, {1}, #] & /@ Tuples[{0, 1}, n]; k = 10; Flatten[Table[BinCounts[allfractal[k][[All, i]], {1, i + 1}] 2^(i - 1), {i, k + 1}]/2^k] (* Birkas Gyorgy, Nov 25 2012 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Franklin T. Adams-Watters, Aug 17 2006
STATUS
approved