login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle T(n, k) = (binomial(n-1, k-1)*binomial(n, k-1)/k) * ( 3^(k-1) if floor(n/2) >= k, otherwise 3^(n-k) ), read by rows.
1

%I #9 Sep 08 2022 08:45:51

%S 1,1,1,1,9,1,1,18,18,1,1,30,180,30,1,1,45,450,450,45,1,1,63,945,4725,

%T 945,63,1,1,84,1764,13230,13230,1764,84,1,1,108,3024,31752,142884,

%U 31752,3024,108,1,1,135,4860,68040,428652,428652,68040,4860,135,1

%N Triangle T(n, k) = (binomial(n-1, k-1)*binomial(n, k-1)/k) * ( 3^(k-1) if floor(n/2) >= k, otherwise 3^(n-k) ), read by rows.

%H G. C. Greubel, <a href="/A174346/b174346.txt">Rows n = 1..50 of the triangle, flattened</a>

%F T(n, k) = (binomial(n-1, k-1)*binomial(n, k-1)/k) * ( 3^(k-1) if floor(n/2) >= k, otherwise 3^(n-k) ).

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

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 9, 1;

%e 1, 18, 18, 1;

%e 1, 30, 180, 30, 1;

%e 1, 45, 450, 450, 45, 1;

%e 1, 63, 945, 4725, 945, 63, 1;

%e 1, 84, 1764, 13230, 13230, 1764, 84, 1;

%e 1, 108, 3024, 31752, 142884, 31752, 3024, 108, 1;

%e 1, 135, 4860, 68040, 428652, 428652, 68040, 4860, 135, 1;

%t T[n_,k_]:= (Binomial[n-1, k-1]*Binomial[n, k-1]/k)*If[Floor[n/2]>k-1, 3^(k-1), 3^(n-k)];

%t Table[T[n,k], {n,12}, {k,n}]//Flatten

%o (Magma)

%o function T(n,k)

%o if Floor(n/2) gt k-1 then return (1/n)*Binomial(n,k)*Binomial(n,k-1)*3^(k-1);

%o else return (1/n)*Binomial(n,k)*Binomial(n,k-1)*3^(n-k);

%o end if; return T;

%o end function;

%o [T(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Nov 26 2021

%o (Sage)

%o def A174346(n,k): return (1/n)*binomial(n,k)*binomial(n,k-1)*( 3^(k-1) if ((n//2)>k-1) else 3^(n-k) )

%o flatten([[A174346(n,k) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Nov 26 2021

%Y Cf. A081582.

%K nonn,tabl

%O 1,5

%A _Roger L. Bagula_, Mar 16 2010

%E Edited by _G. C. Greubel_, Nov 26 2021