login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157011 Triangle T(n,k) read by rows: T(n,k)= (k-1)*T(n-1,k) + (n-k+2)*T(n-1, k-1), with T(n,1)=1, for 1 <= k <= n, n >= 1. 5
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 (list; table; graph; refs; listen; history; text; internal format)
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
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
Cf. A000096 (column k=1), A002627, A008517.
Cf. This sequence (m=0), A008292 (m=1), A157012 (m=2), A157013 (m=3).
Sequence in context: A128718 A112358 A126351 * A246173 A092821 A238241
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Feb 21 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 21:57 EDT 2024. Contains 371254 sequences. (Running on oeis4.)