cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A157013 Riordan's general Eulerian recursion: T(n, k) = (k+2)*T(n-1, k) + (n-k-1) * T(n-1, k-1) with T(n,1) = 1, T(n,n) = (-1)^(n-1).

Original entry on oeis.org

1, 1, -1, 1, -4, 1, 1, -15, 5, -1, 1, -58, 10, -6, 1, 1, -229, -66, -26, 7, -1, 1, -912, -1017, -288, 23, -8, 1, 1, -3643, -8733, -4779, -415, -41, 9, -1, 1, -14566, -61880, -63606, -17242, -1158, 40, -10, 1, 1, -58257, -396796, -691036, -375118, -60990, -1956, -60, 11, -1
Offset: 1

Views

Author

Roger L. Bagula, Feb 21 2009

Keywords

Comments

Row sums are {1, 0, -2, -10, -52, -314, -2200, -17602, -158420, -1584202, ...}.
This recursion set doesn't seem to produce the Eulerian 2nd A008517.
The Mathematica code gives ten sequences of which the first few are in the OEIS (see Crossrefs section). - G. C. Greubel, Feb 22 2019

Examples

			Triangle begins with:
1.
1,     -1.
1,     -4,       1.
1,    -15,       5,      -1.
1,    -58,      10,      -6,       1.
1,   -229,     -66,     -26,       7,     -1.
1,   -912,   -1017,    -288,      23,     -8,     1.
1,  -3643,   -8733,   -4779,    -415,    -41,     9,   -1.
1, -14566,  -61880,  -63606,  -17242,  -1158,    40,  -10,   1.
1, -58257, -396796, -691036, -375118, -60990, -1956,  -60,  11,  -1.
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 214-215

Crossrefs

Cf. A008517.
Cf. A157011 (m=0), A008292 (m=1), A157012 (m=2), this sequence (m=3).

Programs

  • 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_]:=(-1)^(n-1); T[n_,k_]:= T[n,k] = (k+2)*T[n-1,k] + (n-k-1)*T[n-1,k-1]; Table[T[n,k], {n,1,10}, {k,1,n}]//Flatten (* G. C. Greubel, Feb 22 2019 *)
  • PARI
    {T(n, k) = if(k==1, 1, if(k==n, (-1)^(n-1), (k+2)*T(n-1, k) + (n-k-1)* 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 (-1)^(n-1)
        else: return (k+2)*T(n-1, k) + (n-k-1)* T(n-1, k-1)
    [[T(n, k) for k in (1..n)] for n in (1..10)] # G. C. Greubel, Feb 22 2019

Formula

e(n,k,m)= (k+m)*e(n-1, k, m) + (n-k+1-m)*e(n-1, k-1, m) with m=3.
T(n, k) = (k+2)*T(n-1, k) + (n-k-1)*T(n-1, k-1) with T(n,1) = 1, T(n,n) = (-1)^(n-1). - G. C. Greubel, Feb 22 2019