%I #17 Sep 08 2022 08:45:28
%S 1,1,3,1,6,3,1,9,9,3,1,12,18,12,3,1,15,30,30,15,3,1,18,45,60,45,18,3,
%T 1,21,63,105,105,63,21,3,1,24,84,168,210,168,84,24,3,1,27,108,252,378,
%U 378,252,108,27,3,1,30,135,360,630,756,630,360,135,30,3
%N Triangle read by rows: T(n,0) = 1, T(n,k) = 3*binomial(n,k) if k>=0 (0<=k<=n).
%C Row sums = A033484: (1, 4, 10, 22, 46, 94...); 3*2^n - 2.
%C Analogous triangle using (1,2,2,2...) as the main diagonal of M = A124927.
%C Except for the first column, entries in the Pascal triangle are tripled.
%H G. C. Greubel, <a href="/A124928/b124928.txt">Rows n = 0..100 of triangle, flattened</a>
%F G.f.: G(t,z) = 3/(1-(1+t)*z) - 2/(1-z).
%e First few rows of the triangle are:
%e 1;
%e 1, 3;
%e 1, 6, 3;
%e 1, 9, 9, 3;
%e 1, 12, 18, 12, 3;
%e 1, 15, 30, 30, 15, 3;
%e 1, 18, 45, 60, 45, 18, 3;
%e ...
%p T:=proc(n,k) if k=0 then 1 else 3*binomial(n,k) fi end: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
%t Flatten[Table[If[k==0,1,3*Binomial[n,k]],{n,0,20},{k,0,n}]] (* _Harvey P. Dale_, Oct 19 2013 *)
%o (PARI) T(n,k) = if(k==0, 1, 3*binomial(n,k)); \\ _G. C. Greubel_, Nov 19 2019
%o (Magma) [k eq 0 select 1 else 3*Binomial(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Nov 19 2019
%o (Sage)
%o def T(n, k):
%o if (k==0): return 1
%o else: return 3*binomial(n,k)
%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Nov 19 2019
%o (GAP)
%o T:= function(n,k)
%o if k=0 then return 1;
%o else return 3*Binomial(n,k);
%o fi; end;
%o Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Nov 19 2019
%Y Cf. A033484, A124927.
%K nonn,tabl
%O 0,3
%A _Gary W. Adamson_, Nov 12 2006
%E Edited by _N. J. A. Sloane_, Nov 29 2006