OFFSET
0,5
COMMENTS
These are also integer partitions of n with the same number of distinct parts as maximal anti-runs of parts.
LINKS
Christian Sievers, Table of n, a(n) for n = 0..1000
FORMULA
For a partition p, let s(p) be its sum, e(p) the number of equal adjacent pairs, and d(p) the number of distinct adjacent pairs. Then Sum_{p partition} x^s(p) * t^(e(p)-d(p)) = (Product_{i>=1} (1 + x^i/(t*(1-t*x^i))) - 1) * t + 1, so a(n) is the coefficient of x^n*t^0 of this expression. - Christian Sievers, Jul 18 2025
EXAMPLE
The partition (5,3,2,1,1,1,1) has 4 runs ((5),(3),(2),(1,1,1,1)) and 4 anti-runs ((5,3,2,1),(1),(1),(1)) so is counted under a(14).
The a(1) = 1 through a(10) = 10 reversed partitions (A = 10):
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A)
(112) (113) (114) (115) (116) (117) (118)
(122) (133) (224) (144) (226)
(223) (233) (225) (244)
(11123) (11124) (334)
(11223) (11125)
(11134)
(11224)
(11233)
(12223)
MATHEMATICA
Table[Length[Select[Reverse/@IntegerPartitions[n], Length[Union[#]]==Length[Split[#, #2!=#1&]]&]], {n, 0, 30}]
PROG
(PARI) lista(n)=Vec(polcoef((prod(i=1, n, 1+x^i/(t*(1-t*x^i))+O(x*x^n))-1)*t+1, 0, t)) \\ Christian Sievers, Jul 18 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 04 2025
STATUS
approved
