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.

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

A354581 Numbers k such that the k-th composition in standard order is rucksack, meaning every distinct partial run has a different sum.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 56, 57, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 80, 81, 82, 84, 85, 86, 88
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2022

Keywords

Comments

We define a partial run of a sequence to be any contiguous constant subsequence.
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 term rucksack is short for run-knapsack.

Examples

			The terms together with their corresponding 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)
  12: (1,3)
  13: (1,2,1)
  15: (1,1,1,1)
Missing are:
  11: (2,1,1)
  14: (1,1,2)
  23: (2,1,1,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  30: (1,1,1,2)
  39: (3,1,1,1)
  43: (2,2,1,1)
  46: (2,1,1,2)
		

Crossrefs

The version for binary indices is A000225.
Counting distinct sums of full runs gives A353849, partitions A353835.
For partitions we have A353866, counted by A353864, complement A354583.
These compositions are counted by A354580.
Counting distinct sums of partial runs gives A354907, partitions A353861.
A066099 lists all compositions in standard order.
A124767 counts runs in standard compositions.
A124771 counts distinct contiguous subsequences, non-contiguous A334299.
A238279 and A333755 count compositions by number of runs.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

Programs

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

A354582 Number of distinct contiguous constant subsequences (or partial runs) in the k-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 13 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

			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), so a(981) = 6.
As a triangle:
  1
  1 2
  1 2 2 3
  1 2 2 3 2 2 3 4
  1 2 2 3 2 3 2 4 2 2 3 3 3 3 4 5
  1 2 2 3 2 3 3 4 2 3 3 4 3 2 3 5 2 2 3 3 3 3 2 4 3 3 4 3 4 4 5 6
		

Crossrefs

The version for partitions is A001222, full A001221.
If we allow any constant subsequence we get A063787.
If we allow any contiguous subsequence we get A124771.
Positions of first appearances are A126646.
The version for binary indices is A330036, full A005811.
If we allow any subsequence we get A334299.
The full version is A351014, firsts A351015.
The version for run-sums of partitions is A353861, full A353835.
Counting distinct sums of partial runs gives A354907, full A353849.
A066099 lists all compositions in standard order.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

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[Join@@pre/@Split[stc[n]]]],{n,0,100}]

A354909 Number of integer compositions of n that are not the run-sums of any other composition.

Original entry on oeis.org

0, 0, 1, 1, 3, 7, 16, 33, 74, 155, 329, 688, 1439, 2975, 6154, 12654, 25964, 53091, 108369, 220643, 448520
Offset: 0

Views

Author

Gus Wiseman, Jun 19 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).

Examples

			The a(0) = 0 through a(6) = 16 compositions:
  .  .  (11)  (111)  (112)   (113)    (114)
                     (211)   (311)    (411)
                     (1111)  (1112)   (1113)
                             (1121)   (1122)
                             (1211)   (1131)
                             (2111)   (1221)
                             (11111)  (1311)
                                      (2112)
                                      (2211)
                                      (3111)
                                      (11112)
                                      (11121)
                                      (11211)
                                      (12111)
                                      (21111)
                                      (111111)
		

Crossrefs

The version for binary words is A000918, complement A000126.
These compositions are ranked by A354904 = positions of zeros in A354578.
The complement is counted by A354910, ranked by A354912.
A003242 counts anti-run compositions, ranked by A333489.
A238279 and A333755 count compositions by number of runs.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

Programs

  • Mathematica
    Table[Length[Complement[Join@@Permutations/@IntegerPartitions[n], Total/@Split[#]&/@Join@@Permutations/@IntegerPartitions[n]]],{n,0,15}]

A354910 Number of compositions of n that are the run-sums of some other composition.

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 16, 31, 54, 101, 183, 336, 609, 1121, 2038, 3730, 6804, 12445, 22703, 41501, 75768
Offset: 0

Views

Author

Gus Wiseman, Jun 20 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).

Examples

			The a(0) = 0 through a(6) = 16 compositions:
  ()  (1)  (2)  (3)   (4)    (5)    (6)
                (12)  (13)   (14)   (15)
                (21)  (22)   (23)   (24)
                      (31)   (32)   (33)
                      (121)  (41)   (42)
                             (122)  (51)
                             (131)  (123)
                             (212)  (132)
                             (221)  (141)
                                    (213)
                                    (222)
                                    (231)
                                    (312)
                                    (321)
                                    (1212)
                                    (2121)
		

Crossrefs

The version for binary words is A000126, complement A000918
The complement is counted by A354909, ranked by A354904.
These compositions are ranked by A354912 = nonzeros of A354578.
A003242 counts anti-run compositions, ranked by A333489.
A238279 and A333755 count compositions by number of runs.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

Programs

  • Mathematica
    Table[Length[Union[Total/@Split[#]&/@ Join@@Permutations/@IntegerPartitions[n]]],{n,0,15}]

A354908 Numbers k such that the k-th composition in standard order (graded reverse-lexicographic, A066099) is collapsible.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 11, 14, 15, 16, 31, 32, 36, 39, 42, 43, 46, 47, 58, 59, 60, 62, 63, 64, 127, 128, 136, 138, 139, 142, 143, 168, 170, 171, 174, 175, 184, 186, 187, 190, 191, 232, 234, 235, 238, 239, 248, 250, 251, 254, 255, 256, 292, 295, 316, 319, 484
Offset: 1

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.
If a collapse is an adding together of some partial run of an integer composition c, we say c is collapsible iff by some sequence of collapses it can be reduced to a single part. An example of such a sequence of collapses is (11132112) -> (332112) -> (33222) -> (6222) -> (66) -> (n), which shows that (11132112) is a collapsible composition of 12.

Examples

			The terms together with their corresponding compositions begin:
  1:(1)  2:(2)   4:(3)     8:(4)     16:(5)      32:(6)
         3:(11)  7:(111)  10:(22)    31:(11111)  36:(33)
                          11:(211)               39:(3111)
                          14:(112)               42:(222)
                          15:(1111)              43:(2211)
                                                 46:(2112)
                                                 47:(21111)
                                                 58:(1122)
                                                 59:(11211)
                                                 60:(1113)
                                                 62:(11112)
                                                 63:(111111)
		

Crossrefs

The standard compositions used here are A066099, run-sums A353847/A353932.
The version for Heinz numbers of partitions is A300273, counted by A275870.
These compositions are counted by A353860.
A003242 counts anti-run compositions, ranked by A333489, complement A261983.
A011782 counts compositions.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A334968 counts distinct sums of subsequences of standard compositions.
A351014 counts distinct runs of standard compositions, firsts A351015.
A353853-A353859 pertain to composition run-sum trajectory.
A354582 counts distinct partial runs of standard compositions, sums A354907.

Programs

  • Mathematica
    repcams[q_List]:=repcams[q]=Union[{q},If[UnsameQ@@q,{},Union@@repcams/@Union[Insert[Drop[q,#],Plus@@Take[q,#],First[#]]&/@Select[Tuples[Range[Length[q]],2],And[Less@@#,SameQ@@Take[q,#]]&]]]];
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MemberQ[repcams[stc[#]],{_}]&]
Showing 1-6 of 6 results.