// output of ./demo/comb/partition-nonsquashing-desc-demo.cc:
// Description:
//% Non-squashing partitions as weakly descending list of parts.
//% A non-squashing partition of n is a partition a[1] + a[2] + ... + a[m] = n
//%   such that a[k] >= sum(j=k+1..m, a[j] ).
//% Lexicographic order.
//% With parameter sd = true generate strongly decreasing partitions:
//%   partitions such that a[k] > sum(j=k+1..m, a[j] ).
//% See:
//%  N. J. A. Sloane, James A. Sellers: "On Non-Squashing Partitions",
//%    arXiv:math/0312418 [math.CO], (22-December-2003).
//% Cf. OEIS sequences A018819, A000123 (non-squashing), and A040039 (strongly decreasing).

arg 1: 20 == n  [non-squashing (or strongly decreasing) partitions of n]  default=20
arg 2: 0 == sd  [whether strongly decreasing (otherwise non-squashing)]  default=0
   1:  [ 5]   [ 10 5 3 1 1 ]
   2:  [ 4]   [ 10 5 3 2 ]
   3:  [ 4]   [ 10 5 4 1 ]
   4:  [ 3]   [ 10 5 5 ]
   5:  [ 5]   [ 10 6 2 1 1 ]
   6:  [ 4]   [ 10 6 2 2 ]
   7:  [ 4]   [ 10 6 3 1 ]
   8:  [ 3]   [ 10 6 4 ]
   9:  [ 4]   [ 10 7 2 1 ]
  10:  [ 3]   [ 10 7 3 ]
  11:  [ 4]   [ 10 8 1 1 ]
  12:  [ 3]   [ 10 8 2 ]
  13:  [ 3]   [ 10 9 1 ]
  14:  [ 2]   [ 10 10 ]
  15:  [ 5]   [ 11 5 2 1 1 ]
  16:  [ 4]   [ 11 5 2 2 ]
  17:  [ 4]   [ 11 5 3 1 ]
  18:  [ 3]   [ 11 5 4 ]
  19:  [ 4]   [ 11 6 2 1 ]
  20:  [ 3]   [ 11 6 3 ]
  21:  [ 4]   [ 11 7 1 1 ]
  22:  [ 3]   [ 11 7 2 ]
  23:  [ 3]   [ 11 8 1 ]
  24:  [ 2]   [ 11 9 ]
  25:  [ 5]   [ 12 4 2 1 1 ]
  26:  [ 4]   [ 12 4 2 2 ]
  27:  [ 4]   [ 12 4 3 1 ]
  28:  [ 3]   [ 12 4 4 ]
  29:  [ 4]   [ 12 5 2 1 ]
  30:  [ 3]   [ 12 5 3 ]
  31:  [ 4]   [ 12 6 1 1 ]
  32:  [ 3]   [ 12 6 2 ]
  33:  [ 3]   [ 12 7 1 ]
  34:  [ 2]   [ 12 8 ]
  35:  [ 4]   [ 13 4 2 1 ]
  36:  [ 3]   [ 13 4 3 ]
  37:  [ 4]   [ 13 5 1 1 ]
  38:  [ 3]   [ 13 5 2 ]
  39:  [ 3]   [ 13 6 1 ]
  40:  [ 2]   [ 13 7 ]
  41:  [ 4]   [ 14 3 2 1 ]
  42:  [ 3]   [ 14 3 3 ]
  43:  [ 4]   [ 14 4 1 1 ]
  44:  [ 3]   [ 14 4 2 ]
  45:  [ 3]   [ 14 5 1 ]
  46:  [ 2]   [ 14 6 ]
  47:  [ 4]   [ 15 3 1 1 ]
  48:  [ 3]   [ 15 3 2 ]
  49:  [ 3]   [ 15 4 1 ]
  50:  [ 2]   [ 15 5 ]
  51:  [ 4]   [ 16 2 1 1 ]
  52:  [ 3]   [ 16 2 2 ]
  53:  [ 3]   [ 16 3 1 ]
  54:  [ 2]   [ 16 4 ]
  55:  [ 3]   [ 17 2 1 ]
  56:  [ 2]   [ 17 3 ]
  57:  [ 3]   [ 18 1 1 ]
  58:  [ 2]   [ 18 2 ]
  59:  [ 2]   [ 19 1 ]
  60:  [ 1]   [ 20 ]
 ct=60
