login
A141901
Triangle T(n, k) = Sum_{j=0..n-k-1} binomial(n, j+k+1) - 2^(n-k) with T(n, 0) = 1, read by rows.
1
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
OFFSET
0,12
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.
Sum_{k=0..n} T(n, k) = 2^(n-1)*(n-4) + 3 = A036799(n-3) - A000225(n-1). (End)
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
Sequence in context: A349350 A061494 A360161 * A200473 A361948 A180172
KEYWORD
sign,tabl
AUTHOR
EXTENSIONS
Edited by G. C. Greubel, Mar 29 2021
STATUS
approved