// output of ./demo/comb/ascent-rgs-stats-demo.cc:
// Description:
//% Statistics for ascent sequences.
//% Cf. the following OEIS sequences:
//% A218577:
//%   triangle, length-n ascent sequences with maximal element k-1.
//%   An ascent sequence is a sequence [d(1), d(2), ..., d(n)] where d(1)=0, d(k)>=0,
//%   and d(k) <= 1 + asc([d(1), d(2), ..., d(k-1)]) and asc(.) counts the number
//%   of ascents of its argument.
//% A137251: ascent sequences with k ascents.
//% A175579: ascent sequences with k zeros.
//% A218579: ascent sequences with position of last zero at index k-1.
//% A218580: ascent sequences with position of first occurrence of maximal value at index k-1.
//% A218581: ascent sequences with position of last occurrence of maximal value at index k-1.

arg 1: 5 == n  [Length of strings, n>=1]  default=5
arg 2: 0 == sq  [Select stats:
    0 ==> max element
    1 ==> number of ascents
    2 ==> number of descents
    3 ==> number of zeros
    4 ==> number of fixed points
    5 ==> number of maximal digits
    6 ==> position of last occurrence of zero
    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
]  default=0
   1:  [ . . . . . ]   0
   2:  [ . . . . 1 ]   1
   3:  [ . . . 1 . ]   1
   4:  [ . . . 1 1 ]   1
   5:  [ . . . 1 2 ]   2
   6:  [ . . 1 . . ]   1
   7:  [ . . 1 . 1 ]   1
   8:  [ . . 1 . 2 ]   2
   9:  [ . . 1 1 . ]   1
  10:  [ . . 1 1 1 ]   1
  11:  [ . . 1 1 2 ]   2
  12:  [ . . 1 2 . ]   2
  13:  [ . . 1 2 1 ]   2
  14:  [ . . 1 2 2 ]   2
  15:  [ . . 1 2 3 ]   3
  16:  [ . 1 . . . ]   1
  17:  [ . 1 . . 1 ]   1
  18:  [ . 1 . . 2 ]   2
  19:  [ . 1 . 1 . ]   1
  20:  [ . 1 . 1 1 ]   1
  21:  [ . 1 . 1 2 ]   2
  22:  [ . 1 . 1 3 ]   3
  23:  [ . 1 . 2 . ]   2
  24:  [ . 1 . 2 1 ]   2
  25:  [ . 1 . 2 2 ]   2
  26:  [ . 1 . 2 3 ]   3
  27:  [ . 1 1 . . ]   1
  28:  [ . 1 1 . 1 ]   1
  29:  [ . 1 1 . 2 ]   2
  30:  [ . 1 1 1 . ]   1
  31:  [ . 1 1 1 1 ]   1
  32:  [ . 1 1 1 2 ]   2
  33:  [ . 1 1 2 . ]   2
  34:  [ . 1 1 2 1 ]   2
  35:  [ . 1 1 2 2 ]   2
  36:  [ . 1 1 2 3 ]   3
  37:  [ . 1 2 . . ]   2
  38:  [ . 1 2 . 1 ]   2
  39:  [ . 1 2 . 2 ]   2
  40:  [ . 1 2 . 3 ]   3
  41:  [ . 1 2 1 . ]   2
  42:  [ . 1 2 1 1 ]   2
  43:  [ . 1 2 1 2 ]   2
  44:  [ . 1 2 1 3 ]   3
  45:  [ . 1 2 2 . ]   2
  46:  [ . 1 2 2 1 ]   2
  47:  [ . 1 2 2 2 ]   2
  48:  [ . 1 2 2 3 ]   3
  49:  [ . 1 2 3 . ]   3
  50:  [ . 1 2 3 1 ]   3
  51:  [ . 1 2 3 2 ]   3
  52:  [ . 1 2 3 3 ]   3
  53:  [ . 1 2 3 4 ]   4
1, 15, 25, 11, 1, 0, 
 ct=53
