OFFSET
0,12
COMMENTS
A169623 is a very similar triangle except it does not have the outer diagonal of 0's. - N. J. A. Sloane, Nov 23 2017
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n,k) = T(n-1,k-1) + T(n-1,k) if n even, T(n,k) = T(n-1,k-1) + T(n-2,k) if n odd, T(0,0) = 1, T(1,0) = 1, T(1,1) = 0, T(n,k) = 0 if k < 0 or if k > n.
T(n,k) = T(n,n-k-1).
Sum_{k=0..n} T(n,k) = A038754(n-1), for n>=1.
T(2*n,n) = A005773(n).
T(2*n+1,n) = A002426(n).
From Philippe Deléham, May 04 2012: (Start)
G.f.: (1+x-y^2*x^2)/(1-x^2-y*x^2-y^2*x^2).
T(n,k) = T(n-2,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0) = T(1,0) = T(2,0) = T(2,1) = 1, T(1,1) = T(2,2) = 0 and T(n,k) = 0 if k < 0 or if k > n.
Sum_{k=0..n} T(n,k) = A182522(n). (End)
From G. C. Greubel, Jul 17 2023: (Start)
Sum_{k=0..n} (-1)^k*T(n,k) = A135528(n).
Sum_{k=0..floor(n/2)} T(n-k,k) = [n==0] + A013979(n+1). (End)
EXAMPLE
Triangle begins:
1;
1, 0;
1, 1, 0;
1, 1, 1, 0;
1, 2, 2, 1, 0;
1, 2, 3, 2, 1, 0;
1, 3, 5, 5, 3, 1, 0;
1, 3, 6, 7, 6, 3, 1, 0;
1, 4, 9, 13, 13, 9, 4, 1, 0;
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0 || k==n-1, 1, If[k==n, 0, T[n-2, k] +T[n-2, k-1] +T[n-2, k-2] ]]];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jul 17 2023 *)
PROG
(Magma)
function T(n, k) // T = A123149
if k lt 0 or k gt n then return 0;
elif k eq 0 or k eq n-1 then return 1;
elif k eq n then return 0;
else return T(n-2, k) +T(n-2, k-1) +T(n-2, k-2);
end if;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 17 2023
(SageMath)
def T(n, k): # T = A123149
if (k<0 or k>n): return 0
elif (k==0 or k==n-1): return 1
elif (k==n): return 0
else: return T(n-2, k) +T(n-2, k-1) +T(n-2, k-2)
flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 17 2023
CROSSREFS
KEYWORD
AUTHOR
Philippe Deléham, Nov 05 2006
STATUS
approved