A355387 Number of ways to choose a distinct subsequence of an integer composition of n.
1, 2, 5, 14, 37, 98, 259, 682, 1791, 4697, 12303, 32196, 84199, 220087, 575067, 1502176, 3923117, 10244069, 26746171, 69825070, 182276806, 475804961, 1241965456, 3241732629, 8461261457, 22084402087, 57640875725, 150442742575, 392652788250, 1024810764496
Offset: 0
Keywords
Examples
The a(3) = 14 pairings of a composition with a chosen subsequence: (3)() (3)(3) (21)() (21)(1) (21)(2) (21)(21) (12)() (12)(1) (12)(2) (12)(12) (111)() (111)(1) (111)(11) (111)(111)
Links
- Christian Sievers, Table of n, a(n) for n = 0..2000
Crossrefs
The strict case is A032005.
The case of strict subsequences is A236002.
A075900 counts compositions of each part of a partition.
A304961 counts compositions of each part of a strict partition.
A307068 counts strict compositions of each part of a composition.
A336127 counts compositions of each part of a strict composition.
Programs
-
Mathematica
Table[Sum[Length[Union[Subsets[y]]],{y,Join@@Permutations/@IntegerPartitions[n]}],{n,0,6}]
-
PARI
lista(n)=my(f=sum(k=1,n,(x^k+x*O(x^n))/(1-x/(1-x)+x^k)));Vec((1-x)/((1-2*x)*(1-f))) \\ Christian Sievers, May 06 2025
Formula
G.f.: (1-x)/((1-2*x)*(1-f)) where f = Sum_{k>=1} x^k/(1-x/(1-x)+x^k) is the generating function for A331330. - Christian Sievers, May 06 2025
Extensions
a(16) and beyond from Christian Sievers, May 06 2025
Comments