OFFSET
0,12
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = binomial(n, k+1)*Hypergeometric2F1([1, 1+k-n], [2+k], -1) - 2^(n-k) with T(n, 0) = 1.
From G. C. Greubel, Mar 29 2021: (Start)
T(n, k) = Sum_{j=0..n-k-1} binomial(n, j+k+1) - 2^(n-k) with T(n, 0) = 1.
EXAMPLE
Triangle begins as:
1;
1, -1;
1, -1, -1;
1, 0, -1, -1;
1, 3, 1, -1, -1;
1, 10, 8, 2, -1, -1;
1, 25, 26, 14, 3, -1, -1;
1, 56, 67, 48, 21, 4, -1, -1;
1, 119, 155, 131, 77, 29, 5, -1, -1;
1, 246, 338, 318, 224, 114, 38, 6, -1, -1;
1, 501, 712, 720, 574, 354, 160, 48, 7, -1, -1;
MATHEMATICA
(* First program *)
T[n_, k_]:= If[k==0, 1, Binomial[n, k+1]*Hypergeometric2F1[1, 1+k-n, 2+k, -1] - 2^(n-k)];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Mar 29 2021 *)
(* Second program *)
T[n_, k_]:= If[k==0, 1, Sum[Binomial[n, j+k+1], {j, 0, n-k-1}] - 2^(n-k)];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 29 2021 *)
PROG
(Magma)
T:= func< n, k | k eq 0 select 1 else (&+[Binomial(n, j+k+1): j in [0..n]]) - 2^(n-k)>;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 29 2021
(Sage)
@CachedFunction
def T(n, k):
if (k==0: return 1
else: return sum( binomial(n, j+k+1) for j in (0..n-k-1) ) - 2^(n-k)
flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 29 2021
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula and Gary W. Adamson, Sep 13 2008
EXTENSIONS
Edited by G. C. Greubel, Mar 29 2021
STATUS
approved