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

A334299 Number of distinct subsequences (not necessarily contiguous) of compositions in standard order (A066099).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 4, 4, 2, 4, 3, 6, 4, 7, 6, 5, 2, 4, 4, 6, 4, 6, 7, 8, 4, 7, 6, 10, 6, 10, 8, 6, 2, 4, 4, 6, 3, 8, 8, 8, 4, 8, 4, 9, 8, 12, 11, 10, 4, 7, 8, 10, 8, 11, 12, 13, 6, 10, 9, 14, 8, 13, 10, 7, 2, 4, 4, 6, 4, 8, 8, 8, 4, 6, 6, 12, 7, 14, 12, 10, 4
Offset: 0

Views

Author

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

Examples

			Triangle begins:
  1
  2
  2 3
  2 4 4 4
  2 4 3 6 4 7 6 5
  2 4 4 6 4 6 7 8 4 7 6 10 6 10 8 6
If the k-th composition in standard order is c, then we say that the STC-number of c is k. The n-th column below lists the STC-numbers of the subsequences of the composition with STC-number n:
  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
     0  0  1  0  2  2  3  0  4   2   5   4   6   6   7
           0     1  1  1     1   0   3   1   5   3   3
                 0  0  0     0       2   0   3   2   1
                                     1       2   1   0
                                     0       1   0
                                             0
		

Crossrefs

Row lengths are A011782.
Looking only at contiguous subsequences gives A124771.
Compositions where every subinterval has a different sum are A333222.
Knapsack compositions are A333223.
Contiguous positive subsequence-sums are counted by A333224.
Contiguous subsequence-sums are counted by A333257.
Disallowing empty subsequences gives A334300.
Subsequence-sums are counted by A334968.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[Subsets[stc[n]]]],{n,0,100}]

Formula

a(n) = A334300(n) + 1.

A334968 Number of possible sums of subsequences (not necessarily contiguous) of the n-th composition in standard order (A066099).

Original entry on oeis.org

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

Views

Author

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

Examples

			The 139th composition is (4,2,1,1), with possible sums of subsequences {0,1,2,3,4,5,6,7,8}, so a(139) = 9.
Triangle begins:
  1
  2
  2 3
  2 4 4 4
  2 4 3 5 4 5 5 5
  2 4 4 6 4 6 6 6 4 6 6 6 6 6 6 6
  2 4 4 6 3 7 7 7 4 7 4 7 7 7 7 7 4 6 7 7 7 7 7 7 6 7 7 7 7 7 7 7
		

Crossrefs

Row lengths are A011782.
Dominated by A124771 (number of contiguous subsequences).
Dominates A333257 (the contiguous case).
Dominated by A334299 (number of subsequences).
Golomb rulers are counted by A169942 and ranked by A333222.
Positive subset-sums of partitions are counted by A276024 and A299701.
Knapsack partitions are counted by A108917 and ranked by A299702
Knapsack compositions are counted by A325676 and ranked by A333223.
Contiguous subsequence-sums are counted by A333224 and ranked by A333257.
Knapsack compositions are counted by A334268 and ranked by A334967.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[Total/@Subsets[stc[n]]]],{n,0,100}]

Formula

a(n) = A299701(A333219(n)).

A334967 Numbers k such that the every subsequence (not necessarily contiguous) of the k-th composition in standard order (A066099) has a different sum.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 17, 18, 19, 20, 21, 24, 26, 28, 31, 32, 33, 34, 35, 36, 40, 42, 48, 56, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 80, 81, 84, 85, 88, 96, 98, 100, 104, 106, 112, 120, 127, 128, 129, 130, 131, 132, 133, 134
Offset: 1

Views

Author

Gus Wiseman, Jun 02 2020

Keywords

Comments

First differs from A333223 in lacking 41.
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 together with the corresponding compositions begins:
   0: ()           18: (3,2)          48: (1,5)
   1: (1)          19: (3,1,1)        56: (1,1,4)
   2: (2)          20: (2,3)          63: (1,1,1,1,1,1)
   3: (1,1)        21: (2,2,1)        64: (7)
   4: (3)          24: (1,4)          65: (6,1)
   5: (2,1)        26: (1,2,2)        66: (5,2)
   6: (1,2)        28: (1,1,3)        67: (5,1,1)
   7: (1,1,1)      31: (1,1,1,1,1)    68: (4,3)
   8: (4)          32: (6)            69: (4,2,1)
   9: (3,1)        33: (5,1)          70: (4,1,2)
  10: (2,2)        34: (4,2)          71: (4,1,1,1)
  12: (1,3)        35: (4,1,1)        72: (3,4)
  15: (1,1,1,1)    36: (3,3)          73: (3,3,1)
  16: (5)          40: (2,4)          74: (3,2,2)
  17: (4,1)        42: (2,2,2)        80: (2,5)
		

Crossrefs

These compositions are counted by A334268.
Golomb rulers are counted by A169942 and ranked by A333222.
Positive subset-sums of partitions are counted by A276024 and A299701.
Knapsack partitions are counted by A108917 and ranked by A299702
Knapsack compositions are counted by A325676 and ranked by A333223.
The case of partitions is counted by A325769 and ranked by A325778.
Contiguous subsequence-sums are counted by A333224 and ranked by A333257.
Number of (not necessarily contiguous) subsequences is A334299.

Programs

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