// output of ./demo/comb/weak-ascent-rgs-demo.cc:
// Description:
//% Weak ascent sequences (restricted growth strings, RGS), lexicographic order.
//% A weak 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 weak ascents d(j) >= d(j-1) of its argument.
//% See OEIS sequences A336070, A369321, A369322.

arg 1: 4 == n  [Length of strings]  default=4
   1:  [ . . . . ]   4
   2:  [ . . . 1 ]   3
   3:  [ . . . 2 ]   3
   4:  [ . . . 3 ]   3
   5:  [ . . 1 . ]   2
   6:  [ . . 1 1 ]   3
   7:  [ . . 1 2 ]   3
   8:  [ . . 1 3 ]   3
   9:  [ . . 2 . ]   2
  10:  [ . . 2 1 ]   3
  11:  [ . . 2 2 ]   3
  12:  [ . . 2 3 ]   3
  13:  [ . 1 . . ]   1
  14:  [ . 1 . 1 ]   3
  15:  [ . 1 . 2 ]   3
  16:  [ . 1 1 . ]   2
  17:  [ . 1 1 1 ]   3
  18:  [ . 1 1 2 ]   3
  19:  [ . 1 1 3 ]   3
  20:  [ . 1 2 . ]   2
  21:  [ . 1 2 1 ]   3
  22:  [ . 1 2 2 ]   3
  23:  [ . 1 2 3 ]   3
 ct=23
