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 51-54 of 54 results.

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

A059882 As upper right triangle: ascending wiggly sums to n where first term is k (sums in which terms alternately increase and decrease; zigzag partitions).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 2, 1, 0, 0, 1, 4, 2, 0, 0, 0, 1, 6, 3, 1, 0, 0, 0, 1, 9, 4, 2, 0, 0, 0, 0, 1, 14, 7, 3, 1, 0, 0, 0, 0, 1, 23, 10, 5, 2, 0, 0, 0, 0, 0, 1, 35, 17, 7, 3, 1, 0, 0, 0, 0, 0, 1, 55, 26, 11, 5, 2, 0, 0, 0, 0, 0, 0, 1, 87, 41, 17, 8, 3, 1, 0, 0, 0, 0, 0, 0, 1, 136, 64, 28, 11, 5, 2
Offset: 1

Views

Author

Henry Bottomley, Feb 05 2001

Keywords

Examples

			Rows start (1,0,1,2,2,...), (1,0,0,1,...), (1,0,0,...) etc. T(10,4)=2 since 10 can be written as 4+6 or 4+5+1.
		

Crossrefs

Column sums are A025048. Cf. A025047, A025049, A059881, A059883.

Formula

If n>k>0 T(n, k)=sum_j[S(n-k, j)] over j>k and if n>0 T(n, n)=1; where S(n, k)=A059883(n, k) and if n>k>0, S(n, k)=sum_j[T(n-k, j)] over k>j (note reversal) and if n>0 S(n, n)=1.

A059881 As upper right triangle: wiggly sums to n where first term is k (sums in which terms alternately increase and decrease or vice versa; zigzag and zagzig partitions).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 0, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 1, 6, 5, 3, 2, 1, 1, 1, 9, 8, 5, 2, 2, 1, 1, 1, 14, 13, 9, 4, 3, 2, 1, 1, 1, 23, 19, 14, 8, 3, 3, 2, 1, 1, 1, 35, 31, 20, 13, 7, 4, 3, 2, 1, 1, 1, 55, 49, 32, 20, 12, 6, 4, 3, 2, 1, 1, 1, 87, 76, 50, 32, 18, 11, 7, 4, 3, 2, 1, 1, 1, 136
Offset: 1

Views

Author

Henry Bottomley, Feb 05 2001

Keywords

Examples

			Rows start (1,0,1,2,2,...), (1,1,0,2,...), (1,1,1,...) etc. T(10,4)=8 since 10 can be written as 4+6, 4+5+1, 4+2+4, 4+2+3+1, 4+1+5, 4+1+4+1, 4+1+3+2, or 4+1+2+1+2.
		

Crossrefs

Column sums are A025047. Cf. A025048, A025049, A059882, A059883.

Formula

T(n, k) =A059882(n, k)+A059883(n, k) if n>k>0; T(n, n)=1 if n>0.

A350250 Numbers k such that the k-th composition in standard order is a non-alternating permutation of an initial interval of positive integers.

Original entry on oeis.org

37, 52, 549, 550, 556, 564, 581, 600, 616, 649, 657, 712, 786, 802, 836, 840, 16933, 16934, 16937, 16940, 16946, 16948, 16965, 16977, 16984, 16994, 17000, 17033, 17041, 17092, 17096, 17170, 17186, 17220, 17224, 17445, 17446, 17452, 17460, 17541, 17569, 17584
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2022

Keywords

Comments

A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either.
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 permutations begin:
     37: (3,2,1)
     52: (1,2,3)
    549: (4,3,2,1)
    550: (4,3,1,2)
    556: (4,2,1,3)
    564: (4,1,2,3)
    581: (3,4,2,1)
    600: (3,2,1,4)
    616: (3,1,2,4)
    649: (2,4,3,1)
    657: (2,3,4,1)
    712: (2,1,3,4)
    786: (1,4,3,2)
    802: (1,3,4,2)
    836: (1,2,4,3)
    840: (1,2,3,4)
  16933: (5,4,3,2,1)
		

Crossrefs

This is the non-alternating case of A333218.
This is the restriction of A345168 to permutations, complement A345167.
These partitions are counted by A348615, complement A001250.
A003242 counts anti-run compositions, patterns A005649.
A025047 counts alternating compositions, directed A025048/A025049.
A345192 counts non-alternating compositions.
A345194 counts alternating patterns, complement A350252.
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:
- Weakly decreasing compositions (partitions) are A114994, strict A333256.
- Weakly increasing compositions (multisets) are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Anti-run compositions are A333489, complement A348612.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]==Length[y] &&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Select[Range[0,1000],(Sort[stc[#]]==Range[Length[stc[#]]]&&!wigQ[stc[#]])&]
Previous Showing 51-54 of 54 results.