A351203 Number of integer partitions of n of whose permutations do not all have distinct runs.
0, 0, 0, 0, 1, 2, 3, 6, 11, 16, 24, 36, 52, 73, 101, 135, 184, 244, 321, 418, 543, 694, 889, 1127, 1427, 1789, 2242, 2787, 3463, 4276, 5271, 6465, 7921, 9655, 11756, 14254, 17262, 20830, 25102, 30152, 36172, 43270, 51691, 61594, 73300, 87023, 103189, 122099, 144296, 170193, 200497
Offset: 0
Keywords
Examples
The a(4) = 1 through a(9) = 16 partitions: (211) (221) (411) (322) (332) (441) (311) (2211) (331) (422) (522) (21111) (511) (611) (711) (3211) (3221) (3321) (22111) (3311) (4221) (31111) (4211) (4311) (22211) (5211) (32111) (22221) (41111) (32211) (221111) (33111) (2111111) (42111) (51111) (222111) (321111) (2211111) (3111111) For example, the partition x = (2,1,1,1,1) has the permutation (1,1,2,1,1), with runs (1,1), (2), (1,1), which are not all distinct, so x is counted under a(6).
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
- Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
Crossrefs
The version for run-lengths instead of runs is A144300.
The version for normal multisets is A283353.
The Heinz numbers of these partitions are A351201.
The complement is counted by A351204.
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A297770 counts distinct runs in binary expansion.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
Programs
-
Mathematica
Table[Length[Select[IntegerPartitions[n],MemberQ[Permutations[#],_?(!UnsameQ@@Split[#]&)]&]],{n,0,15}]
-
Python
from sympy.utilities.iterables import partitions from itertools import permutations, groupby from collections import Counter def A351203(n): c = 0 for s, p in partitions(n,size=True): for q in permutations(Counter(p).elements(),s): if max(Counter(tuple(g) for k, g in groupby(q)).values(),default=0) > 1: c += 1 break return c # Chai Wah Wu, Oct 16 2023
Formula
Extensions
a(26) onwards from Andrew Howroyd, Jan 27 2024