|
|
A351018
|
|
Number of integer compositions of n with all distinct even-indexed parts and all distinct odd-indexed parts.
|
|
23
|
|
|
1, 1, 2, 3, 6, 9, 18, 27, 46, 77, 122, 191, 326, 497, 786, 1207, 1942, 2905, 4498, 6703, 10574, 15597, 23754, 35043, 52422, 78369, 115522, 169499, 248150, 360521, 532466, 768275, 1116126, 1606669, 2314426, 3301879, 4777078, 6772657, 9677138, 13688079, 19406214
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Also the number of binary words of length n starting with 1 and having all distinct runs (ranked by A175413, counted by A351016).
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{k>=0} floor(k/2)! * ceiling(k/2)! * ([y^floor(k/2)] P(x,y)) * ([y^ceiling(k/2)] P(x,y)), where P(x,y) = Product_{k>=1} 1 + y*x^k. - Andrew Howroyd, Feb 11 2022
|
|
EXAMPLE
|
The a(1) = 1 through a(6) = 18 compositions:
(1) (2) (3) (4) (5) (6)
(1,1) (1,2) (1,3) (1,4) (1,5)
(2,1) (2,2) (2,3) (2,4)
(3,1) (3,2) (3,3)
(1,1,2) (4,1) (4,2)
(2,1,1) (1,1,3) (5,1)
(1,2,2) (1,1,4)
(2,2,1) (1,2,3)
(3,1,1) (1,3,2)
(2,1,3)
(2,3,1)
(3,1,2)
(3,2,1)
(4,1,1)
(1,1,2,2)
(1,2,2,1)
(2,1,1,2)
(2,2,1,1)
|
|
MATHEMATICA
|
Table[Length[Select[Tuples[{0, 1}, n], #=={}||First[#]==1&&UnsameQ@@Split[#]&]], {n, 0, 10}]
|
|
PROG
|
(PARI) P(n)=prod(k=1, n, 1 + y*x^k + O(x*x^n));
seq(n)=my(p=P(n)); Vec(sum(k=0, n, polcoef(p, k\2, y)*(k\2)!*polcoef(p, (k+1)\2, y)*((k+1)\2)!)) \\ Andrew Howroyd, Feb 11 2022
|
|
CROSSREFS
|
The version for run-lengths instead of runs is A032020.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A116608 counts compositions by number of distinct parts.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329738 counts compositions with equal run-lengths.
A329744 counts compositions by runs-resistance.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
Cf. A003242, A025047, A098504, A098859, A106356, A212322, A328592, A329740, A334028, A349054, A350952, A351205.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|