login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Regular triangle, T(n, k) = f(n, k) - f(n, 0) + 1, where f(n, k) = Sum_{j=0..k} StirlingS2(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} StirlingS2(n, n-j)*binomial(n, j), read by rows.
5

%I #25 Sep 08 2022 08:45:52

%S 1,1,1,1,3,1,1,10,10,1,1,25,63,25,1,1,51,296,296,51,1,1,91,1060,2395,

%T 1060,91,1,1,148,3081,14008,14008,3081,148,1,1,225,7665,62909,127883,

%U 62909,7665,225,1,1,325,16948,230032,851758,851758,230032,16948,325,1

%N Regular triangle, T(n, k) = f(n, k) - f(n, 0) + 1, where f(n, k) = Sum_{j=0..k} StirlingS2(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} StirlingS2(n, n-j)*binomial(n, j), read by rows.

%C Row sum are: {1, 2, 5, 22, 115, 696, 4699, 34476, 269483, 2198128, 18229726, ...}.

%C The first negative terms are T(14,6) = T(14,8) = -17062199622 = a(111), T(14,7) = -38263538781, T(15,5) = T(15,10) = -18803914339, T(15,6) = T(15,9) = -315758882649, T(15,7) = T(15,8) = -1027328563614. - _Georg Fischer_, _Hugo Pfoertner_, Jul 16 2020

%H G. C. Greubel, <a href="/A176157/b176157.txt">Rows n = 0..100 of triangle, flattened</a>

%F With f(n, k) = Sum_{j=0..k} StirlingS2(n, n-j)*binomial(n,j) + Sum_{j=0..n-k} StirlingS2(n, n-j)*binomial(n, j) then T(n, k) = f(n, k) - f(n, 0) + 1.

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 3, 1;

%e 1, 10, 10, 1;

%e 1, 25, 63, 25, 1;

%e 1, 51, 296, 296, 51, 1;

%e 1, 91, 1060, 2395, 1060, 91, 1;

%e 1, 148, 3081, 14008, 14008, 3081, 148, 1;

%e 1, 225, 7665, 62909, 127883, 62909, 7665, 225, 1;

%e 1, 325, 16948, 230032, 851758, 851758, 230032, 16948, 325, 1;

%e 1, 451, 34191, 716796, 4390866, 7945116, 4390866, 716796, 34191, 451, 1;

%p with(combinat);

%p f:= proc(n, k) option remember; add(stirling2(n, n-j)*binomial(n, j), j=0..k) + add(stirling2(n, n-j)* binomial(n, j), j=0..n-k); end;

%p seq(seq(f(n,k) -f(n,0) +1, k=0..n), n=0..10); # _G. C. Greubel_, Nov 26 2019

%t f[n_, k_]:= Sum[StirlingS2[n, n-j]*Binomial[n, j], {j,0,k}] + Sum[StirlingS2[n, n-j]*Binomial[n, j], {j,0,n-k}];

%t Table[f[n, k] - f[n, 0] + 1, {n,0,10}, {k,0,n}]//Flatten

%o (PARI)

%o f(n,k) = sum(j=0,k, stirling(n,n-j,2)*binomial(n,j)) + sum(j=0,n-k, stirling(n, n-j,2)*binomial(n,j));

%o T(n,k) = f(n,k) - f(n,0) + 1; \\ _G. C. Greubel_, Nov 26 2019

%o (Magma)

%o f:= func< n,k | (&+[StirlingSecond(n,n-j)*Binomial(n,j): j in [0..k]]) + (&+[StirlingSecond(n,n-j)*Binomial(n,j): j in [0..n-k]]) >;

%o [f(n,k) - f(n,0) + 1: k in [0..n], n in [0..10]]; // _G. C. Greubel_, Nov 26 2019

%o (Sage)

%o def f(n, k): return sum(stirling_number2(n,n-j)*binomial(n,j) for j in (0..k)) + sum(stirling_number2(n, n-j)*binomial(n,j) for j in (0..n-k))

%o [[f(n, k)-f(n,0)+1 for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, Nov 26 2019

%o (GAP)

%o f:= function(n,k) return Sum([0..k], j-> Stirling2(n,n-j)*Binomial(n,j)) + Sum([0..n-k], j-> Stirling2(n, n-j)*Binomial(n,j)); end;

%o Flat(List([0..10], n-> List([0..n], k-> f(n, k)-f(n,0)+1 ))); # _G. C. Greubel_, Nov 26 2019

%Y Cf. A008277, A176153, A176154, A176155, A176156.

%K sign,tabl

%O 0,5

%A _Roger L. Bagula_, Apr 10 2010

%E Name edited by _G. C. Greubel_, Nov 26 2019