OFFSET
0,3
REFERENCES
D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778.
LINKS
Seiichi Manyama, Antidiagonals n = 0..139, flattened
FORMULA
EXAMPLE
The array begins:
1, 2, 9, 66, 712, 10457, 198091, ...
1, 4, 26, 249, 3274, 56135, 1207433, ...
2, 11, 92, 1075, 16601, 325269, 7837862, ...
5, 36, 371, 5133, 91226, 2014321, 53840640, ...
15, 135, 1663, 26683, 537813, 13241402, 389498179, ...
52, 566, 8155, 149410, 3376696, 91914202, 2955909119, ...
203, 2610, 43263, 894124, 22451030, 670867539, 23456071495, ...
...
MAPLE
B := n -> combinat[bell](n):
P := proc(m, n) local k; global B; option remember;
if n = 0 then B(m) else
(1/2)*( P(m+2, n-1) + P(m+1, n-1) + add( binomial(n-1, k)*P(m, k), k=0..n-1) ); fi; end; # P(m, n) (which is Knuth's notation) is T(m, n)
MATHEMATICA
P[m_, n_] := P[m, n] = If[n == 0, BellB[m], (1/2)(P[m+2, n-1] + P[m+1, n-1] + Sum[Binomial[n-1, k] P[m, k], {k, 0, n-1}])];
Table[P[m-n, n], {m, 0, 8}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jan 02 2019, from Maple *)
PROG
(PARI) {T(n, k) = if(k==0, sum(j=0, n, stirling(n, j, 2)), (T(n+2, k-1)+T(n+1, k-1)+sum(j=0, k-1, binomial(k-1, j)*T(n, j)))/2)} \\ Seiichi Manyama, Nov 21 2020
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Dec 30 2018
STATUS
approved