OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..456
FORMULA
a(n) ~ c * d^n * n!, where d = 0.91568163084580807076940792182223499091165..., c = 1.44100339681864767911275854344010332196608... . - Vaclav Kotesovec, Aug 29 2014
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, `if`(t<3,
add(b(u+j-1, o-j, `if`(t=2, 3, 1)), j=1..o), 0)+
add(b(u-j, o+j-1, `if`(irem(t, 2)=0, 0, 2)), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 07 2013
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t < 3,
Sum[b[u + j - 1, o - j, If[t == 2, 3, 1]], {j, 1, o}] , 0] +
Sum[b[u - j, o + j - 1, If[EvenQ[t], 0, 2]], {j, 1, u}]];
a[n_] := b[n, 0, 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 20 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, May 10 2010
EXTENSIONS
a(17)-a(22) from Alois P. Heinz, Oct 07 2013
a(0)=1 from Alois P. Heinz, Apr 20 2022
STATUS
approved