OFFSET
0,9
COMMENTS
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
Sum_{k=0..n} T(n,k) = A011782(n).
Sum_{k=0..n} 2^k*T(n,k) = A083323(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A122983(n).
G.f.: (1 - 2*x*y - x^2 + x^2*y^2 + x^2*y)/(1 - 3*x*y - x^2 + 3*x^2*y^2 + x^3*y - x^3*y^3). - Philippe Deléham, Nov 09 2013
T(n,k) = 3*T(n-1,k-1) + T(n-2,k) - 3*T(n-2,k-2) - T(n-3,k-1) + T(n-3,k-3), T(0,0) = T(1,1) = T(2,1) = T(2,2) = 1, T(1,0) = T(2,0) = 0, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Nov 09 2013
EXAMPLE
Triangle begins:
1;
0, 1;
0, 1, 1;
0, 0, 3, 1;
0, 1, 0, 6, 1;
0, 0, 5, 0, 10, 1;
0, 1, 0, 15, 0, 15, 1;
0, 0, 7, 0, 35, 0, 21, 1;
0, 1, 0, 28, 0, 70, 0, 28, 1;
0, 0, 9, 0, 84, 0, 126, 0, 36, 1;
0, 1, 0, 45, 0, 210, 0, 210, 0, 45, 1;
MAPLE
T:= proc(n, k) option remember;
if k<0 or k>n then 0
elif k=n then 1
elif n=2 and k=1 then 1
elif k=0 then 0
else 3*T(n-1, k-1) + T(n-2, k) - 3*T(n-2, k-2) - T(n-3, k-1) + T(n-3, k-3)
fi; end:
seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 17 2020
MATHEMATICA
With[{m = 10}, CoefficientList[CoefficientList[Series[(1-2*x*y-x^2+x^2*y^2+
x^2*y)/(1-3*x*y-x^2+3*x^2*y^2+x^3*y-x^3*y^3), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
PROG
(PARI) T(n, k) = if(k<0 || k>n, 0, if(k==n, 1, if(n==2 && k==1, 1, if(k==0, 0, 3*T(n-1, k-1) + T(n-2, k) - 3*T(n-2, k-2) - T(n-3, k-1) + T(n-3, k-3) )))); \\ G. C. Greubel, Feb 17 2020
(Sage)
@CachedFunction
def T(n, k):
if (k<0 or k>n): return 0
elif (k==n): return 1
elif (n=2 and k=1): then 1
elif (k=0): then 0
else: return 3*T(n-1, k-1) + T(n-2, k) - 3*T(n-2, k-2) - T(n-3, k-1) + T(n-3, k-3)
[[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 17 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, Oct 26 2006
EXTENSIONS
a(12) corrected by Georg Fischer, Feb 17 2020
STATUS
approved