// output of ./demo/comb/ordered-tree-lev-seq-stats-demo.cc:
// Description:
//% Statistics for (level sequences of) ordered rooted trees.
//% Cf. the following OEIS sequences:
//% A000108: all trees.
//% A080936: trees by height.
//% A001263: trees by number of ascents.
//% A091894: trees by number of descents.
//% A033184: trees by number of ones.
//% A152879: trees by number of max levels.
//% A078391: trees by position of last 1.
//% A091869: trees by number of flat steps.
//% A116424: trees by number of peaks.
//% A203717: trees by max branching number (out-degree).

arg 1: 5 == n  [Number of non-root nodes]  default=5
arg 2: 0 == sq  [Select stats:
    0 ==> by height
    1 ==> number of ascents
    2 ==> number of descents
    3 ==> number of ones
    5 ==> number of maximal levels
    6 ==> position of last occurrence of one
    7 ==> position of first occurrence of the maximal value
    8 ==> position of last occurrence of the maximal value
    9 ==> number of flat steps
   10 ==> number of even values
   11 ==> number of odd values
   20 ==> number of flat steps
   21 ==> number of non-flat steps
   25 ==> number of peaks
]  default=0
arg 3: 0 == aa  [Whether to render trees as ASCII art]  default=0
   1:  [ 0 1 1 1 1 1 ]   1
   2:  [ 0 1 1 1 1 2 ]   2
   3:  [ 0 1 1 1 2 1 ]   2
   4:  [ 0 1 1 1 2 2 ]   2
   5:  [ 0 1 1 1 2 3 ]   3
   6:  [ 0 1 1 2 1 1 ]   2
   7:  [ 0 1 1 2 1 2 ]   2
   8:  [ 0 1 1 2 2 1 ]   2
   9:  [ 0 1 1 2 2 2 ]   2
  10:  [ 0 1 1 2 2 3 ]   3
  11:  [ 0 1 1 2 3 1 ]   3
  12:  [ 0 1 1 2 3 2 ]   3
  13:  [ 0 1 1 2 3 3 ]   3
  14:  [ 0 1 1 2 3 4 ]   4
  15:  [ 0 1 2 1 1 1 ]   2
  16:  [ 0 1 2 1 1 2 ]   2
  17:  [ 0 1 2 1 2 1 ]   2
  18:  [ 0 1 2 1 2 2 ]   2
  19:  [ 0 1 2 1 2 3 ]   3
  20:  [ 0 1 2 2 1 1 ]   2
  21:  [ 0 1 2 2 1 2 ]   2
  22:  [ 0 1 2 2 2 1 ]   2
  23:  [ 0 1 2 2 2 2 ]   2
  24:  [ 0 1 2 2 2 3 ]   3
  25:  [ 0 1 2 2 3 1 ]   3
  26:  [ 0 1 2 2 3 2 ]   3
  27:  [ 0 1 2 2 3 3 ]   3
  28:  [ 0 1 2 2 3 4 ]   4
  29:  [ 0 1 2 3 1 1 ]   3
  30:  [ 0 1 2 3 1 2 ]   3
  31:  [ 0 1 2 3 2 1 ]   3
  32:  [ 0 1 2 3 2 2 ]   3
  33:  [ 0 1 2 3 2 3 ]   3
  34:  [ 0 1 2 3 3 1 ]   3
  35:  [ 0 1 2 3 3 2 ]   3
  36:  [ 0 1 2 3 3 3 ]   3
  37:  [ 0 1 2 3 3 4 ]   4
  38:  [ 0 1 2 3 4 1 ]   4
  39:  [ 0 1 2 3 4 2 ]   4
  40:  [ 0 1 2 3 4 3 ]   4
  41:  [ 0 1 2 3 4 4 ]   4
  42:  [ 0 1 2 3 4 5 ]   5
0, 1, 15, 18, 7, 1, 0, 
 ct=42
