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, q) = binomial(n, k) + q^n*binomial(n-2, k-1) - 1 with T(n, 0) = T(n, n) = 1 and q = 2, read by rows.
4

%I #5 Feb 16 2021 17:49:00

%S 1,1,1,1,5,1,1,10,10,1,1,19,37,19,1,1,36,105,105,36,1,1,69,270,403,

%T 270,69,1,1,134,660,1314,1314,660,134,1,1,263,1563,3895,5189,3895,

%U 1563,263,1,1,520,3619,10835,18045,18045,10835,3619,520,1,1,1033,8236,28791,57553,71931,57553,28791,8236,1033,1

%N Triangle T(n, k, q) = binomial(n, k) + q^n*binomial(n-2, k-1) - 1 with T(n, 0) = T(n, n) = 1 and q = 2, read by rows.

%C The triangle sequences having the form T(n,k,q) = binomial(n, k) + q^n*binomial(n-2, k-1) - 1 have the row sums Sum_{k=0..n} T(n,k,q) = 2^(n-2)*q^n + 2^n - (n-1) - (5/4)*[n=0] -(q/2)*[n=1]. - _G. C. Greubel_, Feb 16 2021

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

%F T(n, k, q) = binomial(n, k) + q^n*binomial(n-2, k-1) - 1 with T(n, 0) = T(n, n) = 1 and q = 2.

%F Sum_{k=0..n} T(n, k, 2) = 4^(n-1) + 2^n - (n-1) - (5/4)*[n=0] = A000302(n-1) + A132045(n) - (5/4)*[n=0]. - [n=1]. - _G. C. Greubel_, Feb 16 2021

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 5, 1;

%e 1, 10, 10, 1;

%e 1, 19, 37, 19, 1;

%e 1, 36, 105, 105, 36, 1;

%e 1, 69, 270, 403, 270, 69, 1;

%e 1, 134, 660, 1314, 1314, 660, 134, 1;

%e 1, 263, 1563, 3895, 5189, 3895, 1563, 263, 1;

%e 1, 520, 3619, 10835, 18045, 18045, 10835, 3619, 520, 1;

%e 1, 1033, 8236, 28791, 57553, 71931, 57553, 28791, 8236, 1033, 1;

%t T[n_, m_, q_]:= If[k==0 || k==n, 1, Binomial[n, k] +(q^n)*Binomial[n-2, k-1] -1];

%t Table[T[n,k,2], {n,0,12}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, Feb 16 2021 *)

%o (Sage)

%o def T(n,k,q): return 1 if (k==0 or k==n) else binomial(n,k) + q^n*binomial(n-2,k-1) -1

%o flatten([[T(n,k,2) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Feb 16 2021

%o (Magma)

%o T:= func< n,k,q | k eq 0 or k eq n select 1 else Binomial(n,k) + q^n*Binomial(n-2,k-1) -1 >;

%o [T(n,k,2): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Feb 16 2021

%Y Cf. A132044 (q=0), A173075 (q=1), this sequence (q=2), A173047 (q=3).

%Y Cf. A000302, A132045.

%K nonn,tabl

%O 0,5

%A _Roger L. Bagula_, Feb 08 2010

%E Edited by _G. C. Greubel_, Feb 16 2021