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.

Showing 1-10 of 38 results. Next

A239455 Number of Look-and-Say partitions of n; see Comments.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 7, 10, 13, 16, 21, 28, 33, 45, 55, 65, 83, 105, 121, 155, 180, 217, 259, 318, 362, 445, 512, 614, 707, 850, 958, 1155, 1309, 1543, 1754, 2079, 2327, 2740, 3085, 3592, 4042, 4699, 5253, 6093, 6815, 7839, 8751, 10069, 11208, 12832, 14266, 16270
Offset: 0

Views

Author

Keywords

Comments

Suppose that p = x(1) >= x(2) >= ... >= x(k) is a partition of n. Let y(1) > y(2) > ... > y(h) be the distinct parts of p, and let m(i) be the multiplicity of y(i) for 1 <= i <= h. Then we can "look" at p as "m(1) y(1)'s and m(2) y(2)'s and ... m(h) y(h)'s". Reversing the m's and y's, we can then "say" the Look-and-Say partition of p, denoted by LS(p). The name "Look-and-Say" follows the example of Look-and-Say integer sequences (e.g., A005150). As p ranges through the partitions of n, LS(p) ranges through all the Look-and-Say partitions of n. The number of these is A239455(n).
The Look-and-Say array is distinct from the Wilf array, described at A098859; for example, the number of Look-and-Say partitions of 9 is A239455(9) = 16, whereas the number of Wilf partitions of 9 is A098859(9) = 15. The Look-and-Say partition of 9 which is not a Wilf partition of 9 is [2,2,2,1,1,1].
Conjecture: a partition is Look-and-Say iff it has a permutation with all distinct run-lengths. For example, the partition y = (2,2,2,1,1,1) has the permutation (2,2,1,1,1,2), with run-lengths (2,3,1), which are all distinct, so y is counted under a(9). - Gus Wiseman, Aug 11 2025
Also the number of integer partitions y of n such that there is a pairwise disjoint way to choose a strict integer partition of each multiplicity (or run-length) of y. - Gus Wiseman, Aug 11 2025

Examples

			The 11 partitions of 6 generate 7 Look-and-Say partitions as follows:
6 -> 111111
51 -> 111111
42 -> 111111
411 -> 21111
33 -> 222
321 -> 111111
3111 -> 3111
222 -> 33
2211 -> 222
21111 -> 411
111111 -> 6,
so that a(6) counts these 7 partitions: 111111, 21111, 222, 3111, 33, 411, 6.
		

Crossrefs

These include all Wilf partitions, counted by A098859, ranked by A130091.
These partitions are listed by A239454 in graded reverse-lex order.
Non-Wilf partitions are counted by A336866, ranked by A130092.
A variant for runs is A351204, complement A351203.
The complement is counted by A351293, apparently ranked by A351295, conjugate A381433.
These partitions appear to be ranked by A351294, conjugate A381432.
The non-Wilf case is counted by A351592.
For normal multisets we appear to have A386580, complement A386581.
A000110 counts set partitions, ordered A000670.
A000569 = graphical partitions, complement A339617.
A003242 and A335452 count anti-runs, ranks A333489, patterns A005649.
A181819 = Heinz number of the prime signature of n (prime shadow).
A279790 counts disjoint families on strongly normal multisets.
A329738 = compositions with all equal run-lengths.
A386583 counts separable partitions, sums A325534, ranks A335433.
A386584 counts inseparable partitions, sums A325535, ranks A335448.
A386585 counts separable type partitions, sums A336106, ranks A335127.
A386586 counts inseparable type partitions, sums A386638 or A025065, ranks A335126.
Counting words with all distinct run-lengths:
- A032020 = binary expansions, for runs A351018, ranked by A044813.
- A329739 = compositions, for runs A351013, ranked by A351596.
- A351017 = binary words, for runs A351016.
- A351292 = patterns, for runs A351200.

Programs

  • Mathematica
    LS[part_List] := Reverse[Sort[Flatten[Map[Table[#[[2]], {#[[1]]}] &, Tally[part]]]]]; LS[n_Integer] := #[[Reverse[Ordering[PadRight[#]]]]] &[DeleteDuplicates[Map[LS, IntegerPartitions[n]]]]; TableForm[t = Map[LS[#] &, Range[10]]](*A239454,array*)
    Flatten[t](*A239454,sequence*)
    Map[Length[LS[#]] &, Range[25]](*A239455*)
    (* Peter J. C. Moses, Mar 18 2014 *)
    disjointFamilies[y_]:=Select[Tuples[IntegerPartitions/@Length/@Split[y]],UnsameQ@@Join@@#&];
    Table[Length[Select[IntegerPartitions[n],Length[disjointFamilies[#]]>0&]],{n,0,10}] (* Gus Wiseman, Aug 11 2025 *)

A351294 Numbers whose multiset of prime factors has at least one permutation with all distinct run-lengths.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 31, 32, 37, 40, 41, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 61, 63, 64, 67, 68, 71, 72, 73, 75, 76, 79, 80, 81, 83, 88, 89, 92, 96, 97, 98, 99, 101, 103, 104, 107, 108, 109
Offset: 1

Views

Author

Gus Wiseman, Feb 15 2022

Keywords

Comments

First differs from A130091 (Wilf partitions) in having 216.
See A239455 for the definition of Look-and-Say partitions.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
      1: ()            20: (3,1,1)         47: (15)
      2: (1)           23: (9)             48: (2,1,1,1,1)
      3: (2)           24: (2,1,1,1)       49: (4,4)
      4: (1,1)         25: (3,3)           50: (3,3,1)
      5: (3)           27: (2,2,2)         52: (6,1,1)
      7: (4)           28: (4,1,1)         53: (16)
      8: (1,1,1)       29: (10)            54: (2,2,2,1)
      9: (2,2)         31: (11)            56: (4,1,1,1)
     11: (5)           32: (1,1,1,1,1)     59: (17)
     12: (2,1,1)       37: (12)            61: (18)
     13: (6)           40: (3,1,1,1)       63: (4,2,2)
     16: (1,1,1,1)     41: (13)            64: (1,1,1,1,1,1)
     17: (7)           43: (14)            67: (19)
     18: (2,2,1)       44: (5,1,1)         68: (7,1,1)
     19: (8)           45: (3,2,2)         71: (20)
For example, the prime indices of 216 are {1,1,1,2,2,2}, and there are four permutations with distinct run-lengths: (1,1,2,2,2,1), (1,2,2,2,1,1), (2,1,1,1,2,2), (2,2,1,1,1,2); so 216 is in the sequence. It is the Heinz number of the Look-and-Say partition of (3,3,2,1).
		

Crossrefs

The Wilf case (distinct multiplicities) is A130091, counted by A098859.
The complement of the Wilf case is A130092, counted by A336866.
These partitions appear to be counted by A239455.
A variant for runs is A351201, counted by A351203 (complement A351204).
The complement is A351295, counted by A351293.
A032020 = number of binary expansions with distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A056239 = sum of prime indices, row sums of A112798.
A165413 = number of run-lengths in binary expansion, for all runs A297770.
A181819 = Heinz number of prime signature (prime shadow).
A182850/A323014 = frequency depth, counted by A225485/A325280.
A320922 ranks graphical partitions, complement A339618, counted by A000569.
A329739 = compositions with all distinct run-lengths, for all runs A351013.
A333489 ranks anti-runs, complement A348612.
A351017 = binary words with all distinct run-lengths, for all runs A351016.
A351292 = patterns with all distinct run-lengths, for all runs A351200.

Programs

  • Mathematica
    Select[Range[100],Select[Permutations[Join@@ ConstantArray@@@FactorInteger[#]],UnsameQ@@Length/@Split[#]&]!={}&]

Extensions

Name edited by Gus Wiseman, Aug 13 2025

A351293 Number of non-Look-and-Say partitions of n. Number of integer partitions of n such that there is no way to choose a disjoint strict integer partition of each multiplicity.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 9, 14, 21, 28, 44, 56, 80, 111, 148, 192, 264, 335, 447, 575, 743, 937, 1213, 1513, 1924, 2396, 3011, 3715, 4646, 5687, 7040, 8600, 10556, 12804, 15650, 18897, 22930, 27593, 33296, 39884, 47921, 57168, 68360, 81295, 96807, 114685
Offset: 0

Views

Author

Gus Wiseman, Feb 16 2022

Keywords

Comments

First differs from A336866 (non-Wilf partitions) at a(9) = 14, A336866(9) = 15, the difference being the partition (2,2,2,1,1,1).
See A239455 for the definition of Look-and-Say partitions.

Examples

			The a(3) = 1 through a(9) = 14 partitions:
  (21)  (31)  (32)  (42)    (43)    (53)     (54)
              (41)  (51)    (52)    (62)     (63)
                    (321)   (61)    (71)     (72)
                    (2211)  (421)   (431)    (81)
                            (3211)  (521)    (432)
                                    (3221)   (531)
                                    (3311)   (621)
                                    (4211)   (3321)
                                    (32111)  (4221)
                                             (4311)
                                             (5211)
                                             (32211)
                                             (42111)
                                             (321111)
		

Crossrefs

The complement is counted by A239455, ranked by A351294.
These are all non-Wilf partitions (counted by A336866, ranked by A130092).
A variant for runs is A351203, complement A351204, ranked by A351201.
These partitions appear to be ranked by A351295.
Non-Wilf partitions in the complement are counted by A351592.
A000569 = graphical partitions, complement A339617.
A032020 = number of binary expansions with all distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A098859 = Wilf partitions (distinct multiplicities), ranked by A130091.
A181819 = Heinz number of the prime signature of n (prime shadow).
A329738 = compositions with all equal run-lengths.
A329739 = compositions with all distinct run-lengths, for all runs A351013.
A351017 = binary words with all distinct run-lengths, for all runs A351016.
A351292 = patterns with all distinct run-lengths, for all runs A351200.

Programs

  • Mathematica
    disjointFamilies[y_]:=Select[Tuples[IntegerPartitions/@Length/@Split[y]],UnsameQ@@Join@@#&];
    Table[Length[Select[IntegerPartitions[n],Length[disjointFamilies[#]]==0&]],{n,0,15}] (* Gus Wiseman, Aug 13 2025 *)

Formula

a(n) = A000041(n) - A239455(n).

Extensions

Edited by Gus Wiseman, Aug 12 2025

A351295 Numbers whose multiset of prime factors has no permutation with all distinct run-lengths.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 30, 33, 34, 35, 36, 38, 39, 42, 46, 51, 55, 57, 58, 60, 62, 65, 66, 69, 70, 74, 77, 78, 82, 84, 85, 86, 87, 90, 91, 93, 94, 95, 100, 102, 105, 106, 110, 111, 114, 115, 118, 119, 120, 122, 123, 126, 129, 130, 132, 133, 134, 138, 140
Offset: 1

Views

Author

Gus Wiseman, Feb 16 2022

Keywords

Comments

First differs from A130092 (non-Wilf partitions) in lacking 216.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
      6: (2,1)         46: (9,1)         84: (4,2,1,1)
     10: (3,1)         51: (7,2)         85: (7,3)
     14: (4,1)         55: (5,3)         86: (14,1)
     15: (3,2)         57: (8,2)         87: (10,2)
     21: (4,2)         58: (10,1)        90: (3,2,2,1)
     22: (5,1)         60: (3,2,1,1)     91: (6,4)
     26: (6,1)         62: (11,1)        93: (11,2)
     30: (3,2,1)       65: (6,3)         94: (15,1)
     33: (5,2)         66: (5,2,1)       95: (8,3)
     34: (7,1)         69: (9,2)        100: (3,3,1,1)
     35: (4,3)         70: (4,3,1)      102: (7,2,1)
     36: (2,2,1,1)     74: (12,1)       105: (4,3,2)
     38: (8,1)         77: (5,4)        106: (16,1)
     39: (6,2)         78: (6,2,1)      110: (5,3,1)
     42: (4,2,1)       82: (13,1)       111: (12,2)
For example, the prime indices of 150 are {1,2,3,3}, with permutations and run-lengths (right):
  (3,3,2,1) -> (2,1,1)
  (3,3,1,2) -> (2,1,1)
  (3,2,3,1) -> (1,1,1,1)
  (3,2,1,3) -> (1,1,1,1)
  (3,1,3,2) -> (1,1,1,1)
  (3,1,2,3) -> (1,1,1,1)
  (2,3,3,1) -> (1,2,1)
  (2,3,1,3) -> (1,1,1,1)
  (2,1,3,3) -> (1,1,2)
  (1,3,3,2) -> (1,2,1)
  (1,3,2,3) -> (1,1,1,1)
  (1,2,3,3) -> (1,1,2)
Since none have all distinct run-lengths, 150 is in the sequence.
		

Crossrefs

Wilf partitions are counted by A098859, ranked by A130091.
Non-Wilf partitions are counted by A336866, ranked by A130092.
A variant for runs is A351201, counted by A351203 (complement A351204).
These partitions appear to be counted by A351293.
The complement is A351294, apparently counted by A239455.
A032020 = number of binary expansions with distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A056239 = sum of prime indices, row sums of A112798.
A165413 = number of distinct run-lengths in binary expansion.
A181819 = Heinz number of prime signature (prime shadow).
A182850/A323014 = frequency depth, counted by A225485/A325280.
A297770 = number of distinct runs in binary expansion.
A320922 ranks graphical partitions, complement A339618, counted by A000569.
A329739 = compositions with all distinct run-lengths, for all runs A351013.
A329747 = runs-resistance, counted by A329746.
A333489 ranks anti-runs, complement A348612.
A351017 = binary words with all distinct run-lengths, for all runs A351016.

Programs

  • Mathematica
    Select[Range[100],Select[Permutations[Join@@ ConstantArray@@@FactorInteger[#]],UnsameQ@@Length/@Split[#]&]=={}&]

Extensions

Name edited by Gus Wiseman, Aug 13 2025

A351014 Number of distinct runs in the n-th composition in standard order.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 1, 1, 2, 2, 2, 1, 3, 3, 2, 2, 3, 1, 2, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3, 2, 2, 3
Offset: 0

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Comments

The n-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The number 3310 has binary expansion 110011101110 and standard composition (1,3,1,1,2,1,1,2), with runs (1), (3), (1,1), (2), (1,1), (2), of which 4 are distinct, so a(3310) = 4.
		

Crossrefs

Counting not necessarily distinct runs gives A124767.
Using binary expansions instead of standard compositions gives A297770.
Positions of first appearances are A351015.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A085207 represents concatenation of standard compositions, reverse A085208.
A333489 ranks anti-runs, complement A348612.
A345167 ranks alternating compositions, counted by A025047.
A351204 counts partitions where every permutation has all distinct runs.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739, ranked by A351290.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020, ranked by A175413.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[Split[stc[n]]]],{n,0,100}]

A351013 Number of integer compositions of n with all distinct runs.

Original entry on oeis.org

1, 1, 2, 4, 7, 14, 26, 48, 88, 161, 294, 512, 970, 1634, 2954, 5156, 9119, 15618, 27354, 46674, 80130, 138078, 232286, 394966, 665552, 1123231, 1869714, 3146410, 5186556, 8620936, 14324366, 23529274, 38564554, 63246744, 103578914, 167860584, 274465845
Offset: 0

Views

Author

Gus Wiseman, Feb 09 2022

Keywords

Examples

			The a(1) = 1 through a(5) = 14 compositions:
  (1)  (2)    (3)      (4)        (5)
       (1,1)  (1,2)    (1,3)      (1,4)
              (2,1)    (2,2)      (2,3)
              (1,1,1)  (3,1)      (3,2)
                       (1,1,2)    (4,1)
                       (2,1,1)    (1,1,3)
                       (1,1,1,1)  (1,2,2)
                                  (2,2,1)
                                  (3,1,1)
                                  (1,1,1,2)
                                  (1,1,2,1)
                                  (1,2,1,1)
                                  (2,1,1,1)
                                  (1,1,1,1,1)
For example, the composition c = (3,1,1,1,1,2,1,1,3,4,1,1) has runs (3), (1,1,1,1), (2), (1,1), (3), (4), (1,1), and since (3) and (1,1) both appear twice, c is not counted under a(20).
		

Crossrefs

The version for run-lengths instead of runs is A329739, normal A329740.
These compositions are ranked by A351290, complement A351291.
A000005 counts constant compositions, ranked by A272919.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A059966 counts binary Lyndon compositions, necklaces A008965, aperiodic A000740.
A116608 counts compositions by number of distinct parts.
A238130 and A238279 count compositions by number of runs.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329744 counts compositions by runs-resistance.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020, ranked by A175413.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Split[#]&]],{n,0,10}]
  • PARI
    \\ here LahI is A111596 as row polynomials.
    LahI(n,y) = {sum(k=1, n, y^k*(-1)^(n-k)*(n!/k!)*binomial(n-1, k-1))}
    S(n) = {my(p=prod(k=1, n, 1 + y*x^k + O(x*x^n))); 1 + sum(i=1, (sqrtint(8*n+1)-1)\2, polcoef(p,i,y)*LahI(i,y))}
    seq(n)={my(q=S(n)); [subst(serlaplace(p),y,1) | p<-Vec(prod(k=1, n, subst(q + O(x*x^(n\k)), x, x^k)))]} \\ Andrew Howroyd, Feb 12 2022

Extensions

Terms a(26) and beyond from Andrew Howroyd, Feb 12 2022

A175413 Those positive integers n that when written in binary, the lengths of the runs of 1 are distinct and the lengths of the runs of 0's are distinct.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 11, 12, 13, 14, 15, 16, 19, 23, 24, 25, 28, 29, 30, 31, 32, 35, 38, 39, 44, 47, 48, 49, 50, 52, 55, 56, 57, 59, 60, 61, 62, 63, 64, 67, 70, 71, 78, 79, 88, 92, 95, 96, 97, 98, 103, 104, 111, 112, 113, 114, 115, 116, 120, 121, 123, 124, 125
Offset: 1

Views

Author

Leroy Quet, May 07 2010

Keywords

Comments

A044813 contains those positive integers that when written in binary, have all run-lengths (of both 0's and 1's) distinct.
A175414 contains those positive integers in A175413 that are not in A044813. (A175414 contains those positive integers that when written in binary, at least one run of 0's is the same length as one run of 1's, even though all run of 0 are of distinct length and all runs of 1's are of distinct length.)
Also numbers whose binary expansion has all distinct runs (not necessarily run-lengths). - Gus Wiseman, Feb 21 2022

Crossrefs

Runs in binary expansion are counted by A005811, distinct A297770.
The complement is A351205.
The version for standard compositions is A351290, complement A351291.
A000120 counts binary weight.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A325545 counts compositions with distinct differences.
A333489 ranks anti-runs, complement A348612, counted by A003242.
A334028 counts distinct parts in standard compositions.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.

Programs

  • Maple
    q:= proc(n) uses ListTools; (l-> is(nops(l)=add(
          nops(i), i={Split(`=`, l, 1)}) +add(
          nops(i), i={Split(`=`, l, 0)})))(Bits[Split](n))
        end:
    select(q, [$1..200])[];  # Alois P. Heinz, Mar 14 2022
  • Mathematica
    f[n_] := And@@Unequal@@@Transpose[Partition[Length/@Split[IntegerDigits[n, 2]], 2, 2, {1,1}, 0]]; Select[Range[125], f] (* Ray Chandler, Oct 21 2011 *)
    Select[Range[0,100],UnsameQ@@Split[IntegerDigits[#,2]]&] (* Gus Wiseman, Feb 21 2022 *)
  • Python
    from itertools import groupby, product
    def ok(n):
        runs = [(k, len(list(g))) for k, g in groupby(bin(n)[2:])]
        return len(runs) == len(set(runs))
    print([k for k in range(1, 125) if ok(k)]) # Michael S. Branicky, Feb 22 2022

Extensions

Extended by Ray Chandler, Oct 21 2011

A384175 Number of subsets of {1..n} with all distinct lengths of maximal runs (increasing by 1).

Original entry on oeis.org

1, 2, 4, 7, 13, 24, 44, 77, 135, 236, 412, 713, 1215, 2048, 3434, 5739, 9559, 15850, 26086, 42605, 69133, 111634, 179602, 288069, 460553, 733370, 1162356, 1833371, 2878621, 4501856, 7016844, 10905449, 16904399, 26132460, 40279108, 61885621, 94766071, 144637928
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {2,3,5,6,7,9} has maximal runs ((2,3),(5,6,7),(9)), with lengths (2,3,1), so is counted under a(9).
The a(0) = 1 through a(4) = 13 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {2}
           {1,2}  {3}      {3}
                  {1,2}    {4}
                  {2,3}    {1,2}
                  {1,2,3}  {2,3}
                           {3,4}
                           {1,2,3}
                           {1,2,4}
                           {1,3,4}
                           {2,3,4}
                           {1,2,3,4}
		

Crossrefs

For equal instead of distinct lengths we have A243815.
These subsets are ranked by A328592.
The complement is counted by A384176.
For anti-runs instead of runs we have A384177, ranks A384879.
For partitions instead of subsets we have A384884, A384178, A384886, A384880.
For permutations instead of subsets we have A384891, equal instead of distinct A384892.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y^(n+2)),p=prod(i=1,n,1+o+x*y^(i+1)/(1-y),1/(1-y)));p=subst(serlaplace(p),x,1);Vec(p-1)} \\ Christian Sievers, Jun 18 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 18 2025

A351016 Number of binary words of length n with all distinct runs.

Original entry on oeis.org

1, 2, 4, 6, 12, 18, 36, 54, 92, 154, 244, 382, 652, 994, 1572, 2414, 3884, 5810, 8996, 13406, 21148, 31194, 47508, 70086, 104844, 156738, 231044, 338998, 496300, 721042, 1064932, 1536550, 2232252, 3213338, 4628852, 6603758, 9554156, 13545314, 19354276
Offset: 0

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Comments

These are binary words where the runs of zeros have all distinct lengths and the runs of ones also have all distinct lengths. For n > 0 this is twice the number of terms of A175413 that have n digits in binary.

Examples

			The a(0) = 1 through a(4) = 12 binary words:
  ()   0    00    000    0000
       1    01    001    0001
            10    011    0010
            11    100    0011
                  110    0100
                  111    0111
                         1000
                         1011
                         1100
                         1101
                         1110
                         1111
For example, the word (1,1,0,1) has three runs (1,1), (0), (1), which are all distinct, so is counted under a(4).
		

Crossrefs

The version for compositions is A351013, lengths A329739, ranked by A351290.
The version for [run-]lengths is A351017.
The version for expansions is A351018, lengths A032020, ranked by A175413.
The version for patterns is A351200, lengths A351292.
The version for permutations of prime factors is A351202.
A000120 counts binary weight.
A001037 counts binary Lyndon words, necklaces A000031, aperiodic A027375.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329767 counts binary words by runs-resistance.
A351014 counts distinct runs in standard compositions.
A351204 counts partitions whose permutations all have all distinct runs.

Programs

  • Mathematica
    Table[Length[Select[Tuples[{0,1},n],UnsameQ@@Split[#]&]],{n,0,10}]
  • Python
    from itertools import groupby, product
    def adr(s):
        runs = [(k, len(list(g))) for k, g in groupby(s)]
        return len(runs) == len(set(runs))
    def a(n):
        if n == 0: return 1
        return 2*sum(adr("1"+"".join(w)) for w in product("01", repeat=n-1))
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 08 2022

Formula

a(n>0) = 2 * A351018(n).

Extensions

a(25)-a(32) from Michael S. Branicky, Feb 08 2022
a(33)-a(38) from David A. Corneth, Feb 08 2022

A384177 Number of subsets of {1..n} with all distinct lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 3, 5, 10, 19, 35, 62, 109, 197, 364, 677, 1251, 2288, 4143, 7443, 13318, 23837, 42809, 77216, 139751, 253293, 458800, 829237, 1494169, 2683316, 4804083, 8580293, 15301324, 27270061, 48607667, 86696300, 154758265, 276453311, 494050894, 882923051
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {1,2,4,5,7,10} has maximal anti-runs ((1),(2,4),(5,7,10)), with lengths (1,2,3), so is counted under a(10).
The a(0) = 1 through a(5) = 19 subsets:
  {}  {}   {}   {}     {}       {}
      {1}  {1}  {1}    {1}      {1}
           {2}  {2}    {2}      {2}
                {3}    {3}      {3}
                {1,3}  {4}      {4}
                       {1,3}    {5}
                       {1,4}    {1,3}
                       {2,4}    {1,4}
                       {1,2,4}  {1,5}
                       {1,3,4}  {2,4}
                                {2,5}
                                {3,5}
                                {1,2,4}
                                {1,2,5}
                                {1,3,4}
                                {1,3,5}
                                {1,4,5}
                                {2,3,5}
                                {2,4,5}
		

Crossrefs

For runs instead of anti-runs we have A384175, complement A384176.
These subsets are ranked by A384879.
For strict partitions instead of subsets we have A384880, see A384178, A384884, A384886.
For equal instead of distinct lengths we have A384889, for runs A243815.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y*y^n),p=prod(i=1,(n+1)\2,1+o+x*y^(2*i-1)/(1-y)^(i-1)));p=subst(serlaplace(p),x,1);Vec((p-y)/(1-y)^2)} \\ Christian Sievers, Jun 18 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 18 2025
Showing 1-10 of 38 results. Next