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

A335485 Numbers k such that the k-th composition in standard order (A066099) is not weakly decreasing.

Original entry on oeis.org

6, 12, 13, 14, 20, 22, 24, 25, 26, 27, 28, 29, 30, 38, 40, 41, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 70, 72, 76, 77, 78, 80, 81, 82, 83, 84, 86, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

Also compositions matching the pattern (1,2).
A composition of n is a finite sequence of positive integers summing to n. 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 sequence of terms together with the corresponding compositions begins:
   6: (1,2)
  12: (1,3)
  13: (1,2,1)
  14: (1,1,2)
  20: (2,3)
  22: (2,1,2)
  24: (1,4)
  25: (1,3,1)
  26: (1,2,2)
  27: (1,2,1,1)
  28: (1,1,3)
  29: (1,1,2,1)
  30: (1,1,1,2)
  38: (3,1,2)
  40: (2,4)
		

Crossrefs

The complement A114994 is the avoiding version.
The (2,1)-matching version is A335486.
Patterns matching this pattern are counted by A002051 (by length).
Permutations of prime indices matching this pattern are counted by A335447.
These compositions are counted by A056823 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,y_,_}/;x
    				

A375137 Numbers k such that the k-th composition in standard order (row k of A066099) matches the dashed pattern 1-32.

Original entry on oeis.org

50, 98, 101, 114, 178, 194, 196, 197, 202, 203, 210, 226, 229, 242, 306, 324, 354, 357, 370, 386, 388, 389, 393, 394, 395, 402, 404, 405, 406, 407, 418, 421, 434, 450, 452, 453, 458, 459, 466, 482, 485, 498, 562, 610, 613, 626, 644, 649, 690, 706, 708, 709
Offset: 1

Views

Author

Gus Wiseman, Aug 09 2024

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.
These are also numbers k such that the maximal weakly increasing runs in the k-th composition in standard order do not have weakly decreasing leaders, where the leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The reverse version (A375138) ranks compositions matching the dashed pattern 23-1.

Examples

			Composition 102 is (1,3,1,2), which matches 1-3-2 but not 1-32.
Composition 210 is (1,2,3,2), which matches 1-32 but not 132.
Composition 358 is (2,1,3,1,2), which matches 2-3-1 and 1-3-2 but not 23-1 or 1-32.
The terms together with corresponding compositions begin:
   50: (1,3,2)
   98: (1,4,2)
  101: (1,3,2,1)
  114: (1,1,3,2)
  178: (2,1,3,2)
  194: (1,5,2)
  196: (1,4,3)
  197: (1,4,2,1)
  202: (1,3,2,2)
  203: (1,3,2,1,1)
  210: (1,2,3,2)
  226: (1,1,4,2)
  229: (1,1,3,2,1)
  242: (1,1,1,3,2)
		

Crossrefs

The complement is too dense, but counted by A189076.
The non-dashed version is A335480, reverse A335482.
For leaders of identical runs we have A335485, reverse A335486.
For identical leaders we have A374633, counted by A374631.
Compositions of this type are counted by A374636.
For distinct leaders we have A374768, counted by A374632.
The reverse version is A375138, counted by A374636.
For leaders of strictly increasing runs we have A375139, counted by A375135.
Matching 1-21 also gives A375295, counted by A375140 (complement A188920).
A003242 counts anti-runs, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099, reverse A228351.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,z_,y_,_}/;x
    				

A002051 Steffensen's bracket function [n,2].

Original entry on oeis.org

0, 0, 1, 9, 67, 525, 4651, 47229, 545707, 7087005, 102247051, 1622631549, 28091565547, 526858344285, 10641342962251, 230283190961469, 5315654681948587, 130370767029070365, 3385534663256714251, 92801587319328148989, 2677687796244383678827, 81124824998504072833245, 2574844419803190382447051
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of ways to arrange the blocks of the partitions of {1,2,...,n} in an undirected cycle of length 3 or more, see A000629. - Geoffrey Critzer, Nov 23 2012
From Gus Wiseman, Jun 24 2020: (Start)
Also the number of (1,2)-matching length-n sequences covering an initial interval of positive integers. For example, the a(2) = 1 and a(3) = 9 sequences are:
(1,2) (1,1,2)
(1,2,1)
(1,2,2)
(1,2,3)
(1,3,2)
(2,1,2)
(2,1,3)
(2,3,1)
(3,1,2)
Missing from this list are:
(1,1) (1,1,1)
(2,1) (2,1,1)
(2,2,1)
(3,2,1)
(End)

Examples

			a(4) = 9. There are 6 partitions of {1,2,3,4} into exactly three blocks and one way to put them in an undirected cycle of length three. There is one partition of {1,2,3,4} into four blocks and 3 ways to make an undirected cycle of length four. 6 + 3 = 9. - _Geoffrey Critzer_, Nov 23 2012
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Steffensen, J. F. Interpolation. 2d ed. Chelsea Publishing Co., New York, N. Y., 1950. ix+248 pp. MR0036799 (12,164d)

Crossrefs

A diagonal of the triangular array in A241168.
(1,2)-avoiding patterns are counted by A011782.
(1,1)-matching patterns are counted by A019472.
(1,2)-matching permutations are counted by A033312.
(1,2)-matching compositions are counted by A056823.
(1,2)-matching permutations of prime indices are counted by A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns are counted by A000670 and ranked by A333217.
Patterns matched by compositions are counted by A335456.

Programs

  • Mathematica
    a[n_] := Sum[ k!*StirlingS2[n-1, k], {k, 0, n-1}] - 2^(n-2); Table[a[n], {n, 3, 17}] (* Jean-François Alcover, Nov 18 2011, after Manfred Goebel *)
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],!GreaterEqual@@#&]],{n,0,5}] (* Gus Wiseman, Jun 24 2020 *)
  • PARI
    a(n) = sum(s=2, n-1, stirling(n,s+1,2)*s!/2); \\ Michel Marcus, Jun 24 2020

Formula

[n,2] = Sum_{s=2..n-1} Stirling2(n,s+1)*s!/2 (cf. A241168).
a(1)=0; for n >= 2, a(n) = A000670(n-1) - 2^(n-2). - Manfred Goebel (mkgoebel(AT)essex.ac.uk), Feb 20 2000; formula adjusted by N. J. A. Sloane, Apr 22 2014. For example, a(5) = 67 = A000670(4)-2^3 = 75-8 = 67.
E.g.f.: (1 - exp(2*x) - 2*log(2 - exp(x)))/4 = B(A(x)) where A(x) = exp(x)-1 and B(x) = (log(1/(1-x))- x - x^2/2)/2. - Geoffrey Critzer, Nov 23 2012

Extensions

Entry revised by N. J. A. Sloane, Apr 22 2014

A375138 Numbers k such that the k-th composition in standard order (row k of A066099) matches the dashed pattern 23-1.

Original entry on oeis.org

41, 81, 83, 105, 145, 161, 163, 165, 166, 167, 169, 209, 211, 233, 289, 290, 291, 297, 321, 323, 325, 326, 327, 329, 331, 332, 333, 334, 335, 337, 339, 361, 401, 417, 419, 421, 422, 423, 425, 465, 467, 489, 545, 553, 577, 578, 579, 581, 582, 583, 593, 595, 617
Offset: 1

Views

Author

Gus Wiseman, Aug 09 2024

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.
These are also numbers k such that the maximal weakly increasing runs in the reverse of the k-th composition in standard order do not have weakly decreasing leaders, where the leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The reverse version (A375137) ranks compositions matching the dashed pattern 1-32.

Examples

			Composition 89 is (2,1,3,1), which matches 2-3-1 but not 23-1.
Composition 165 is (2,3,2,1), which matches 23-1 but not 231.
Composition 358 is (2,1,3,1,2), which matches 2-3-1 and 1-3-2 but not 23-1 or 1-32.
The sequence together with corresponding compositions begins:
   41: (2,3,1)
   81: (2,4,1)
   83: (2,3,1,1)
  105: (1,2,3,1)
  145: (3,4,1)
  161: (2,5,1)
  163: (2,4,1,1)
  165: (2,3,2,1)
  166: (2,3,1,2)
  167: (2,3,1,1,1)
  169: (2,2,3,1)
  209: (1,2,4,1)
  211: (1,2,3,1,1)
  233: (1,1,2,3,1)
		

Crossrefs

The complement is too dense, but counted by A189076.
The non-dashed version is A335482, reverse A335480.
For leaders of identical runs we have A335486, reverse A335485.
Compositions of this type are counted by A374636.
The reverse version is A375137, counted by A374636.
Matching 12-1 also gives A375296, counted by A375140 (complement A188920).
A003242 counts anti-runs, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099, reverse A228351.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MatchQ[stc[#],{_,y_,z_,_,x_,_}/;x
    				

A375296 Numbers k such that the leaders of maximal weakly increasing runs in the reverse of the k-th composition in standard order (row k of A228351) are not strictly decreasing.

Original entry on oeis.org

13, 25, 27, 29, 41, 45, 49, 51, 53, 54, 55, 57, 59, 61, 77, 81, 82, 83, 89, 91, 93, 97, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 115, 117, 118, 119, 121, 123, 125, 141, 145, 153, 155, 157, 161, 162, 163, 165, 166, 167, 169, 173, 177, 179, 181, 182
Offset: 1

Views

Author

Gus Wiseman, Aug 13 2024

Keywords

Comments

The leaders of maximal weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
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.
Also numbers k such that the k-th composition in standard order (row k of A066099) matches the dashed patterns 23-1 or 12-1.

Examples

			The sequence together with corresponding compositions begins:
  13: (1,2,1)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  41: (2,3,1)
  45: (2,1,2,1)
  49: (1,4,1)
  51: (1,3,1,1)
  53: (1,2,2,1)
  54: (1,2,1,2)
  55: (1,2,1,1,1)
  57: (1,1,3,1)
  59: (1,1,2,1,1)
  61: (1,1,1,2,1)
		

Crossrefs

For leaders of identical runs we have A335486, reverse A335485.
Matching 1-32 only gives A375138, reverse A375137, both counted by A374636.
Compositions of this type are counted by A375140, complement A188920.
The reverse version is A375295.
A003242 counts anti-runs, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A374637 counts compositions by sum of leaders of weakly increasing runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099, reverse A228351.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!Greater@@First/@Split[Reverse[stc[#]],LessEqual]&]
    - or -
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,300],MatchQ[stc[#],{_,y_,z_,_,x_,_}/;x<=y
    				

A375407 Numbers k such that the k-th composition in standard order (row k of A066099) matches both of the dashed patterns 23-1 and 1-32.

Original entry on oeis.org

421, 649, 802, 809, 837, 843, 933, 1289, 1299, 1330, 1445, 1577, 1602, 1605, 1617, 1619, 1669, 1673, 1675, 1685, 1686, 1687, 1701, 1826, 1833, 1861, 1867, 1957, 2469, 2569, 2577, 2579, 2597, 2598, 2599, 2610, 2658, 2661, 2674, 2697, 2850, 2857, 2885, 2891
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2024

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.
These are also numbers k such that:
(1) the maximal weakly increasing runs in the reverse of the k-th composition in standard order do not have weakly decreasing leaders, and
(2) the maximal weakly increasing runs in the k-th composition in standard order do not have weakly decreasing leaders.

Examples

			Composition 89 is (2,1,3,1), which matches 2-3-1 but not 23-1.
Composition 165 is (2,3,2,1), which matches 23-1 but not 231.
Composition 358 is (2,1,3,1,2), which matches 2-3-1 and 1-3-2 but not 23-1 or 1-32.
The sequence together with corresponding compositions begins:
   421: (1,2,3,2,1)
   649: (2,4,3,1)
   802: (1,3,4,2)
   809: (1,3,2,3,1)
   837: (1,2,4,2,1)
   843: (1,2,3,2,1,1)
   933: (1,1,2,3,2,1)
  1289: (2,5,3,1)
  1299: (2,4,3,1,1)
  1330: (2,3,1,3,2)
  1445: (2,1,2,3,2,1)
  1577: (1,4,2,3,1)
  1602: (1,3,5,2)
  1605: (1,3,4,2,1)
  1617: (1,3,2,4,1)
  1619: (1,3,2,3,1,1)
		

Crossrefs

The non-dashed version is the intersection of A335482 and A335480.
Compositions of this type are counted by A375297.
For leaders of identical runs we have A375408, counted by A332834.
A003242 counts anti-runs, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335486 ranks compositions matching 21, reverse A335485.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099, reverse A228351.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,1000],MatchQ[stc[#],{_,y_,z_,_,x_,_}/;x_,x_,_,z_,y_,_}/;x
    				

Formula

Intersection of A375138 and A375137.

A375408 Numbers k such that the k-th composition in standard order is not weakly increasing or weakly decreasing.

Original entry on oeis.org

13, 22, 25, 27, 29, 38, 41, 44, 45, 46, 49, 50, 51, 53, 54, 55, 57, 59, 61, 70, 76, 77, 78, 81, 82, 83, 86, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 134, 140, 141, 142
Offset: 1

Views

Author

Gus Wiseman, Sep 18 2024

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:
  13: (1,2,1)
  22: (2,1,2)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  38: (3,1,2)
  41: (2,3,1)
  44: (2,1,3)
  45: (2,1,2,1)
  46: (2,1,1,2)
  49: (1,4,1)
  50: (1,3,2)
  51: (1,3,1,1)
  53: (1,2,2,1)
  54: (1,2,1,2)
  55: (1,2,1,1,1)
  57: (1,1,3,1)
  59: (1,1,2,1,1)
		

Crossrefs

The version for run-lengths of compositions is A332833.
Compositions of this type are counted by A332834, complement maybe A329398.
A001523 counts unimodal compositions, ranks too dense.
A011782 counts compositions.
A114994 ranks weakly decreasing compositions, complement A335485.
A115981 counts non-unimodal compositions, ranked by A335373.
A225620 ranks weakly increasing compositions, complement A335486.
A238130, A238279, A333755 count compositions by number of runs.
A332835 counts compositions with weakly incr. or weakly decr. run-lengths.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564.
- Ranks of constant compositions are A272919.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.

Programs

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

Formula

Intersection of A335485 and A335486.
Showing 1-7 of 7 results.