%I #27 Sep 08 2022 08:45:01
%S 1,1,0,1,1,0,1,1,0,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,2,2,1,0,1,1,1,2,2,1,
%T 0,0,1,1,1,2,3,4,3,1,0,1,1,1,2,3,4,3,1,0,0,1,1,1,2,3,5,7,7,4,1,0,1,1,
%U 1,2,3,5,7,7,4,1,0,0,1,1,1,2,3,5,8,12,14,11,5,1,0
%N Triangle T read by rows: T(i,0)=1 for i >= 0; T(i,i)=0 for i >= 1; T(i,j) = Sum_{k=1..floor(i/2)} T(i-2k,j-2k+1) for 1 <= j <= i-1, where T(m,n) := 0 if m < 0 or n < 0.
%C T(i+j,j) is the number of strings (s(1),...,s(m)) of nonnegative integers s(k) such that m <= i+1, s(m)=j and s(k)-s(k-1) is an odd positive integer for k=2,3,...,m.
%C T(i+j,j) is the number of compositions of j consisting of at most i parts, all positive odd integers.
%H G. C. Greubel, <a href="/A055800/b055800.txt">Rows n = 0..100 of triangle, flattened</a>
%H C. Kimberling, <a href="https://www.fq.math.ca/Scanned/40-4/kimberling.pdf">Path-counting and Fibonacci numbers</a>, Fib. Quart. 40 (4) (2002) 328-338, Example 2A.
%F G.f. for k-th diagonal: (1-x^2-x*(x/(1-x^2))^k)/(1-x-x^2). - _Vladeta Jovovic_, Mar 10 2005
%e Triangle begins:
%e 1;
%e 1,0;
%e 1,1,0;
%e 1,1,0,0;
%e 1,1,1,1,0;
%e ...
%e T(10,5) counts the strings 012345, 0125, 0145, 0345, 05.
%e T(10,5) counts the compositions 11111, 113, 131, 311, 5.
%p T:= proc(n,k) option remember;
%p if n<0 or k<0 then 0;
%p elif k=0 then 1;
%p elif k=n then 0;
%p else add(T(n-2*j, k-2*j+1), j=1..floor(n/2)) ;
%p end if; end proc:
%p seq(seq(T(n,k), k=0..n), n=0..15); # _G. C. Greubel_, Jan 24 2020
%t T[n_, k_]:= T[n, k]= If[n<0 || k<0, 0, If[k==0, 1, If[k==n, 0, Sum[T[n-2*j, k- 2*j+1], {j, Floor[n/2]}]]]]; Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jan 24 2020 *)
%o (PARI) T(n,k) = if(n<0 || k<0, 0, if(k==0, 1, if(k==n, 0, sum(j=1, n\2, T(n-2*j, k-2*j+1) ))));
%o for(n=0,15, for(k=0,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Jan 23 2020
%o (Magma)
%o function T(n,k)
%o if n lt 0 or k lt 0 then return 0;
%o elif k eq 0 then return 1;
%o elif k eq n then return 0;
%o else return (&+[T(n-2*j, k-2*j+1): j in [1..Floor(n/2)]]);
%o end if; return T; end function;
%o [T(n,k): k in [0..n], n in [0..15]]; // _G. C. Greubel_, Jan 23 2020
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (n<0 or k<0): return 0
%o elif (k==0): return 1
%o elif (k==n): return 0
%o else: return sum(T(n-2*j, k-2*j+1) for j in (1..floor(n/2)))
%o [[T(n, k) for k in (0..n)] for n in (0..15)] # _G. C. Greubel_, Jan 23 2020
%o (GAP)
%o T:= function(n,k)
%o if n<0 or k<0 then return 0;
%o elif k=0 then return 1;
%o elif k=n then return 0;
%o else return Sum([1..Int(n/2)], j-> T(n-2*j, k-2*j+1));
%o fi; end;
%o Flat(List([0..15], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Jan 23 2020
%Y Row sums are powers of 2: A016116.
%Y T(2n, n)=A000045(n) for n >= 1 (Fibonacci numbers).
%Y Cf. A027926.
%K nonn,tabl
%O 0,25
%A _Clark Kimberling_, May 28 2000
%E a(88)-a(90) from _Michel Marcus_, Jan 21 2019