|
|
A091618
|
|
Number of compositions (ordered partitions) of n such that some part is repeated consecutively 4 times and no part is repeated consecutively more than 4 times.
|
|
2
|
|
|
1, 0, 2, 4, 10, 22, 46, 101, 218, 466, 991, 2093, 4405, 9232, 19288, 40169, 83416, 172806, 357170, 736710, 1516714, 3117133, 6396116, 13105012, 26814264, 54795330, 111842771, 228030558, 464439943, 945029466, 1921169854, 3902239742, 7919743405, 16061152291
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
4,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, 4) -b(n, 0, 3):
|
|
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, 4] - b[n, 0, 3];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|