// output of ./demo/comb/isoscent-rgs-stats-demo.cc:
// Description:
//% Statistics for isoscent sequences.
//% An isoscent sequence is a sequence [d(1), d(2), ..., d(n)] where
//%  d(1)=0, d(k)>=0, and d(k) <= 1 + eq([d(1), d(2), ..., d(k-1)])
//%  where eq(.) counts the number of flat steps of its argument.

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