// output of ./demo/comb/ballot-seq-stats-demo.cc: // Description: //% Statistics for ballot sequences (and standard Young tableaux): //% Cf. the following OEIS sequences: //% A161126, A238121, A238123, A238125, A238128, and A238129. arg 1: 5 == n [Number of cells] default=5 arg 2: 0 == sq [Select stats: 0 ==> by maximal descent 1 ==> by maximal ascent 10 ==> by number of ascents 11 ==> by number of descents 20 ==> by number of smallest parts 21 ==> by number of largest parts 30 ==> by position of last max val 31 ==> by position of last min val 40 ==> by number of flat steps 41 ==> by number of non-flat steps ] default=0 arg 3: 0 == tq [Whether do draw tableaux (as ASCII art)] default=0 1: [ 1 1 1 1 1 ] 0 2: [ 1 1 1 1 2 ] 0 3: [ 1 1 1 2 1 ] 1 4: [ 1 1 1 2 2 ] 0 5: [ 1 1 1 2 3 ] 0 6: [ 1 1 2 1 1 ] 1 7: [ 1 1 2 1 2 ] 1 8: [ 1 1 2 1 3 ] 1 9: [ 1 1 2 2 1 ] 1 10: [ 1 1 2 2 3 ] 0 11: [ 1 1 2 3 1 ] 2 12: [ 1 1 2 3 2 ] 1 13: [ 1 1 2 3 4 ] 0 14: [ 1 2 1 1 1 ] 1 15: [ 1 2 1 1 2 ] 1 16: [ 1 2 1 1 3 ] 1 17: [ 1 2 1 2 1 ] 1 18: [ 1 2 1 2 3 ] 1 19: [ 1 2 1 3 1 ] 2 20: [ 1 2 1 3 2 ] 1 21: [ 1 2 1 3 4 ] 1 22: [ 1 2 3 1 1 ] 2 23: [ 1 2 3 1 2 ] 2 24: [ 1 2 3 1 4 ] 2 25: [ 1 2 3 4 1 ] 3 26: [ 1 2 3 4 5 ] 0 7, 13, 5, 1, 0, 0, ct=26