OFFSET
0,3
COMMENTS
Partitions enumerated by this sequence include those in which all parts are either the same or distinct as well as partitions with an even number of parts all of which except one are the same. - Andrew Howroyd, Feb 15 2022
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
EXAMPLE
The a(1) = 1 through a(8) = 11 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (32) (33) (43) (44)
(111) (31) (41) (42) (52) (53)
(1111) (2111) (51) (61) (62)
(11111) (222) (421) (71)
(321) (2221) (431)
(3111) (4111) (521)
(111111) (211111) (2222)
(1111111) (5111)
(311111)
(11111111)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], Select[Permutations[#], !UnsameQ@@Split[#]&]=={}&]], {n, 0, 15}]
PROG
(PARI) \\ here Q(n) is A000009.
Q(n)={polcoef(prod(k=1, n, 1 + x^k + O(x*x^n)), n)}
a(n)={Q(n) + if(n, numdiv(n) - 1) + sum(k=1, (n-1)\3, sum(j=3, (n-1)\k, j%2==1 && n-k*j<>k))} \\ Andrew Howroyd, Feb 15 2022
CROSSREFS
The version for run-lengths instead of runs is A000005.
The version for normal multisets is 2^(n-1) - A283353(n-3).
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A297770 counts distinct runs in binary expansion.
A003242 counts anti-run compositions.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 15 2022
EXTENSIONS
Terms a(26) and beyond from Andrew Howroyd, Feb 15 2022
STATUS
approved