Fractal sequence

In mathematics, a fractal sequence is one that contains itself as a proper subsequence. An example is


 * 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ...

If the first occurrence of each n is deleted, the remaining sequence is identical to the original. The process can be repeated indefinitely, so that actually, the original sequence contains not only one copy of itself, but rather, infinitely many.

Definition
The precise definition of fractal sequence depends on a preliminary definition: a sequence x = (xn) is an infinitive sequence if for every i,


 * (F1)  xn = i for infinitely many n.

Let a(i,j) be the jth index n for which xn = i. An infinitive sequence x is a fractal sequence if two additional conditions hold:


 * (F2)  if i+1 = xn, then there exists m < n such that
 * $$i=x_m$$


 * (F3)  if h < i then for every j there is exactly one k such that


 * $$a(i,j) < a(h,k) < a(i,j+1).$$

According to (F2), the first occurrence of each i > 1 in x must be preceded at least once by each of the numbers 1, 2, ..., i-1, and according to (F3), between consecutive occurrences of i in x, each h less than i occurs exactly once.

Example
Suppose θ is a positive irrational number. Let


 * S(θ) = the set of numbers c + dθ, where c and d are positive integers

and let


 * cn(θ) + θdn(θ)

be the sequence obtained by arranging the numbers in S(θ) in increasing order. The sequence cn(θ) is the signature of θ, and it is a fractal sequence.

For example, the signature of the golden ratio (i.e., θ = (1 + sqrt(5))/2) begins with


 * 1, 2, 1, 3, 2, 4, 1, 3, 5, 2, 4, 1, 6, 3, 5, 2, 7, 4, 1, 6, 3, 8, 5, ...

and the signature of 1/θ = θ - 1 begins with


 * 1, 1, 2, 1, 2, 1, 3, 2, 1, 3, 2, 4, 1, 3, 2, 4, 1, 3, 2, 4, 1, 3, 5, ...

These are sequences and  in the On-Line Encyclopedia of Integer Sequences, where further examples from a variety of number-theoretic and combinatorial settings are given.