|
|
A206268
|
|
Number of compositions of n with at most one 1.
|
|
2
|
|
|
1, 1, 1, 3, 4, 8, 13, 23, 39, 67, 114, 194, 329, 557, 941, 1587, 2672, 4492, 7541, 12643, 21171, 35411, 59166, 98758, 164689, 274393, 456793, 759843, 1263004, 2097872, 3482269, 5776559, 9576639, 15867427, 26276106, 43489802, 71944217, 118958597, 196605701
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (2*x^3 - 2*x^2 - x + 1)/(x^4 + 2*x^3 - x^2 - 2*x + 1).
|
|
EXAMPLE
|
We have a(3) = 3 since 3 = 1 + 2 = 2+1. A(2) = 1 since 2 is the only composition of 2 that does not have more than one 1.
|
|
MATHEMATICA
|
CoefficientList[Series[(2 x^3 - 2 x^2 - x + 1)/(x^4 + 2 x^3 - x^2 - 2 x + 1), {x, 0, 38}], x] (* Michael De Vlieger, Dec 09 2020 *)
|
|
PROG
|
(Sage) R.<x> = PowerSeriesRing(QQ)
f = (2*x^3 - 2*x^2 - x + 1)/(x^4 + 2*x^3 - x^2 - 2*x + 1)
print(f.list())
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|