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.

Previous Showing 11-20 of 28 results. Next

A351290 Numbers k such that the k-th composition in standard order has all distinct runs.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 47, 48, 50, 51, 52, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 78
Offset: 1

Views

Author

Gus Wiseman, Feb 10 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 terms together with their binary expansions and corresponding compositions begin:
   0:      0  ()
   1:      1  (1)
   2:     10  (2)
   3:     11  (1,1)
   4:    100  (3)
   5:    101  (2,1)
   6:    110  (1,2)
   7:    111  (1,1,1)
   8:   1000  (4)
   9:   1001  (3,1)
  10:   1010  (2,2)
  11:   1011  (2,1,1)
  12:   1100  (1,3)
  14:   1110  (1,1,2)
  15:   1111  (1,1,1,1)
		

Crossrefs

The version for Heinz numbers and prime multiplicities is A130091.
The version using binary expansions is A175413, complement A351205.
The version for run-lengths instead of runs is A329739.
These compositions are counted by A351013.
The complement is A351291.
A005811 counts runs in binary expansion, distinct A297770.
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:
- 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.
Selected statistics of standard compositions:
- Length is A000120.
- Parts are A066099, reverse A228351.
- Sum is A070939.
- Runs are counted by A124767, distinct A351014.
- 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;
    Select[Range[0,100],UnsameQ@@Split[stc[#]]&]

A351291 Numbers k such that the k-th composition in standard order does not have all distinct runs.

Original entry on oeis.org

13, 22, 25, 45, 46, 49, 53, 54, 59, 76, 77, 82, 89, 91, 93, 94, 97, 101, 102, 105, 108, 109, 110, 115, 118, 141, 148, 150, 153, 156, 162, 165, 166, 173, 177, 178, 180, 181, 182, 183, 187, 189, 190, 193, 197, 198, 201, 204, 205, 209, 210, 213, 214, 216, 217
Offset: 1

Views

Author

Gus Wiseman, Feb 12 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 terms together with their binary expansions and corresponding compositions begin:
  13:     1101  (1,2,1)
  22:    10110  (2,1,2)
  25:    11001  (1,3,1)
  45:   101101  (2,1,2,1)
  46:   101110  (2,1,1,2)
  49:   110001  (1,4,1)
  53:   110101  (1,2,2,1)
  54:   110110  (1,2,1,2)
  59:   111011  (1,1,2,1,1)
  76:  1001100  (3,1,3)
  77:  1001101  (3,1,2,1)
  82:  1010010  (2,3,2)
  89:  1011001  (2,1,3,1)
  91:  1011011  (2,1,2,1,1)
  93:  1011101  (2,1,1,2,1)
  94:  1011110  (2,1,1,1,2)
		

Crossrefs

The version for Heinz numbers of partitions is A130092, complement A130091.
Normal multisets with a permutation of this type appear to be A283353.
Partitions w/o permutations of this type are A351204, complement A351203.
The version using binary expansions is A351205, complement A175413.
The complement is A351290, counted by A351013.
A005811 counts runs in binary expansion, distinct A297770.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has all distinct run-lengths.
A085207 represents concatenation of standard compositions, reverse A085208.
A333489 ranks anti-runs, complement A348612, counted by A003242.
A345167 ranks alternating compositions, counted by A025047.
Counting words with all distinct runs:
- 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.
Selected statistics of standard compositions (A066099, reverse A228351):
- Length is A000120.
- Sum is A070939.
- Runs are counted by A124767, distinct A351014.
- 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;
    Select[Range[0,100],!UnsameQ@@Split[stc[#]]&]

A351201 Numbers whose multiset of prime factors has a permutation without all distinct runs.

Original entry on oeis.org

12, 18, 20, 28, 36, 44, 45, 48, 50, 52, 60, 63, 68, 72, 75, 76, 80, 84, 90, 92, 98, 99, 100, 108, 112, 116, 117, 120, 124, 126, 132, 140, 144, 147, 148, 150, 153, 156, 162, 164, 168, 171, 172, 175, 176, 180, 188, 192, 196, 198, 200, 204, 207, 208, 212, 216
Offset: 1

Views

Author

Gus Wiseman, Feb 12 2022

Keywords

Examples

			The prime factors of 80 are {2,2,2,2,5} and the permutation (2,2,5,2,2) has runs (2,2), (5), and (2,2), which are not all distinct, so 80 is in the sequence. On the other hand, 24 has prime factors {2,2,2,3}, and all four permutations (3,2,2,2), (2,3,2,2), (2,2,3,2), (2,2,2,3) have distinct runs, so 24 is not in the sequence.
The terms and their prime indices begin:
     12: (2,1,1)         76: (8,1,1)        132: (5,2,1,1)
     18: (2,2,1)         80: (3,1,1,1,1)    140: (4,3,1,1)
     20: (3,1,1)         84: (4,2,1,1)      144: (2,2,1,1,1,1)
     28: (4,1,1)         90: (3,2,2,1)      147: (4,4,2)
     36: (2,2,1,1)       92: (9,1,1)        148: (12,1,1)
     44: (5,1,1)         98: (4,4,1)        150: (3,3,2,1)
     45: (3,2,2)         99: (5,2,2)        153: (7,2,2)
     48: (2,1,1,1,1)    100: (3,3,1,1)      156: (6,2,1,1)
     50: (3,3,1)        108: (2,2,2,1,1)    162: (2,2,2,2,1)
     52: (6,1,1)        112: (4,1,1,1,1)    164: (13,1,1)
     60: (3,2,1,1)      116: (10,1,1)       168: (4,2,1,1,1)
     63: (4,2,2)        117: (6,2,2)        171: (8,2,2)
     68: (7,1,1)        120: (3,2,1,1,1)    172: (14,1,1)
     72: (2,2,1,1,1)    124: (11,1,1)       175: (4,3,3)
     75: (3,3,2)        126: (4,2,2,1)      176: (5,1,1,1,1)
		

Crossrefs

The version for run-lengths instead of runs is A024619.
These permutations are counted by A351202.
These rank the partitions counted by A351203, complement A351204.
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A056239 adds up prime indices, row sums of A112798.
A283353 counts normal multisets with a permutation w/o all distinct runs.
A297770 counts distinct runs in binary expansion.
A333489 ranks anti-runs, complement A348612.
A351014 counts distinct runs in standard compositions, firsts A351015.
A351291 ranks compositions without 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.

Programs

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

A350952 The smallest number whose binary expansion has exactly n distinct runs.

Original entry on oeis.org

0, 1, 2, 11, 38, 311, 2254, 36079, 549790, 17593311, 549687102, 35179974591, 2225029922430, 284803830071167, 36240869367020798, 9277662557957324543, 2368116566113212692990, 1212475681849964898811391, 619877748107024946567312382, 634754814061593545284927880191
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2022

Keywords

Comments

Positions of first appearances in A297770 (with offset 0).
The binary expansion of terms for n > 0 starts with 1, then floor(n/2) 0's, then alternates runs of increasing numbers of 1's, and decreasing numbers of 0's; see Python code. Thus, for n even, terms have n*(n/2+1)/2 binary digits, and for n odd, ((n+1) + (n-1)*((n-1)/2+1))/2 binary digits. - Michael S. Branicky, Feb 14 2022

Examples

			The terms and their binary expansions begin:
       0:                   ()
       1:                    1
       2:                   10
      11:                 1011
      38:               100110
     311:            100110111
    2254:         100011001110
   36079:     1000110011101111
  549790: 10000110001110011110
For example, 311 has binary expansion 100110111 with 5 distinct runs: 1, 00, 11, 0, 111.
		

Crossrefs

Runs in binary expansion are counted by A005811, distinct A297770.
The version for run-lengths instead of runs is A165933, for A165413.
Subset of A175413 (binary expansion has distinct runs), for lengths A044813.
The version for standard compositions is A351015.
A000120 counts binary weight.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
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, ranked by A351290.
- 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

  • Mathematica
    q=Table[Length[Union[Split[If[n==0,{},IntegerDigits[n,2]]]]],{n,0,1000}];Table[Position[q,i][[1,1]]-1,{i,Union[q]}]
  • PARI
    a(n)={my(t=0); for(k=1, (n+1)\2, t=((t<Andrew Howroyd, Feb 15 2022
  • Python
    def a(n): # returns term by construction
        if n == 0: return 0
        q, r = divmod(n, 2)
        if r == 0:
            s = "".join("1"*i + "0"*(q-i+1) for i in range(1, q+1))
            assert len(s) == n*(n//2+1)//2
        else:
            s = "1" + "".join("0"*(q-i+2) + "1"*i for i in range(2, q+2))
            assert len(s) == ((n+1) + (n-1)*((n-1)//2+1))//2
        return int(s, 2)
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 14 2022
    

Extensions

a(9)-a(19) from Michael S. Branicky, Feb 14 2022

A351010 Numbers k such that the k-th composition in standard order is a concatenation of twins (x,x).

Original entry on oeis.org

0, 3, 10, 15, 36, 43, 58, 63, 136, 147, 170, 175, 228, 235, 250, 255, 528, 547, 586, 591, 676, 683, 698, 703, 904, 915, 938, 943, 996, 1003, 1018, 1023, 2080, 2115, 2186, 2191, 2340, 2347, 2362, 2367, 2696, 2707, 2730, 2735, 2788, 2795, 2810, 2815, 3600, 3619
Offset: 1

Views

Author

Gus Wiseman, Feb 01 2022

Keywords

Comments

The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their binary expansions and the corresponding compositions begin:
    0:         0  ()
    3:        11  (1,1)
   10:      1010  (2,2)
   15:      1111  (1,1,1,1)
   36:    100100  (3,3)
   43:    101011  (2,2,1,1)
   58:    111010  (1,1,2,2)
   63:    111111  (1,1,1,1,1,1)
  136:  10001000  (4,4)
  147:  10010011  (3,3,1,1)
  170:  10101010  (2,2,2,2)
  175:  10101111  (2,2,1,1,1,1)
  228:  11100100  (1,1,3,3)
  235:  11101011  (1,1,2,2,1,1)
  250:  11111010  (1,1,1,1,2,2)
  255:  11111111  (1,1,1,1,1,1,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
The Heinz numbers of these compositions are given by A000290.
All terms are evil numbers A001969.
Partitions of this type are counted by A035363, any length A351004.
These compositions are counted by A077957(n-2), see also A016116.
The strict case (distinct twins) is A351009, counted by A032020 with 0's.
The anti-run case is A351011, counted by A003242 interspersed with 0's.
A011782 counts integer compositions.
A085207/A085208 represent concatenation of standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167/A350355/A350356 rank alternating compositions.
A351014 counts distinct runs in standard compositions.
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;
    Select[Range[0,100],And@@EvenQ/@Length/@Split[stc[#]]&]

A353855 Last term of the trajectory of the composition run-sum transformation (condensation) of the n-th composition in standard order.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 6, 4, 8, 9, 8, 8, 12, 13, 8, 8, 16, 17, 18, 18, 20, 17, 22, 20, 24, 25, 24, 24, 20, 17, 18, 16, 32, 33, 34, 34, 32, 37, 38, 32, 40, 41, 32, 34, 44, 45, 32, 40, 48, 49, 50, 50, 52, 49, 54, 52, 40, 41, 40, 32, 32, 37, 34, 32, 64, 65, 66, 66, 68
Offset: 0

Views

Author

Gus Wiseman, Jun 01 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). The run-sum trajectory is obtained by repeatedly taking the run-sum transformation (A353847) until the rank of an anti-run is reached. For example, the trajectory 11 -> 10 -> 8, corresponding to (2,1,1) -> (2,2) -> (4), has last term a(11) = 8.
The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The trajectory 139 -> 138 -> 136 -> 128 ends with a(139) = 128.
		

Crossrefs

The version for partitions is A353842.
This trajectory has length A353854, firsts A072639, partitions A353841.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A325268 counts partitions by omicron, rank statistic A304465.
A333627 ranks the run-lengths of standard compositions.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353840-A353846 pertain to a partition's run-sum trajectory.
A353847 represents a composition's run-sums, partitions A353832.
A353853-A353859 pertain to a composition's run-sum trajectory.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[2^Accumulate[Reverse[FixedPoint[Total/@Split[#]&,stc[n]]]]/2],{n,0,100}]

A354912 Numbers k such that the k-th composition in standard order is the sequence of run-sums of some other composition.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 16, 17, 18, 20, 21, 22, 24, 25, 26, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 48, 49, 50, 52, 54, 64, 65, 66, 68, 69, 70, 72, 73, 74, 76, 77, 80, 81, 82, 84, 85, 86, 88, 89, 90, 96, 97, 98, 100, 101, 102, 104, 105, 106, 108
Offset: 0

Views

Author

Gus Wiseman, Jun 22 2022

Keywords

Comments

The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).

Examples

			The terms and their corresponding compositions begin:
   0: ()
   1: (1)
   2: (2)
   4: (3)
   5: (2,1)
   6: (1,2)
   8: (4)
   9: (3,1)
  10: (2,2)
  12: (1,3)
  13: (1,2,1)
  16: (5)
  17: (4,1)
  18: (3,2)
  20: (2,3)
  21: (2,2,1)
  22: (2,1,2)
For example, the 21st composition in standard order (2,2,1) equals the run-sums of (1,1,2,1), so 21 is in the sequence. On the other hand, no composition has run-sums equal to the 29th composition (1,1,2,1), so 29 is not in the sequence.
		

Crossrefs

The standard compositions used here are A066099, run-sums A353847/A353932.
These are the positions of nonzero terms in A354578.
The complement is A354904, counted by A354909.
These compositions are counted by A354910.
A003242 counts anti-run compositions, ranked by A333489.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A351014 counts distinct runs of standard compositions, firsts A351015.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MemberQ[Total/@Split[#]&/@ Join@@Permutations/@IntegerPartitions[Total[stc[#]]],stc[#]]&]

A354904 Numbers k such that the k-th composition in standard order is not the sequence of run-sums of any other composition.

Original entry on oeis.org

3, 7, 11, 14, 15, 19, 23, 27, 28, 29, 30, 31, 35, 39, 43, 46, 47, 51, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 71, 75, 78, 79, 83, 87, 91, 92, 93, 94, 95, 99, 103, 107, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2022

Keywords

Comments

The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).
The first term k such that the k-th composition in standard order does not have ones sandwiching the same prime number an even number of times is k = 3221, corresponding to the composition (1,3,3,2,2,1).

Examples

			The terms and their corresponding compositions begin:
   3: (1,1)
   7: (1,1,1)
  11: (2,1,1)
  14: (1,1,2)
  15: (1,1,1,1)
  19: (3,1,1)
  23: (2,1,1,1)
  27: (1,2,1,1)
  28: (1,1,3)
  29: (1,1,2,1)
  30: (1,1,1,2)
  31: (1,1,1,1,1)
		

Crossrefs

The standard compositions used here are A066099, run-sums A353847/A353932.
These are the positions of zeros in A354578, firsts A354905.
These compositions are counted by A354909.
The complement is A354912, counted by A354910.
A003242 counts anti-run compositions, ranked by A333489.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A351014 counts distinct runs of standard compositions, firsts A351015.
A353852 ranks compositions with distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],FreeQ[Total/@Split[#]&/@ Join@@Permutations/@IntegerPartitions[Total[stc[#]]],stc[#]]&]

A354907 Number of distinct sums of contiguous constant subsequences (partial runs) of the n-th composition in standard order.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 4, 1, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 5, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 2, 2, 4, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 4, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 3
Offset: 0

Views

Author

Gus Wiseman, Jun 23 2022

Keywords

Comments

The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).

Examples

			Composition number 981 in standard order is (1,1,1,2,2,2,1), with partial runs (1), (2), (1,1), (2,2), (1,1,1), (2,2,2), with distinct sums {1,2,3,4,6}, so a(981) = 5.
		

Crossrefs

Positions of 1's are A000051.
Positions of first appearances are A000079.
The standard compositions used here are A066099, run-sums A353847/A353932.
If we allow any subsequence we get A334968.
The case of full runs is A353849, firsts A246534.
A version for nonempty partitions is A353861, full A353835.
Counting all distinct runs (instead of their distinct sums) gives A354582.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A330036 counts distinct partial runs of prime indices, full A005811.
A351014 counts distinct runs of standard compositions, firsts A351015.
A353853-A353859 pertain to composition run-sum trajectory.
A353860 counts collapsible compositions.
A354584 lists run-sums of prime indices, rows ranked by A353832.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pre[y_]:=NestWhileList[Most,y,Length[#]>1&];
    Table[Length[Union[Total/@Join@@pre/@Split[stc[n]]]],{n,0,100}]

A165933 Least integer, k, whose value is n in A165413.

Original entry on oeis.org

1, 4, 35, 536, 16775, 1060976, 135007759, 34460631520, 17617985239071, 18027600169142208, 36907002795598798911, 151143401509104346210176, 1238053384151947477501575295, 20283338091738780737237428502272, 664629209970464486086782992577855743
Offset: 1

Views

Author

Robert G. Wilson v, Sep 30 2009

Keywords

Comments

An alternative name: The smallest number whose binary expansion has exactly n distinct run-lengths. - Gus Wiseman, Feb 21 2022
Term a(n) has one 1, followed by n 0's, then two 1's, (n-1) 0's, ..., up to n runs; see Python program. - Michael S. Branicky, Feb 22 2022

Examples

			a(1) in binary is 1, a(2) in binary is 100, a(3) in binary is 100011, a(4) in binary is 1000011000, etc.
From _Gus Wiseman_, Feb 21 2022: (Start)
The terms and their binary expansions begin:
  n              a(n)
  1:               1 =                                             1
  2:               4 =                                           100
  3:              35 =                                        100011
  4:             536 =                                    1000011000
  5:           16775 =                               100000110000111
  6:         1060976 =                         100000011000001110000
  7:       135007759 =                  1000000011000000111000001111
  8:     34460631520 =          100000000110000000111000000111100000
  9:  17617985239071 = 100000000011000000001110000000111100000011111
(End)
		

Crossrefs

A subset of A044813 (distinct run-lengths) and of A175413 (distinct runs).
These are the positions of first appearances in A165413.
The version for runs instead of run-lengths is A350952, firsts of A297770.
A000120 counts binary weight.
A005811 counts runs in binary expansion.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct run-lengths:
- A032020 = binary expansions, for runs A351018.
- A329739 = compositions, for runs A351013.
- A351017 = binary words, for runs A351016.
- A351292 = patterns, for runs A351200.

Programs

  • Mathematica
    g[n_] := Table[ {Table[1, {i}], Table[0, {n - i + 1}]}, {i, Floor[(n + If[ OddQ@n, 1, 0])/2]}]; f[n_] := FromDigits[ If[ OddQ@n, Flatten@ Most@ Flatten[ g@n, 1], Flatten@ g@n], 2]; Array[f, 14]
    s=Table[Length[Union[Length/@Split[IntegerDigits[n,2]]]],{n,0,1000}]; Table[Position[s,k][[1,1]]-1,{k,Union[s]}] (* Gus Wiseman, Feb 21 2022 *)
  • Python
    def a(n): # returns term by construction
        if n == 1: return 1
        q, r = divmod(n+1, 2)
        s = "".join("1"*i + "0"*(n+1-i) for i in range(1, q+1))
        if r == 0: s = s.rstrip("0")
        return int(s, 2)
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Feb 22 2022

Extensions

a(15) and beyond from Michael S. Branicky, Feb 22 2022
Previous Showing 11-20 of 28 results. Next