// output of ./demo/comb/pellgray-rec-demo.cc:
// Description:
//% Gray code for Pell words, recursive CAT algorithm

arg 1: 4 == n  [Length of words]  default=4
arg 2: 1 == zq  [ 0==>Lex order  1==>Gray code]  default=1
arg 3: 0 == rq  [Whether to reverse order]  default=0
   1:    . . . .
   2:    . . . 1
   3:    . . . 2
   4:    . . 1 2
   5:    . . 1 1
   6:    . . 1 .
   7:    . . 2 .
   8:    . 1 2 .
   9:    . 1 1 .
  10:    . 1 1 1
  11:    . 1 1 2
  12:    . 1 . 2
  13:    . 1 . 1
  14:    . 1 . .
  15:    . 2 . .
  16:    . 2 . 1
  17:    . 2 . 2
  18:    1 2 . 2
  19:    1 2 . 1
  20:    1 2 . .
  21:    1 1 . .
  22:    1 1 . 1
  23:    1 1 . 2
  24:    1 1 1 2
  25:    1 1 1 1
  26:    1 1 1 .
  27:    1 1 2 .
  28:    1 . 2 .
  29:    1 . 1 .
  30:    1 . 1 1
  31:    1 . 1 2
  32:    1 . . 2
  33:    1 . . 1
  34:    1 . . .
  35:    2 . . .
  36:    2 . . 1
  37:    2 . . 2
  38:    2 . 1 2
  39:    2 . 1 1
  40:    2 . 1 .
  41:    2 . 2 .
ct=41
work/object=0.487805
