login
A272774
Triangle read by rows, T(n, k) = (n-k)*T(n-1, k-1) + k*T(n-1, k+1) except that T(n, k) = 0 if k<1 or k>n and T(n, n) = 1, for n>=0 and 0<=k<=n.
0
1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 4, 0, 1, 0, 4, 0, 11, 0, 1, 0, 0, 38, 0, 26, 0, 1, 0, 38, 0, 230, 0, 57, 0, 1, 0, 0, 688, 0, 1148, 0, 120, 0, 1, 0, 688, 0, 7572, 0, 5192, 0, 247, 0, 1, 0, 0, 20648, 0, 66200, 0, 22250, 0, 502, 0, 1
OFFSET
0,13
EXAMPLE
Triangle starts:
[1]
[0, 1]
[0, 0, 1]
[0, 1, 0, 1]
[0, 0, 4, 0, 1]
[0, 4, 0, 11, 0, 1]
[0, 0, 38, 0, 26, 0, 1]
[0, 38, 0, 230, 0, 57, 0, 1]
[0, 0, 688, 0, 1148, 0, 120, 0, 1]
[0, 688, 0, 7572, 0, 5192, 0, 247, 0, 1]
PROG
(Sage)
def T(n, k):
if n==k : return 1
if k<1 or k>n : return 0
return (n-k)*T(n-1, k-1)+k*T(n-1, k+1)
for n in range(12):
print([T(n, k) for k in range(n+1)])
CROSSREFS
Cf. A000522 (row sums).
Sequence in context: A111728 A359010 A143784 * A333274 A147311 A147312
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, May 06 2016
STATUS
approved