X sequence.

The rules are simple: Here, # means any sequence of positive integers. ## is another sequence. They can be empty. The syntax is X(#){n}.
  1. X(){n}=n
  2. X(#,1){n}=X(#){n+1}
  3. X(#,n,##,n+1){m}=X(#,n,##,n,##,n,##,n,##...) with m "n,##"'s if ## has no elements ≤n
  4. Otherwise,
    1. Draw the hanging-rope diagram
    2. Evaluate bottom
    3. Ascend back up