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”).

A176154
Triangle T(n,k) = Sum_{j=0..k} Stirling1(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} Stirling1(n, n-j)*binomial(n,j), read by rows.
5
2, 2, 2, 0, -2, 0, -1, -10, -10, -1, 20, -4, 86, -4, 20, -78, -128, 102, 102, -128, -78, 77, -13, 1982, -6628, 1982, -13, 77, 2641, 2494, 1129, 12448, 12448, 1129, 2494, 2641, -36944, -37168, 12168, -463496, 745726, -463496, 12168, -37168, -36944
OFFSET
0,1
FORMULA
T(n, k) = Sum_{j=0..k} Stirling1(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} Stirling1(n, n-j)*binomial(n,j).
EXAMPLE
Triangle begins as:
2;
2, 2;
0, -2, 0;
-1, -10, -10, -1;
20, -4, 86, -4, 20;
-78, -128, 102, 102, -128, -78;
77, -13, 1982, -6628, 1982, -13, 77;
2641, 2494, 1129, 12448, 12448, 1129, 2494, 2641;
MAPLE
with(combinat);
T:= proc(n, k) option remember; add(stirling1(n, n-j)*binomial(n, j), j=0..k) + add(stirling1(n, n-j)* binomial(n, j), j=0..n-k); end;
seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Nov 26 2019
MATHEMATICA
T[n_, k_]:= Sum[StirlingS1[n, n-j]*Binomial[n, j], {j, 0, k}] + Sum[StirlingS1[n, n-j]*Binomial[n, j], {j, 0, n-k}];
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(PARI) T(n, k) = sum(j=0, k, stirling(n, n-j, 1)*binomial(n, j)) + sum(j=0, n-k, stirling(n, n-j, 1)*binomial(n, j)); \\ G. C. Greubel, Nov 26 2019
(Magma)
T:= func< n, k | (&+[StirlingFirst(n, n-j)*Binomial(n, j): j in [0..k]]) + (&+[StirlingFirst(n, n-j)*Binomial(n, j): j in [0..n-k]]) >;
[T(n, k): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 26 2019
(Sage)
def T(n, k): return sum((-1)^j*stirling_number1(n, n-j)*binomial(n, j) for j in (0..k)) + sum((-1)^j*stirling_number1(n, n-j)*binomial(n, j) for j in (0..n-k))
[[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 26 2019
(GAP)
T:= function(n, k) return Sum([0..k], j-> (-1)^j*Stirling1(n, n-j)*Binomial(n, j)) + Sum([0..n-k], j-> (-1)^j*Stirling1(n, n-j)*Binomial(n, j)); end;
Flat(List([0..10], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Nov 26 2019
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Apr 10 2010
EXTENSIONS
Name edited by G. C. Greubel, Nov 27 2019
STATUS
approved