login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Triangle T(n,k), read by rows, given by (0, 2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, 0, -3/2, 3/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
1

%I #20 Feb 17 2020 21:20:01

%S 1,0,3,0,6,9,0,9,27,27,0,12,54,108,81,0,15,90,270,405,243,0,18,135,

%T 540,1215,1458,729,0,21,189,945,2835,5103,5103,2187,0,24,252,1512,

%U 5670,13608,20412,17496,6561,0,27,324,2268,10206,30618,61236,78732,59049,19683

%N Triangle T(n,k), read by rows, given by (0, 2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, 0, -3/2, 3/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

%C Row sums are 4^n - 1 + 0^n.

%C Triangle of coefficients in expansion of (1+3*x)^n - 1 + 0^n.

%H G. C. Greubel, <a href="/A182042/b182042.txt">Rows n = 0..100 of triangle, flattened</a>

%F T(n,0) = 0^n; T(n,k) = binomial(n,k)*3^k for k > 0.

%F G.f.: (1-2*x+x^2+3*y*x^2)/(1-2*x-3*y*x+x^2+3*y*x^2).

%F 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.

%F T(n,k) = A206735(n,k)*3^k.

%F T(n,k) = A013610(n,k) - A073424(n,k).

%e Triangle begins:

%e 1;

%e 0, 3;

%e 0, 6, 9;

%e 0, 9, 27, 27;

%e 0, 12, 54, 108, 81;

%e 0, 15, 90, 270, 405, 243;

%e 0, 18, 135, 540, 1215, 1458, 729;

%e 0, 21, 189, 945, 2835, 5103, 5103, 2187;

%p T:= proc(n, k) option remember;

%p if k=n then 3^n

%p elif k=0 then 0

%p else binomial(n,k)*3^k

%p fi; end:

%p seq(seq(T(n, k), k=0..n), n=0..10); # _G. C. Greubel_, Feb 17 2020

%t 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 *)

%o (PARI) T(n,k) = if (k==0, 1, binomial(n,k)*3^k);

%o matrix(10, 10, n, k, T(n-1,k-1)) \\ to see the triangle \\ _Michel Marcus_, Feb 17 2020

%o (Sage)

%o @CachedFunction

%o def T(n, k):

%o if (k==n): return 3^n

%o elif (k==0): return 0

%o else: return binomial(n,k)*3^k

%o [[T(n, k) for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, Feb 17 2020

%Y Cf. A000244, A007318, A013610, A193193, A193194.

%K easy,nonn,tabl

%O 0,3

%A _Philippe Deléham_, Apr 07 2012

%E a(48) corrected by _Georg Fischer_, Feb 17 2020