// output of ./demo/comb/msetpart-demo.cc: // Description: //% Multiset partitions. //% Knuth's algorithm M, section 7.1.2.5, p.429-430, Vol.4A, TAOCP. //% OEIS sequences: //% A020555: content 2, 2, 2, ..., 2 (n times) //% A322487: content 3, 3, 3, ..., 3 (n times) //% A358781: content 4, 4, 4, ..., 4 (n times) //% A322488: content n, n, n, ..., n (n times) //% A317829: content 1, 2, 3, ..., n //% A000110: content 1, 1, 1, ..., 1 (n times): set partitions //% A000041: content n: integer partitions n = 6 1: {{1, 1, 2, 2, 3, 3}} 2: {{1, 1, 2, 2, 3}, {3}} 3: {{1, 1, 2, 2}, {3, 3}} 4: {{1, 1, 2, 2}, {3}, {3}} 5: {{1, 1, 2, 3, 3}, {2}} 6: {{1, 1, 2, 3}, {2, 3}} 7: {{1, 1, 2, 3}, {2}, {3}} 8: {{1, 1, 2}, {2, 3, 3}} 9: {{1, 1, 2}, {2, 3}, {3}} 10: {{1, 1, 2}, {2}, {3, 3}} 11: {{1, 1, 2}, {2}, {3}, {3}} 12: {{1, 1, 3, 3}, {2, 2}} 13: {{1, 1, 3, 3}, {2}, {2}} 14: {{1, 1, 3}, {2, 2, 3}} 15: {{1, 1, 3}, {2, 2}, {3}} 16: {{1, 1, 3}, {2, 3}, {2}} 17: {{1, 1, 3}, {2}, {2}, {3}} 18: {{1, 1}, {2, 2, 3, 3}} 19: {{1, 1}, {2, 2, 3}, {3}} 20: {{1, 1}, {2, 2}, {3, 3}} 21: {{1, 1}, {2, 2}, {3}, {3}} 22: {{1, 1}, {2, 3, 3}, {2}} 23: {{1, 1}, {2, 3}, {2, 3}} 24: {{1, 1}, {2, 3}, {2}, {3}} 25: {{1, 1}, {2}, {2}, {3, 3}} 26: {{1, 1}, {2}, {2}, {3}, {3}} 27: {{1, 2, 2, 3, 3}, {1}} 28: {{1, 2, 2, 3}, {1, 3}} 29: {{1, 2, 2, 3}, {1}, {3}} 30: {{1, 2, 2}, {1, 3, 3}} 31: {{1, 2, 2}, {1, 3}, {3}} 32: {{1, 2, 2}, {1}, {3, 3}} 33: {{1, 2, 2}, {1}, {3}, {3}} 34: {{1, 2, 3, 3}, {1, 2}} 35: {{1, 2, 3, 3}, {1}, {2}} 36: {{1, 2, 3}, {1, 2, 3}} 37: {{1, 2, 3}, {1, 2}, {3}} 38: {{1, 2, 3}, {1, 3}, {2}} 39: {{1, 2, 3}, {1}, {2, 3}} 40: {{1, 2, 3}, {1}, {2}, {3}} 41: {{1, 2}, {1, 2}, {3, 3}} 42: {{1, 2}, {1, 2}, {3}, {3}} 43: {{1, 2}, {1, 3, 3}, {2}} 44: {{1, 2}, {1, 3}, {2, 3}} 45: {{1, 2}, {1, 3}, {2}, {3}} 46: {{1, 2}, {1}, {2, 3, 3}} 47: {{1, 2}, {1}, {2, 3}, {3}} 48: {{1, 2}, {1}, {2}, {3, 3}} 49: {{1, 2}, {1}, {2}, {3}, {3}} 50: {{1, 3, 3}, {1}, {2, 2}} 51: {{1, 3, 3}, {1}, {2}, {2}} 52: {{1, 3}, {1, 3}, {2, 2}} 53: {{1, 3}, {1, 3}, {2}, {2}} 54: {{1, 3}, {1}, {2, 2, 3}} 55: {{1, 3}, {1}, {2, 2}, {3}} 56: {{1, 3}, {1}, {2, 3}, {2}} 57: {{1, 3}, {1}, {2}, {2}, {3}} 58: {{1}, {1}, {2, 2, 3, 3}} 59: {{1}, {1}, {2, 2, 3}, {3}} 60: {{1}, {1}, {2, 2}, {3, 3}} 61: {{1}, {1}, {2, 2}, {3}, {3}} 62: {{1}, {1}, {2, 3, 3}, {2}} 63: {{1}, {1}, {2, 3}, {2, 3}} 64: {{1}, {1}, {2, 3}, {2}, {3}} 65: {{1}, {1}, {2}, {2}, {3, 3}} 66: {{1}, {1}, {2}, {2}, {3}, {3}} ct = 66