// output of ./demo/comb/tree-lev-seq-stats-demo.cc:
// Description:
//% Statistics for (level sequences of) unordered rooted trees.
//% Cf. the following OEIS sequences:
//% A000081: all trees.
//% A034781: trees by height.
//% A033185: forests by number of trees.
//% A244372: trees by max branching number (out-degree).
//% A244454: trees by min branching number (out-degree) of non-leaf nodes.

arg 1: 6 == n  [Number of non-root nodes]  default=6
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
    8 ==> position of last occurrence of the maximal value
   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:  [ . 1 2 3 4 5 ]   6
   2:  [ . 1 2 3 4 5 ]   5
   3:  [ . 1 2 3 4 5 ]   5
   4:  [ . 1 2 3 4 5 ]   5
   5:  [ . 1 2 3 4 5 ]   5
   6:  [ . 1 2 3 4 5 ]   5
   7:  [ . 1 2 3 4 4 ]   4
   8:  [ . 1 2 3 4 4 ]   4
   9:  [ . 1 2 3 4 4 ]   4
  10:  [ . 1 2 3 4 4 ]   4
  11:  [ . 1 2 3 4 3 ]   4
  12:  [ . 1 2 3 4 3 ]   4
  13:  [ . 1 2 3 4 3 ]   4
  14:  [ . 1 2 3 4 3 ]   4
  15:  [ . 1 2 3 4 2 ]   4
  16:  [ . 1 2 3 4 2 ]   4
  17:  [ . 1 2 3 4 2 ]   4
  18:  [ . 1 2 3 4 1 ]   4
  19:  [ . 1 2 3 4 1 ]   4
  20:  [ . 1 2 3 3 3 ]   3
  21:  [ . 1 2 3 3 3 ]   3
  22:  [ . 1 2 3 3 3 ]   3
  23:  [ . 1 2 3 3 2 ]   3
  24:  [ . 1 2 3 3 2 ]   3
  25:  [ . 1 2 3 3 2 ]   3
  26:  [ . 1 2 3 3 1 ]   3
  27:  [ . 1 2 3 3 1 ]   3
  28:  [ . 1 2 3 2 3 ]   3
  29:  [ . 1 2 3 2 3 ]   3
  30:  [ . 1 2 3 2 2 ]   3
  31:  [ . 1 2 3 2 2 ]   3
  32:  [ . 1 2 3 2 1 ]   3
  33:  [ . 1 2 3 2 1 ]   3
  34:  [ . 1 2 3 1 2 ]   3
  35:  [ . 1 2 3 1 2 ]   3
  36:  [ . 1 2 3 1 2 ]   3
  37:  [ . 1 2 3 1 1 ]   3
  38:  [ . 1 2 2 2 2 ]   2
  39:  [ . 1 2 2 2 2 ]   2
  40:  [ . 1 2 2 2 1 ]   2
  41:  [ . 1 2 2 2 1 ]   2
  42:  [ . 1 2 2 1 2 ]   2
  43:  [ . 1 2 2 1 2 ]   2
  44:  [ . 1 2 2 1 1 ]   2
  45:  [ . 1 2 1 2 1 ]   2
  46:  [ . 1 2 1 2 1 ]   2
  47:  [ . 1 2 1 1 1 ]   2
  48:  [ . 1 1 1 1 1 ]   1
0, 1, 10, 18, 13, 5, 1, 
 ct=48
