OFFSET
0,3
COMMENTS
Row sums are 4^n - 1 + 0^n.
Triangle of coefficients in expansion of (1+3*x)^n - 1 + 0^n.
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
T(n,0) = 0^n; T(n,k) = binomial(n,k)*3^k for k > 0.
G.f.: (1-2*x+x^2+3*y*x^2)/(1-2*x-3*y*x+x^2+3*y*x^2).
T(n,k) = 2*T(n-1,k) + 3*T(n-1,k-1) - T(n-2,k) -3*T(n-2,k-1), T(0,0) = 1, T(1,0) = T(2,0) = 0, T(1,1) = 3, T(2,1) = 6, T(2,2) = 9 and T(n,k) = 0 if k < 0 or if k > n.
T(n,k) = A206735(n,k)*3^k.
EXAMPLE
Triangle begins:
1;
0, 3;
0, 6, 9;
0, 9, 27, 27;
0, 12, 54, 108, 81;
0, 15, 90, 270, 405, 243;
0, 18, 135, 540, 1215, 1458, 729;
0, 21, 189, 945, 2835, 5103, 5103, 2187;
MAPLE
T:= proc(n, k) option remember;
if k=n then 3^n
elif k=0 then 0
else binomial(n, k)*3^k
fi; end:
seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 17 2020
MATHEMATICA
With[{m = 9}, CoefficientList[CoefficientList[Series[(1-2*x+x^2+3*y*x^2)/(1-2*x-3*y*x+x^2+3*y*x^2), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
PROG
(PARI) T(n, k) = if (k==0, 1, binomial(n, k)*3^k);
matrix(10, 10, n, k, T(n-1, k-1)) \\ to see the triangle \\ Michel Marcus, Feb 17 2020
(Sage)
@CachedFunction
def T(n, k):
if (k==n): return 3^n
elif (k==0): return 0
else: return binomial(n, k)*3^k
[[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 17 2020
CROSSREFS
KEYWORD
AUTHOR
Philippe Deléham, Apr 07 2012
EXTENSIONS
a(48) corrected by Georg Fischer, Feb 17 2020
STATUS
approved