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 21-30 of 32 results. Next

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[#]]&]

A353427 Numbers k such that the k-th composition in standard order has all run-lengths > 1.

Original entry on oeis.org

0, 3, 7, 10, 15, 31, 36, 42, 43, 58, 63, 87, 122, 127, 136, 147, 170, 171, 175, 228, 234, 235, 250, 255, 292, 295, 343, 351, 471, 484, 490, 491, 506, 511, 528, 547, 586, 591, 676, 682, 683, 687, 698, 703, 904, 915, 938, 939, 943, 983, 996, 1002, 1003, 1018
Offset: 1

Views

Author

Gus Wiseman, May 16 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 and corresponding compositions begin:
     0: ()
     3: (1,1)
     7: (1,1,1)
    10: (2,2)
    15: (1,1,1,1)
    31: (1,1,1,1,1)
    36: (3,3)
    42: (2,2,2)
    43: (2,2,1,1)
    58: (1,1,2,2)
    63: (1,1,1,1,1,1)
    87: (2,2,1,1,1)
   122: (1,1,1,2,2)
   127: (1,1,1,1,1,1,1)
		

Crossrefs

The version for partitions is A001694, counted by A007690.
The version for parts instead of lengths is A022340, counted by A212804.
These compositions are counted by A114901.
A subset of A348612 (counted by A261983).
The case of all run-lengths = 2 is A351011.
The case of all run-lengths > 2 is counted by A353400.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order, reverse A228351.
Statistics of standard compositions:
- Length is A000120, sum A070939.
- Runs are counted by A124767.
- Runs-resistance is A333628.
- Run-lengths are A333769.

Programs

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

A350355 Numbers k such that the k-th composition in standard order is up/down.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 13, 16, 20, 24, 25, 32, 40, 41, 48, 49, 50, 54, 64, 72, 80, 81, 82, 96, 97, 98, 102, 108, 109, 128, 144, 145, 160, 161, 162, 166, 192, 193, 194, 196, 198, 204, 205, 216, 217, 256, 272, 288, 289, 290, 320, 321, 322, 324, 326, 332, 333, 384
Offset: 1

Views

Author

Gus Wiseman, Jan 15 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.
A composition is up/down if it is alternately strictly increasing and strictly decreasing, starting with an increase. For example, the partition (3,2,2,2,1) has no up/down permutations, even though it does have the anti-run permutation (2,3,2,1,2).

Examples

			The terms together with the corresponding compositions begin:
   0: ()
   1: (1)
   2: (2)
   4: (3)
   6: (1,2)
   8: (4)
  12: (1,3)
  13: (1,2,1)
  16: (5)
  20: (2,3)
  24: (1,4)
  25: (1,3,1)
  32: (6)
  40: (2,4)
  41: (2,3,1)
  48: (1,5)
  49: (1,4,1)
  50: (1,3,2)
  54: (1,2,1,2)
		

Crossrefs

The case of permutations is counted by A000111.
These compositions are counted by A025048, down/up A025049.
The strict case is counted by A129838, undirected A349054.
The weak version is counted by A129852, down/up A129853.
The version for anti-runs is A333489, a superset, complement A348612.
This is the up/down case of A345167, counted by A025047.
Counting patterns of this type gives A350354.
The down/up version is A350356.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A011782 counts compositions, unordered A000041.
A345192 counts non-alternating compositions, ranked by A345168.
A349052 counts weakly alternating compositions, complement A349053.
A349057 ranks non-weakly alternating compositions.
Statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Patterns are A333217.

Programs

  • Mathematica
    updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]
    				

Formula

A350356 Numbers k such that the k-th composition in standard order is down/up.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 16, 17, 18, 22, 32, 33, 34, 38, 44, 45, 64, 65, 66, 68, 70, 76, 77, 88, 89, 128, 129, 130, 132, 134, 140, 141, 148, 152, 153, 176, 177, 178, 182, 256, 257, 258, 260, 262, 264, 268, 269, 276, 280, 281, 296, 297, 304, 305, 306, 310, 352, 353
Offset: 1

Views

Author

Gus Wiseman, Jan 15 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.
A composition is down/up if it is alternately strictly increasing and strictly decreasing, starting with a decrease. For example, the partition (3,2,2,2,1) has no down/up permutations, even though it does have the anti-run permutation (2,1,2,3,2).

Examples

			The terms together with the corresponding compositions begin:
   0: ()
   1: (1)
   2: (2)
   4: (3)
   5: (2,1)
   8: (4)
   9: (3,1)
  16: (5)
  17: (4,1)
  18: (3,2)
  22: (2,1,2)
  32: (6)
  33: (5,1)
  34: (4,2)
  38: (3,1,2)
  44: (2,1,3)
  45: (2,1,2,1)
		

Crossrefs

The case of permutations is counted by A000111.
These compositions are counted by A025049, up/down A025048.
The strict case is counted by A129838, undirected A349054.
The weak version is counted by A129853, up/down A129852.
The version for anti-runs is A333489, a superset, complement A348612.
This is the down/up case of A345167, counted by A025047.
Counting patterns of this type gives A350354.
The up/down version is A350355.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A011782 counts compositions, unordered A000041.
A345192 counts non-alternating compositions, ranked by A345168.
A349052 counts weakly alternating compositions, complement A349053.
A349057 ranks non-weakly alternating compositions.
Statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Patterns are A333217.

Programs

  • Mathematica
    doupQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]y[[m+1]]],{m,1,Length[y]-1}];
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],doupQ[stc[#]]&]

Formula

A349155 Numbers k such that the k-th composition in standard order has sum equal to negative twice its reverse-alternating sum.

Original entry on oeis.org

0, 9, 130, 135, 141, 153, 177, 193, 225, 2052, 2059, 2062, 2069, 2074, 2079, 2089, 2098, 2103, 2109, 2129, 2146, 2151, 2157, 2169, 2209, 2242, 2247, 2253, 2265, 2289, 2369, 2434, 2439, 2445, 2457, 2481, 2529, 2561, 2689, 2818, 2823, 2829, 2841, 2865, 2913
Offset: 1

Views

Author

Gus Wiseman, Nov 22 2021

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.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.

Examples

			The terms and corresponding compositions begin:
     0: ()
     9: (3,1)
   130: (6,2)
   135: (5,1,1,1)
   141: (4,1,2,1)
   153: (3,1,3,1)
   177: (2,1,4,1)
   193: (1,6,1)
   225: (1,1,5,1)
  2052: (9,3)
  2059: (8,2,1,1)
  2062: (8,1,1,2)
  2069: (7,2,2,1)
  2074: (7,1,2,2)
  2079: (7,1,1,1,1,1)
  2089: (6,2,3,1)
  2098: (6,1,3,2)
  2103: (6,1,2,1,1,1)
		

Crossrefs

These compositions are counted by A224274 up to 0's.
An unordered version is A348617, counted by A001523 up to 0's.
The positive version is A349153, unreversed A348614.
The unreversed version is A349154.
Positive unordered unreversed: A349159, counted by A000712 up to 0's.
A positive unordered version is A349160, counted by A006330 up to 0's.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A025047 counts alternating or wiggly compositions, complement A345192.
A034871, A097805, and A345197 count compositions by alternating sum.
A103919 counts partitions by alternating sum, reverse A344612.
A116406 counts compositions with alternating sum >=0, ranked by A345913.
A138364 counts compositions with alternating sum 0, ranked by A344619.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
- Number of parts is given by A000120, distinct A334028.
- Sum and product of parts are given by A070939 and A124758.
- Maximum and minimum parts are given by A333766 and A333768.
- Heinz number is given by A333219.
Classes of standard compositions:
- Partitions and strict partitions are ranked by A114994 and A333256.
- Multisets and sets are ranked by A225620 and A333255.
- Strict and constant compositions are ranked by A233564 and A272919.
- Carlitz compositions are ranked by A333489, complement A348612.
- Alternating compositions are ranked by A345167, complement A345168.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[ Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,1000],Total[stc[#]]==-2*sats[stc[#]]&]

A351011 Numbers k such that the k-th composition in standard order has even length and alternately equal and unequal parts, i.e., all run-lengths equal to 2.

Original entry on oeis.org

0, 3, 10, 36, 43, 58, 136, 147, 228, 235, 528, 547, 586, 676, 698, 904, 915, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 2795, 3600, 3619, 3658, 3748, 3770, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 9444, 9451, 10768, 10787, 10826, 11144, 11155, 14368
Offset: 1

Views

Author

Gus Wiseman, Feb 03 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 standard compositions begin:
    0:           0  ()
    3:          11  (1,1)
   10:        1010  (2,2)
   36:      100100  (3,3)
   43:      101011  (2,2,1,1)
   58:      111010  (1,1,2,2)
  136:    10001000  (4,4)
  147:    10010011  (3,3,1,1)
  228:    11100100  (1,1,3,3)
  235:    11101011  (1,1,2,2,1,1)
  528:  1000010000  (5,5)
  547:  1000100011  (4,4,1,1)
  586:  1001001010  (3,3,2,2)
  676:  1010100100  (2,2,3,3)
  698:  1010111010  (2,2,1,1,2,2)
  904:  1110001000  (1,1,4,4)
  915:  1110010011  (1,1,3,3,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
All terms are evil numbers A001969.
These compositions are counted by A003242 interspersed with 0's.
Partitions of this type are counted by A035457, any length A351005.
The Heinz numbers of these compositions are A062503.
Taking singles instead of twins gives A333489, complement A348612.
This is the anti-run case of A351010.
The strict case (distinct twins) is A351009, counted by A077957(n-2).
A011782 counts compositions.
A085207/A085208 represent concatenation of standard compositions.
A345167 ranks alternating compositions, counted by A025047.
A350355 ranks up/down compositions, counted by A025048.
A350356 ranks down/up compositions, counted by A025049.
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,1000],And@@(#==2&)/@Length/@Split[stc[#]]&]

A348616 Number of ordered factorizations of n with adjacent equal factors.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 0, 0, 6, 1, 0, 1, 2, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 6, 0, 0, 0, 2, 2, 0, 0, 19, 1, 2, 0, 2, 0, 6, 0, 6, 0, 0, 0, 8, 0, 0, 2, 18, 0, 0, 0, 2, 0, 0, 0, 31, 0, 0, 2, 2, 0, 0, 0, 19, 4, 0, 0, 8, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2021

Keywords

Comments

First differs from A348613 at a(24) = 6, A348613(24) = 8.
An ordered factorization of n is a finite sequence of positive integers > 1 with product n.

Examples

			The a(n) ordered factorizations with at least one pair of adjacent equal factors for n = 12, 24, 36, 60:
   2*2*3    2*2*6      6*6        15*2*2
   3*2*2    6*2*2      2*2*9      2*2*15
            2*2*2*3    3*3*4      2*2*3*5
            2*2*3*2    4*3*3      2*2*5*3
            2*3*2*2    9*2*2      3*2*2*5
            3*2*2*2    2*2*3*3    3*5*2*2
                       2*3*3*2    5*2*2*3
                       3*2*2*3    5*3*2*2
                       3*3*2*2
See also examples in A348611.
		

Crossrefs

Positions of 0's are A005117.
Positions of 4's appear to be A030514.
Positions of 2's appear to be A054753.
Positions of 1's appear to be A168363.
The additive version (compositions) is A261983, complement A003242.
Factorizations with a permutation of this type are counted by A333487.
Factorizations without a permutation of this type are counted by A335434.
The complement is counted by A348611.
As compositions these are ranked by A348612, complement A333489.
Dominated by A348613 (non-alternating ordered factorizations).
A001055 counts factorizations, strict A045778, ordered A074206.
A335452 counts anti-run permutations of prime indices, complement A336107.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[Prepend[#,d]&/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    antirunQ[y_]:=Length[y]==Length[Split[y]]
    Table[Length[Select[ordfacs[n],!antirunQ[#]&]],{n,100}]

Formula

a(n) = A074206(n) - A348611(n).

A349154 Numbers k such that the k-th composition in standard order has sum equal to negative twice its alternating sum.

Original entry on oeis.org

0, 12, 160, 193, 195, 198, 204, 216, 240, 2304, 2561, 2563, 2566, 2572, 2584, 2608, 2656, 2752, 2944, 3074, 3077, 3079, 3082, 3085, 3087, 3092, 3097, 3099, 3102, 3112, 3121, 3123, 3126, 3132, 3152, 3169, 3171, 3174, 3180, 3192, 3232, 3265, 3267, 3270, 3276
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2021

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.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The terms and corresponding compositions begin:
       0: ()
      12: (1,3)
     160: (2,6)
     193: (1,6,1)
     195: (1,5,1,1)
     198: (1,4,1,2)
     204: (1,3,1,3)
     216: (1,2,1,4)
     240: (1,1,1,5)
    2304: (3,9)
    2561: (2,9,1)
    2563: (2,8,1,1)
    2566: (2,7,1,2)
    2572: (2,6,1,3)
    2584: (2,5,1,4)
		

Crossrefs

These compositions are counted by A224274 up to 0's.
Except for 0, a subset of A345919.
The positive version is A348614, reverse A349153.
An unordered version is A348617, counted by A001523.
The reverse version is A349155.
A positive unordered version is A349159, counted by A000712 up to 0's.
A000346 = even-length compositions with alt sum != 0, complement A001700.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A025047 counts alternating or wiggly compositions, complement A345192.
A034871, A097805, and A345197 count compositions by alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A116406 counts compositions with alternating sum >=0, ranked by A345913.
A138364 counts compositions with alternating sum 0, ranked by A344619.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
- Number of parts is given by A000120, distinct A334028.
- Sum and product of parts are given by A070939 and A124758.
- Maximum and minimum parts are given by A333766 and A333768.
Classes of standard compositions:
- Partitions and strict partitions are ranked by A114994 and A333256.
- Multisets and sets are ranked by A225620 and A333255.
- Strict and constant compositions are ranked by A233564 and A272919.
- Carlitz compositions are ranked by A333489, complement A348612.
- Necklaces are ranked by A065609, dual A333764, reversed A333943.
- Alternating compositions are ranked by A345167, complement A345168.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,1000],Total[stc[#]]==-2*ats[stc[#]]&]

A351205 Numbers whose binary expansion does not have all distinct runs.

Original entry on oeis.org

5, 9, 10, 17, 18, 20, 21, 22, 26, 27, 33, 34, 36, 37, 40, 41, 42, 43, 45, 46, 51, 53, 54, 58, 65, 66, 68, 69, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94, 99, 100, 101, 102, 105, 106, 107, 108, 109, 110, 117, 118, 119, 122, 129
Offset: 1

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Examples

			The terms together with their binary expansions begin:
      5:     101     41:  101001     74: 1001010
      9:    1001     42:  101010     75: 1001011
     10:    1010     43:  101011     76: 1001100
     17:   10001     45:  101101     77: 1001101
     18:   10010     46:  101110     80: 1010000
     20:   10100     51:  110011     81: 1010001
     21:   10101     53:  110101     82: 1010010
     22:   10110     54:  110110     83: 1010011
     26:   11010     58:  111010     84: 1010100
     27:   11011     65: 1000001     85: 1010101
     33:  100001     66: 1000010     86: 1010110
     34:  100010     68: 1000100     87: 1010111
     36:  100100     69: 1000101     89: 1011001
     37:  100101     72: 1001000     90: 1011010
     40:  101000     73: 1001001     91: 1011011
For example, 77 has binary expansion 1001101, with runs 1, 00, 11, 0, 1, which are not all distinct, so 77 is in the sequence.
		

Crossrefs

Runs in binary expansion are counted by A005811, distinct A297770.
The complement is A175413, for run-lengths A044813.
The version for standard compositions is A351291, complement A351290.
A000120 counts binary weight.
A011782 counts integer compositions.
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
    Select[Range[0,100],!UnsameQ@@Split[IntegerDigits[#,2]]&]
  • 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(130) if ok(k)]) # Michael S. Branicky, Feb 09 2022

A349153 Numbers k such that the k-th composition in standard order has sum equal to twice its reverse-alternating sum.

Original entry on oeis.org

0, 11, 12, 14, 133, 138, 143, 148, 155, 158, 160, 168, 179, 182, 188, 195, 198, 204, 208, 216, 227, 230, 236, 240, 248, 2057, 2066, 2071, 2077, 2084, 2091, 2094, 2101, 2106, 2111, 2120, 2131, 2134, 2140, 2149, 2154, 2159, 2164, 2171, 2174, 2192, 2211, 2214
Offset: 1

Views

Author

Gus Wiseman, Nov 17 2021

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.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.

Examples

			The terms and corresponding compositions begin:
    0: ()
   11: (2,1,1)
   12: (1,3)
   14: (1,1,2)
  133: (5,2,1)
  138: (4,2,2)
  143: (4,1,1,1,1)
  148: (3,2,3)
  155: (3,1,2,1,1)
  158: (3,1,1,1,2)
  160: (2,6)
  168: (2,2,4)
  179: (2,1,3,1,1)
  182: (2,1,2,1,2)
  188: (2,1,1,1,3)
		

Crossrefs

These compositions are counted by A262977 up to 0's.
Except for 0, a subset of A345917.
The unreversed version is A348614.
The unreversed negative version is A349154.
The negative version is A349155.
A non-reverse unordered version is A349159, counted by A000712 up to 0's.
An unordered version is A349160, counted by A006330 up to 0's.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A025047 counts alternating or wiggly compositions, complement A345192.
A034871, A097805, and A345197 count compositions by alternating sum.
A103919 counts partitions by alternating sum, reverse A344612.
A116406 counts compositions with alternating sum >=0, ranked by A345913.
A138364 counts compositions with alternating sum 0, ranked by A344619.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
- Number of parts is given by A000120, distinct A334028.
- Sum and product of parts are given by A070939 and A124758.
- Maximum and minimum parts are given by A333766 and A333768.
- Heinz number is given by A333219.
Classes of standard compositions:
- Partitions and strict partitions are ranked by A114994 and A333256.
- Multisets and sets are ranked by A225620 and A333255.
- Strict and constant compositions are ranked by A233564 and A272919.
- Carlitz compositions are ranked by A333489, complement A348612.
- Alternating compositions are ranked by A345167, complement A345168.

Programs

  • Mathematica
    stc[n_]:=Differences[ Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,1000],Total[stc[#]]==2*sats[stc[#]]&]
Previous Showing 21-30 of 32 results. Next