[go: up one dir, main page]

login
A132005
Triangle, read by rows, where T(n,k) = n*T(n-1,k-1) + T(n-1,k-2) for n>0 and k>1, with T(n,0) = T(n-1,n-1) and T(n,1) = n*T(n-1,0) for n>0 and T(0,0) = 1.
2
1, 1, 1, 1, 2, 3, 3, 3, 7, 11, 11, 12, 15, 31, 51, 51, 55, 71, 87, 170, 286, 286, 306, 381, 481, 593, 1107, 1886, 1886, 2002, 2428, 2973, 3748, 4632, 8342, 14309, 14309, 15088, 17902, 21426, 26212, 32957, 40804, 71368, 122814, 122814, 128781, 150101, 176206
OFFSET
0,5
COMMENTS
Row sums yield factorials (A000142).
EXAMPLE
Triangle begins:
1;
1, 1;
1, 2, 3;
3, 3, 7, 11;
11, 12, 15, 31, 51;
51, 55, 71, 87, 170, 286;
286, 306, 381, 481, 593, 1107, 1886;
1886, 2002, 2428, 2973, 3748, 4632, 8342, 14309;
14309, 15088, 17902, 21426, 26212, 32957, 40804, 71368, 122814;
122814, 128781, 150101, 176206, 210736, 257334, 322825, 400193, 683116, 1176694;
...
MATHEMATICA
T[n_, k_] := T[n, k] = If[k < 0 || n < k, 0, If[n == 0 && k == 0, 1, If[k == 0, T[n - 1, n - 1], n*T[n - 1, k - 1] + T[n - 1, k - 2]]]]; Table[ T[n, k], {n, 0, 10}, {k, 0, n}] (* G. C. Greubel, Dec 15 2017 *)
PROG
(PARI) T(n, k)=if(k<0 || n<k, 0, if(n==0 && k==0, 1, if(k==0, T(n-1, n-1), n*T(n-1, k-1)+T(n-1, k-2))))
CROSSREFS
Cf. A132006 (column 0).
Sequence in context: A055081 A275379 A109833 * A222292 A088041 A334579
KEYWORD
nonn,tabl
AUTHOR
Paul D. Hanna, Aug 07 2007
STATUS
approved