OFFSET
0,5
LINKS
G. C. Greubel, Rows n = 0..100 of the triangle, flattened
FORMULA
From G. C. Greubel, Feb 14 2021: (Start)
T(n, k) = 4*binomial(n, k) - 5 with T(n, 0) = T(n, n) = 1.
Sum_{k=0..n} T(n, k) = 2^(n + 2) - (5*n + 1) - 2*[n=0] = A132734(n). (End)
EXAMPLE
First few rows of the triangle are:
1;
1, 1;
1, 3, 1;
1, 7, 7, 1;
1, 11, 19, 11, 1;
1, 15, 35, 35, 15, 1;
1, 19, 55, 75, 55, 19, 1;
...
MATHEMATICA
T[n_, k_]:= If[k==0 || k==n, 1, 4*Binomial[n, k] - 5];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Feb 14 2021 *)
PROG
(PARI) t(n, k) = 4*binomial(n, k) + 2*((k==0) || (k==n)) - 5*(k<=n); \\ Michel Marcus, Feb 12 2014
(Sage)
def T(n, k): return 1 if (k==0 or k==n) else 4*binomial(n, k) - 5
flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 14 2021
(Magma)
T:= func< n, k | k eq 0 or k eq n select 1 else 4*Binomial(n, k) - 5 >;
[T(n, k): k in [0..n], n in [0..12]]; // _G. C. Greubel, Feb 14 2021
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Aug 26 2007
EXTENSIONS
More terms from Michel Marcus, Feb 12 2014
STATUS
approved