login
A176156
Regular triangle, T(n, k) = f(n, k) - f(n, 0) + 1, where f(n, k) = Sum_{j=0..k} (-1)^j*StirlingS2(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} (-1)^j*StirlingS2(n, n-j)*binomial(n, j), read by rows.
5
1, 1, 1, 1, 3, 1, 1, 10, 10, 1, 1, 25, 67, 25, 1, 1, 51, 281, 281, 51, 1, 1, 91, 646, 1036, 646, 91, 1, 1, 148, -1217, -12536, -12536, -1217, 148, 1, 1, 225, -31079, -287223, -548785, -287223, -31079, 225, 1, 1, 325, -342899, -3906899, -11000741, -11000741, -3906899, -342899, 325, 1
OFFSET
0,5
COMMENTS
Row sum are: {1, 2, 5, 22, 119, 666, 2512, -27208, -1184937, -30500426, -716845999, ...}.
FORMULA
With f(n, k) = Sum_{j=0..k} (-1)^j*StirlingS1(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} (-1)^j*StirlingS1(n, n-j)*binomial(n, j) then T(n, k) = f(n, k) - f(n, 0) + 1.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 3, 1;
1, 10, 10, 1;
1, 25, 67, 25, 1;
1, 51, 281, 281, 51, 1;
1, 91, 646, 1036, 646, 91, 1;
1, 148, -1217, -12536, -12536, -1217, 148, 1;
1, 225, -31079, -287223, -548785, -287223, -31079, 225, 1;
MAPLE
with(combinat);
f:= proc(n, k) option remember; add((-1)^j*stirling1(n, n-j)*binomial(n, j), j=0..k) + add((-1)^j*stirling1(n, n-j)* binomial(n, j), j=0..n-k); end;
seq(seq(f(n, k) -f(n, 0) +1, k=0..n), n=0..10); # G. C. Greubel, Nov 26 2019
MATHEMATICA
f[n_, k_]:= Sum[(-1)^j*StirlingS1[n, n-j]*Binomial[n, j], {j, 0, k}] + Sum[(-1)^j*StirlingS1[n, n-j]*Binomial[n, j], {j, 0, n-k}];
Table[f[n, k] - f[n, 0] + 1, {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(PARI)
f(n, k) = sum(j=0, k, (-1)^j*stirling(n, n-j, 1)*binomial(n, j)) + sum(j=0, n-k, (-1)^j*stirling(n, n-j, 1)*binomial(n, j));
T(n, k) = f(n, k) - f(n, 0) + 1; \\ G. C. Greubel, Nov 26 2019
(Magma)
f:= func< n, k | (&+[(-1)^j*StirlingFirst(n, n-j)*Binomial(n, j): j in [0..k]]) + (&+[(-1)^j*StirlingFirst(n, n-j)*Binomial(n, j): j in [0..n-k]]) >;
[f(n, k) - f(n, 0) + 1: k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 26 2019
(Sage)
def f(n, k): return sum(stirling_number1(n, n-j)*binomial(n, j) for j in (0..k)) + sum(stirling_number1(n, n-j)*binomial(n, j) for j in (0..n-k))
[[f(n, k)-f(n, 0)+1 for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 26 2019
(GAP)
f:= function(n, k) return Sum([0..k], j-> Stirling1(n, n-j)*Binomial(n, j)) + Sum([0..n-k], j-> Stirling1(n, n-j)*Binomial(n, j)); end;
Flat(List([0..10], n-> List([0..n], k-> f(n, k)-f(n, 0)+1 ))); # 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 26 2019
STATUS
approved