OFFSET
0,6
EXAMPLE
The partition (2,1,1) has two permutations with all distinct run-lengths: (1,1,2), (2,1,1), so it is counted under a(4).
The a(4) = 1 through a(9) = 13 partitions:
(211) (221) (411) (322) (332) (441)
(311) (3111) (331) (422) (522)
(2111) (21111) (511) (611) (711)
(2221) (5111) (3222)
(4111) (22211) (6111)
(22111) (41111) (22221)
(31111) (221111) (33111)
(211111) (311111) (51111)
(2111111) (222111)
(411111)
(2211111)
(3111111)
(21111111)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], Length[Select[Permutations[#], UnsameQ@@Length/@Split[#]&]]>1&]], {n, 0, 15}]
PROG
(Python)
from itertools import groupby
from sympy.utilities.iterables import partitions, multiset_permutations
def a(n):
c = 0
for p in partitions(n):
cp = 0
for mp in multiset_permutations(p):
passes, run_lengths = True, set()
for k, g in groupby(mp):
rl = len(list(g))
if rl in run_lengths:
passes = False
break
run_lengths.add(rl)
if passes:
cp += 1
if cp > 1:
c += 1
break
return c
print([a(n) for n in range(21)]) # Michael S. Branicky, Nov 02 2025
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Gus Wiseman, Apr 20 2025
EXTENSIONS
a(21)-a(38) from Jakub Buczak, May 04 2025
STATUS
approved
