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.

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.