login
A091620
Number of compositions (ordered partitions) of n such that some part is repeated consecutively 6 times and no part is repeated consecutively more than 6 times.
2
1, 0, 2, 4, 9, 20, 45, 98, 210, 453, 971, 2068, 4387, 9275, 19545, 41064, 86055, 179913, 375338, 781497, 1624250, 3370238, 6982398, 14445576, 29846586, 61591860, 126956859, 261411737, 537723480, 1105055809, 2268948882, 4654815069, 9541957646, 19545570684
OFFSET
6,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, 6) -b(n, 0, 5):
seq(a(n), n=6..50); # Alois P. Heinz, Feb 08 2017
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, 6] - b[n, 0, 5];
Table[a[n], {n, 6, 50}] (* Jean-François Alcover, May 21 2018, after Alois P. Heinz *)
CROSSREFS
Column k=6 of A091613.
Sequence in context: A360871 A199296 A219229 * A208738 A144686 A108469
KEYWORD
nonn
AUTHOR
Christian G. Bower, Jan 23 2004
STATUS
approved