OFFSET
7,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 7..450
MAPLE
g:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(g(o+j-1, u-j, 2), j=1..u) +`if`(t<7,
add(g(u+j-1, o-j, t+1), j=1..o), 0))
end:
b:= proc(u, o, t) option remember; `if`(t=7, g(u, o, t),
add(b(o+j-1, u-j, 2), j=1..u)+
add(b(u+j-1, o-j, t+1), j=1..o))
end:
a:= n-> add(b(j-1, n-j, 1), j=1..n):
seq(a(n), n=7..30);
MATHEMATICA
length = 7;
g[u_, o_, t_] := g[u, o, t] = If[u+o == 0, 1, Sum[g[o + j - 1, u - j, 2], {j, 1, u}] + If[t<length, Sum[g[u + j - 1, o - j, t+1], {j, 1, o}], 0]];
b[u_, o_, t_] := b[u, o, t] = If[t == length, g[u, o, t], Sum[b[o + j - 1, u - j, 2], {j, 1, u}] + Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}]];
a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}];
Table[a[n], {n, length, 30}] (* Jean-François Alcover, Aug 18 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 10 2013
STATUS
approved