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

A374249 Numbers k such that the k-th composition in standard order has its equal parts contiguous.

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, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 47, 48, 50, 52, 56, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 78, 79, 80, 81, 83, 84, 85
Offset: 1

Views

Author

Gus Wiseman, Jul 13 2024

Keywords

Comments

These are compositions avoiding the patterns (1,2,1) and (2,1,2).
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 standard compositions begin:
   0: ()
   1: (1)
   2: (2)
   3: (1,1)
   4: (3)
   5: (2,1)
   6: (1,2)
   7: (1,1,1)
   8: (4)
   9: (3,1)
  10: (2,2)
  11: (2,1,1)
  12: (1,3)
  14: (1,1,2)
  15: (1,1,1,1)
  16: (5)
See A374253 for the complement: 13, 22, 25, 27, 29, ...
		

Crossrefs

The strict (also anti-run) case is A233564, counted by A032020.
Compositions of this type are counted by A274174.
Permutations of prime indices of this type are counted by A333175.
The complement is A374253 (anti-run A374254), counted by A335548.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A066099 lists compositions in standard order.
A124767 counts runs in standard compositions, anti-runs A333381.
A333755 counts compositions by number of runs.
A335454 counts patterns matched by standard compositions.
A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.
- A335470 counts (1,2,1)-matching compositions, ranks A335466.
- A335471 counts (1,2,1)-avoiding compositions, ranks A335467.
- A335472 counts (2,1,2)-matching compositions, ranks A335468.
- A335473 counts (2,1,2)-avoiding compositions, ranks A335469.

Programs

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

Formula

Equals A335467 /\ A335469.

A374253 Numbers k such that the k-th composition in standard order matches the patterns (1,2,1) or (2,1,2).

Original entry on oeis.org

13, 22, 25, 27, 29, 45, 46, 49, 51, 53, 54, 55, 57, 59, 61, 76, 77, 82, 86, 89, 90, 91, 93, 94, 97, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 115, 117, 118, 119, 121, 123, 125, 141, 148, 150, 153, 155, 156, 157, 162, 165, 166, 173, 174, 177, 178
Offset: 1

Views

Author

Gus Wiseman, Jul 13 2024

Keywords

Comments

Such a composition cannot be strict.
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 standard compositions begin:
  13: (1,2,1)
  22: (2,1,2)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  45: (2,1,2,1)
  46: (2,1,1,2)
  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)
  76: (3,1,3)
  77: (3,1,2,1)
  82: (2,3,2)
  86: (2,2,1,2)
  89: (2,1,3,1)
		

Crossrefs

Permutations of prime indices of this type are counted by A335460.
Compositions of this type are counted by A335548.
The complement is A374249, counted by A274174.
The anti-run case is A374254.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A025047 counts wiggly compositions, ranks A345167.
A066099 lists compositions in standard order.
A124767 counts runs in standard compositions, anti-runs A333381.
A233564 ranks strict compositions, counted by A032020.
A333755 counts compositions by number of runs.
A335454 counts patterns matched by standard compositions.
A335456 counts patterns matched by compositions.
A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.
A335465 counts minimal patterns avoided by a standard composition.
- A335470 counts (1,2,1)-matching compositions, ranks A335466.
- A335471 counts (1,2,1)-avoiding compositions, ranks A335467.
- A335472 counts (2,1,2)-matching compositions, ranks A335468.
- A335473 counts (2,1,2)-avoiding compositions, ranks A335469.
A373948 encodes run-compression using compositions in standard order.
A373949 counts compositions by run-compressed sum, opposite A373951.
A373953 gives run-compressed sum of standard compositions, excess A373954.

Programs

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

Formula

Equals A335466 \/ A335468.

A335450 Number of (2,1,2)-avoiding permutations of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 14 2020

Keywords

Comments

Depends only on unsorted prime signature (A124010), but not only on sorted prime signature (A118914).
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The permutations for n = 2, 6, 12, 24, 30, 48, 60, 90:
  (1)  (12)  (112)  (1112)  (123)  (11112)  (1123)  (1223)
       (21)  (211)  (2111)  (132)  (21111)  (1132)  (1322)
                            (213)           (2113)  (2123)
                            (231)           (2311)  (2213)
                            (312)           (3112)  (2231)
                            (321)           (3211)  (3122)
                                                    (3212)
                                                    (3221)
		

Crossrefs

Positions of ones are A000961.
Replacing (2,1,2) with (1,2,1) gives A335449.
The matching version is A335453.
Patterns are counted by A000670.
(2,1,2)-avoiding patterns are counted by A001710.
Permutations of prime indices are counted by A008480.
Unsorted prime signature is A124010. Sorted prime signature is A118914.
(1,2,1) and (2,1,2)-avoiding permutations of prime indices are A333175.
STC-numbers of permutations of prime indices are A333221.
(1,2,1) and (2,1,2)-avoiding permutations of prime indices are A335448.
Patterns matched by standard compositions are counted by A335454.
(1,2,1) or (2,1,2)-matching permutations of prime indices are A335460.
(1,2,1) and (2,1,2)-matching permutations of prime indices are A335462.
Dimensions of downsets of standard compositions are A335465.
(2,1,2)-avoiding compositions are ranked by A335469.
(2,1,2)-avoiding compositions are counted by A335473.
(2,2,1)-avoiding compositions are ranked by A335524.
(1,2,2)-avoiding compositions are ranked by A335525.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n]],!MatchQ[#,{_,x_,_,y_,_,x_,_}/;x>y]&]],{n,100}]

A335525 Numbers k such that the k-th composition in standard order (A066099) avoids the pattern (1,2,2).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 18 2020

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Crossrefs

Patterns avoiding this pattern are counted by A001710 (by length).
Permutations of prime indices avoiding this pattern are counted by A335450.
These compositions are counted by A335473 (by sum).
The complement A335475 is the matching version.
The (2,2,1)-avoiding version is A335524.
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_,_,y_,_}/;x
    				

A335477 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (2,2,1).

Original entry on oeis.org

21, 43, 45, 53, 73, 85, 86, 87, 91, 93, 107, 109, 117, 146, 147, 149, 153, 165, 169, 171, 172, 173, 174, 175, 181, 182, 183, 187, 189, 201, 213, 214, 215, 219, 221, 235, 237, 245, 273, 277, 293, 294, 295, 297, 299, 301, 306, 307, 309, 313, 325, 329, 331, 333
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   21: (2,2,1)
   43: (2,2,1,1)
   45: (2,1,2,1)
   53: (1,2,2,1)
   73: (3,3,1)
   85: (2,2,2,1)
   86: (2,2,1,2)
   87: (2,2,1,1,1)
   91: (2,1,2,1,1)
   93: (2,1,1,2,1)
  107: (1,2,2,1,1)
  109: (1,2,1,2,1)
  117: (1,1,2,2,1)
  146: (3,3,2)
  147: (3,3,1,1)
		

Crossrefs

The complement A335524 is the avoiding version.
The (1,2,2)-matching version is A335475.
Patterns matching this pattern are counted by A335509 (by length).
Permutations of prime indices matching this pattern are counted by A335453.
These compositions are counted by A335472 (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_,_,x_,_,y_,_}/;x>y]&]

A374254 Numbers k such that the k-th composition in standard order is an anti-run and matches the patterns (1,2,1) or (2,1,2).

Original entry on oeis.org

13, 22, 25, 45, 49, 54, 76, 77, 82, 89, 97, 101, 102, 105, 108, 109, 141, 148, 150, 153, 162, 165, 166, 177, 178, 180, 182, 193, 197, 198, 204, 205, 209, 210, 216, 217, 269, 278, 280, 281, 297, 300, 301, 305, 306, 308, 310, 322, 325, 326, 332, 333, 353, 354
Offset: 1

Views

Author

Gus Wiseman, Jul 14 2024

Keywords

Comments

Such a composition cannot be strict.
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 standard compositions begin:
   13: (1,2,1)
   22: (2,1,2)
   25: (1,3,1)
   45: (2,1,2,1)
   49: (1,4,1)
   54: (1,2,1,2)
   76: (3,1,3)
   77: (3,1,2,1)
   82: (2,3,2)
   89: (2,1,3,1)
   97: (1,5,1)
  101: (1,3,2,1)
  102: (1,3,1,2)
  105: (1,2,3,1)
  108: (1,2,1,3)
  109: (1,2,1,2,1)
  141: (4,1,2,1)
  148: (3,2,3)
  150: (3,2,1,2)
  153: (3,1,3,1)
		

Crossrefs

Compositions of this type are counted by A285981.
Permutations of prime indices of this type are counted by A335460.
This is the anti-run complement case of A374249, counted by A274174.
This is the anti-run case of A374253, counted by A335548.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A025047 counts wiggly compositions, ranks A345167.
A066099 lists compositions in standard order.
A124767 counts runs in standard compositions, anti-runs A333381.
A233564 ranks strict compositions, counted by A032020.
A333755 counts compositions by number of runs.
A335454 counts patterns matched by standard compositions.
A335456 counts patterns matched by compositions.
A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.
A335465 counts minimal patterns avoided by a standard composition.
- A335470 counts (1,2,1)-matching compositions, ranks A335466.
- A335471 counts (1,2,1)-avoiding compositions, ranks A335467.
- A335472 counts (2,1,2)-matching compositions, ranks A335468.
- A335473 counts (2,1,2)-avoiding compositions, ranks A335469.
A373948 encodes run-compression using compositions in standard order.
A373949 counts compositions by run-compressed sum, opposite A373951.
A373953 gives run-compressed sum of standard compositions, excess A373954.

Programs

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

Formula

Equals A333489 /\ A374253.
Showing 1-6 of 6 results.