OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..250
Wikipedia, Dominance Order
EXAMPLE
a(3) = 3: (21,21), (3,21), (3,3).
a(4) = 3: (31,31), (4,31), (4,4).
a(5) = 6: (32,32), (41,32), (41,41), (5,32), (5,41), (5,5).
a(6) = 10: (321,321), (42,321), (42,42), (51,321), (51,42), (51,51), (6,321), (6,42), (6,51), (6,6).
MAPLE
b:= proc(n, m, i, j, t) option remember; `if`(n<m, 0, `if`(n=0, 1,
`if`(i<1, 0, `if`(t and j>0, b(n, m, i, j-1, true), 0)+
b(n, m, i-1, j, false)+b(n-i, m-j, max(0, min(n-i, i-1)),
max(0, min(m-j, j-1)), true))))
end:
a:= n-> b(n$4, true):
seq(a(n), n=0..40);
MATHEMATICA
b[n_, m_, i_, j_, t_] := b[n, m, i, j, t] = If[n < m, 0, If[n == 0, 1, If[i < 1, 0, If[t && j > 0, b[n, m, i, j-1, True], 0] + b[n, m, i-1, j, False] + b[n-i, m-j, Max[0, Min[n-i, i-1]], Max[0, Min[m-j, j-1]], True]]]]; a[n_] := b[n, n, n, n, True]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 05 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 09 2015
STATUS
approved