cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A351203 Number of integer partitions of n of whose permutations do not all have distinct runs.

This page as a plain text file.
%I A351203 #19 Jan 27 2024 19:28:45
%S A351203 0,0,0,0,1,2,3,6,11,16,24,36,52,73,101,135,184,244,321,418,543,694,
%T A351203 889,1127,1427,1789,2242,2787,3463,4276,5271,6465,7921,9655,11756,
%U A351203 14254,17262,20830,25102,30152,36172,43270,51691,61594,73300,87023,103189,122099,144296,170193,200497
%N A351203 Number of integer partitions of n of whose permutations do not all have distinct runs.
%H A351203 Andrew Howroyd, <a href="/A351203/b351203.txt">Table of n, a(n) for n = 0..1000</a>
%H A351203 Mathematics Stack Exchange, <a href="https://math.stackexchange.com/q/87559">What is a sequence run? (answered 2011-12-01)</a>
%F A351203 a(n) = A000041(n) - A351204(n). - _Andrew Howroyd_, Jan 27 2024
%e A351203 The a(4) = 1 through a(9) = 16 partitions:
%e A351203   (211)  (221)  (411)    (322)    (332)      (441)
%e A351203          (311)  (2211)   (331)    (422)      (522)
%e A351203                 (21111)  (511)    (611)      (711)
%e A351203                          (3211)   (3221)     (3321)
%e A351203                          (22111)  (3311)     (4221)
%e A351203                          (31111)  (4211)     (4311)
%e A351203                                   (22211)    (5211)
%e A351203                                   (32111)    (22221)
%e A351203                                   (41111)    (32211)
%e A351203                                   (221111)   (33111)
%e A351203                                   (2111111)  (42111)
%e A351203                                              (51111)
%e A351203                                              (222111)
%e A351203                                              (321111)
%e A351203                                              (2211111)
%e A351203                                              (3111111)
%e A351203 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).
%t A351203 Table[Length[Select[IntegerPartitions[n],MemberQ[Permutations[#],_?(!UnsameQ@@Split[#]&)]&]],{n,0,15}]
%o A351203 (Python)
%o A351203 from sympy.utilities.iterables import partitions
%o A351203 from itertools import permutations, groupby
%o A351203 from collections import Counter
%o A351203 def A351203(n):
%o A351203     c = 0
%o A351203     for s, p in partitions(n,size=True):
%o A351203         for q in permutations(Counter(p).elements(),s):
%o A351203             if max(Counter(tuple(g) for k, g in groupby(q)).values(),default=0) > 1:
%o A351203                 c += 1
%o A351203                 break
%o A351203     return c # _Chai Wah Wu_, Oct 16 2023
%Y A351203 The version for run-lengths instead of runs is A144300.
%Y A351203 The version for normal multisets is A283353.
%Y A351203 The Heinz numbers of these partitions are A351201.
%Y A351203 The complement is counted by A351204.
%Y A351203 A005811 counts runs in binary expansion.
%Y A351203 A044813 lists numbers whose binary expansion has distinct run-lengths.
%Y A351203 A059966 counts Lyndon compositions, necklaces A008965, aperiodic A000740.
%Y A351203 A098859 counts partitions with distinct multiplicities, ordered A242882.
%Y A351203 A297770 counts distinct runs in binary expansion.
%Y A351203 A003242 counts anti-run compositions, ranked by A333489.
%Y A351203 Counting words with all distinct runs:
%Y A351203 - A351013 = compositions, for run-lengths A329739, ranked by A351290.
%Y A351203 - A351016 = binary words, for run-lengths A351017.
%Y A351203 - A351018 = binary expansions, for run-lengths A032020, ranked by A175413.
%Y A351203 - A351200 = patterns, for run-lengths A351292.
%Y A351203 - A351202 = permutations of prime factors.
%Y A351203 Cf. A000041, A035363, A047993, A116608, A238130 or A238279, A325545, A329746, A350842, A351003, A351004, A351291.
%K A351203 nonn
%O A351203 0,6
%A A351203 _Gus Wiseman_, Feb 12 2022
%E A351203 a(26) onwards from _Andrew Howroyd_, Jan 27 2024