OFFSET
1,3
COMMENTS
Row sums are apparently in A002627.
The Mathematica code gives ten sequences of which the first few are in the OEIS (see Crossrefs section). - G. C. Greubel, Feb 22 2019
LINKS
G. C. Greubel, Rows n = 1..100 of triangle, flattened
EXAMPLE
The triangle starts in row n=1 as:
1;
1, 2;
1, 5, 4;
1, 9, 23, 8;
1, 14, 82, 93, 16;
1, 20, 234, 607, 343, 32;
1, 27, 588, 2991, 3800, 1189, 64;
1, 35, 1365, 12501, 30155, 21145, 3951, 128;
1, 44, 3010, 47058, 195626, 256500, 108286, 12749, 256;
1, 54, 6416, 165254, 1111910, 2456256, 1932216, 522387, 40295, 512;
MAPLE
A157011 := proc(n, k) if k <0 or k >= n then 0; elif k =0 then 1; else k*procname(n-1, k)+(n-k+1)*procname(n-1, k-1) ; end if; end proc: # R. J. Mathar, Jun 18 2011
MATHEMATICA
e[n_, 0, m_]:= 1;
e[n_, k_, m_]:= 0 /; k >= n;
e[n_, k_, m_]:= (k+m)*e[n-1, k, m] + (n-k+1-m)*e[n-1, k-1, m];
Table[Flatten[Table[Table[e[n, k, m], {k, 0, n-1}], {n, 1, 10}]], {m, 0, 10}]
T[n_, 1]:= 1; T[n_, n_]:= 2^(n-1); T[n_, k_]:= T[n, k] = (k-1)*T[n-1, k] + (n-k+2)*T[n-1, k-1]; Table[T[n, k], {n, 1, 10}, {k, 1, n}]//Flatten (* G. C. Greubel, Feb 22 2019 *)
PROG
(PARI) {T(n, k) = if(k==1, 1, if(k==n, 2^(n-1), (k-1)*T(n-1, k) + (n-k+2)* T(n-1, k-1)))};
for(n=1, 10, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Feb 22 2019
(Sage)
def T(n, k):
if (k==1):
return 1
elif (k==n):
return 2^(n-1)
else: return (k-1)*T(n-1, k) + (n-k+2)* T(n-1, k-1)
[[T(n, k) for k in (1..n)] for n in (1..10)] # G. C. Greubel, Feb 22 2019
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Feb 21 2009
STATUS
approved