OFFSET
0,2
COMMENTS
Related to the number of tournament sequences (A008934).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..84
MATHEMATICA
T[n_, k_]:= T[n, k]= If[n<0 || k>n, 0, If[n==k, 1, If[k==0, Sum[T[n-1, j]*T[j, 0], {j, 0, n-1}], Sum[T[n-1, j]*(T[j, k-1] +T[j, k]), {j, 0, n-1}] ]]]; (* T = A097710 *)
A097711[n_]:= T[n+1, 1];
Table[A097711[n], {n, 0, 30}] (* G. C. Greubel, Feb 21 2024 *)
PROG
(SageMath)
@CachedFunction
def T(n, k): # T = A097710
if n< 0 or k<0 or k>n: return 0
elif k==n: return 1
elif k==0: return sum(T(n-1, j)*T(j, 0) for j in range(n))
else: return sum(T(n-1, j)*(T(j, k-1)+T(j, k)) for j in range(n))
def A097711(n): return T(n+1, 1)
[A097711(n) for n in range(31)] # G. C. Greubel, Feb 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Aug 22 2004
STATUS
approved