|
|
A091617
|
|
Number of compositions (ordered partitions) of n such that some part is repeated consecutively 3 times and no part is repeated consecutively more than 3 times.
|
|
2
|
|
|
1, 0, 2, 5, 11, 22, 48, 105, 223, 468, 979, 2037, 4224, 8710, 17906, 36693, 74973, 152795, 310669, 630353, 1276544, 2580614, 5208522, 10496954, 21126102, 42464498, 85255651, 170980512, 342553389, 685641724, 1371134291, 2739685107, 5469923466, 10912945300
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,3
|
|
LINKS
|
|
|
MAPLE
|
b:= proc(n, l, k) option remember; `if`(n=0, 1, add(`if`(
i=l, 0, add(b(n-i*j, i, k), j=1..min(k, n/i))), i=1..n))
end:
a:= n-> b(n, 0, 3) -b(n, 0, 2):
|
|
MATHEMATICA
|
b[n_, l_, k_] := b[n, l, k] = If[n == 0, 1, Sum[If[i == l, 0, Sum[b[n - i*j, i, k], {j, 1, Min[k, n/i]}]], {i, 1, n}]];
a[n_] := b[n, 0, 3] - b[n, 0, 2];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|