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.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 5, 1, 0, 1, 18, 14, 1, 0, 1, 58, 110, 33, 1, 0, 1, 179, 672, 495, 72, 1, 0, 1, 543, 3583, 5163, 1917, 151, 1, 0, 1, 1636, 17590, 43730, 32154, 6808, 310, 1, 0, 1, 4916, 81812, 324190, 411574, 176272, 22904, 629, 1, 0
Offset: 0

Views

Author

Roger L. Bagula, Feb 21 2009

Keywords

Comments

Row sums are:
{1, 1, 2, 7, 34, 203, 1420, 11359, 102230, 1022299,...}.
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,    0.
1,    1,     0.
1,    5,     1,      0.
1,   18,    14,      1,      0.
1,   58,   110,     33,      1,      0.
1,  179,   672,    495,     72,      1,     0.
1,  543,  3583,   5163,   1917,    151,     1,   0.
1, 1636, 17590,  43730,  32154,   6808,   310,   1,   0.
1, 4916, 81812, 324190, 411574, 176272, 22904, 629,   1,   0.
		

References

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

Crossrefs

Cf. A008517.
Cf. A157011 (m=0), A008292 (m=1), This Sequence (m=2), A157013 (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_, 0]:= 1; T[n_, n_]:= 0; T[n_, k_]:= T[n, k] = (k+2)*T[n-1, k] +(n-k) *T[n-1, k-1]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Feb 22 2019 *)
  • PARI
    {T(n, k) = if(k==0, 1, if(k==n, 0, (k+2)*T(n-1, k) + (n-k)* T(n-1, k-1)))};
    for(n=0, 12, for(k=0, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Feb 22 2019
    
  • Sage
    def T(n, k):
        if (k==0): return 1
        elif (k==n): return 0
        else: return (k+2)*T(n-1, k) + (n-k)* T(n-1, k-1)
    [[T(n, k) for k in (0..n)] for n in (0..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) for m=2.
T(n,k) = (k+2)*T(n-1, k) + (n-k)*T(n-1, k-1), with T(n,0) = 1, T(n,n) = 0. - G. C. Greubel, Feb 22 2019

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

A180246 Triangle T(n,k) read by rows: T(n,k) = Sum_{j=0..k} (-1)^j *binomial(n+1,j)*(k+2-j)^n, 0 <= k < n.

Original entry on oeis.org

2, 4, -3, 8, -5, 4, 16, 1, 11, -5, 32, 51, 46, -14, 6, 64, 281, 337, 22, 22, -7, 128, 1163, 2472, 1121, 176, -27, 8, 256, 4257, 15703, 15493, 4419, 163, 37, -9, 512, 14563, 88354, 155980, 88486, 14398, 622, -44, 10, 1024, 47785, 455357, 1310024, 1310816, 454730, 48170, 848, 56, -11
Offset: 1

Views

Author

Roger L. Bagula, Aug 19 2010

Keywords

Comments

Row sums are apparently the 2nd column of A156984, 2, 1, 7, 23,...
Generalizes A008292 in the sense that a term "2" is added to the factor that is raised to the n-th power in the sum of the definition. A term "1" would generate A008292, too (up to index shifts).

Examples

			Triangle begins with:
     2;
     4,    -3;
     8,    -5,      4;
    16,     1,     11,      -5;
    32,    51,     46,     -14,       6;
    64,   281,    337,      22,      22,     -7;
   128,  1163,   2472,    1121,     176,    -27,     8;
   256,  4257,  15703,   15493,    4419,    163,    37,  -9;
   512, 14563,  88354,  155980,   88486,  14398,   622, -44, 10;
  1024, 47785, 455357, 1310024, 1310816, 454730, 48170, 848, 56, -11;
  ...
		

References

  • B. Harris and C J. Park, A generalization of Eulerian numbers with a probabilistic Application, Statistics and Probability Letters 20 (1994), page 40

Crossrefs

Programs

  • GAP
    Flat(List([1..12], n-> List([0..n-1], k-> Sum([0..k], j-> (-1)^j*Binomial(n+1, j)*(k-j+2)^n )))); # G. C. Greubel, Feb 23 2019
  • Magma
    [[(&+[(-1)^j*Binomial(n+1, j)*(k-j+2)^n: j in [0..k]]): k in [0..n-1]]: n in [1..12]]; // G. C. Greubel, Feb 23 2019
    
  • Maple
    A180246 := proc(n,k) add( (-1)^v*binomial(n+1,v)*(k+2-v)^n,v=0..k) ; end proc: # R. J. Mathar, Jan 29 2011
    P := proc(n,x) option remember; if n = 0 then 1 else
      (n*x+2*(1-x))*P(n-1,x)+x*(1-x)*diff(P(n-1,x),x);
      expand(%) fi end:
    A180246 := (n,k) -> coeff(P(n,x),x,k):
    seq(print(seq(A180246(n,k),k=0..n-1)),n=0..10);  # Peter Luschny, Mar 07 2014
  • Mathematica
    t[n_, j_, d_]:= Sum[(-1)^v *Binomial[n+1, v](j+d-v)^n, {v, 0, j}];
    Table[Flatten[Table[Table[t[n,k,m], {k,0,n-1}], {n,1,10}]], {m,0,10}]
    (* This sequence corresponds to m=2 *)
    Table[Sum[(-1)^j*Binomial[n+1, j]*(k-j+2)^n, {j,0,k}], {n,1,12}, {k,0,n-1}]//Flatten
  • PARI
    {T(n,k) = sum(j=0,k, (-1)^j*binomial(n+1, j)*(k-j+2)^n)};
    for(n=1,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 23 2019
    
  • Sage
    [[sum((-1)^j*binomial(n+1, j)*(k-j+2)^n for j in (0..k)) for k in (0..n-1)] for n in (1..12)] # G. C. Greubel, Feb 23 2019
    

Formula

T(n,k) = Sum_{j=0..k} (-1)^j *binomial(n+1,j)*(k+2-j)^n, for k=0..n-1.

A306547 Triangle read by rows, defined by Riordan's general Eulerian recursion: T(n, k) = (k+3)*T(n-1, k) + (n-k-2) * T(n-1, k-1) with T(n,1) = 1, T(n,n) = (-2)^(n-1).

Original entry on oeis.org

1, 1, -2, 1, -11, 4, 1, -55, 35, -8, 1, -274, 210, -91, 16, 1, -1368, 986, -637, 219, -32, 1, -6837, 3180, -3473, 1752, -507, 64, 1, -34181, -1431, -17951, 10543, -4563, 1147, -128, 1, -170900, -145310, -129950, 48442, -30524, 11470, -2555, 256, 1, -854494, -1726360, -1490890, -2314, -177832, 84176, -28105, 5627, -512
Offset: 1

Views

Author

G. C. Greubel, Feb 22 2019

Keywords

Comments

Row sums are {1, -1, -6, -27, -138, -831, -5820, -46563, -419070, -4190703, ...}.
The Mathematica code for e(n,k,m) gives eleven sequences of which the first few are in the OEIS (see Crossrefs section).

Examples

			Triangle begins with:
1.
1,      -2.
1,     -11,       4.
1,     -55,      35,      -8.
1,    -274,     210,     -91,    16.
1,   -1368,     986,    -637,   219,    -32.
1,   -6837,    3180,   -3473,  1752,   -507,    64.
1,  -34181,   -1431,  -17951, 10543,  -4563,  1147,  -128.
1, -170900, -145310, -129950, 48442, -30524, 11470, -2555, 256.
		

References

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

Crossrefs

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

Programs

  • Mathematica
    e[n_, 0, m_]:= 1; (* Example for m=3 *)
    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+3)*T[n-1, k] + (n-k-2)*T[n-1, k-1]; Table[T[n, k], {n, 1, 12}, {k, 1, n}]//Flatten
  • PARI
    {T(n, k) = if(k==1, 1, if(k==n, (-2)^(n-1), (k+3)*T(n-1, k) + (n-k-2)* T(n-1, k-1)))};
    for(n=1, 12, for(k=1, n, print1(T(n, k), ", ")))
    
  • Sage
    def T(n, k):
        if (k==1): return 1
        elif (k==n): return (-2)^(n-1)
        else: return (k+3)*T(n-1, k) + (n-k-2)* T(n-1, k-1)
    [[T(n, k) for k in (1..n)] for n in (1..12)]

Formula

T(n, k) = (k+3)*T(n-1, k) + (n-k-2)*T(n-1, k-1) with T(n,1) = 1, T(n,n) = (-2)^(n-1).
e(n,k,m)= (k+m)*e(n-1, k, m) + (n-k+1-m)*e(n-1, k-1, m) with m=3.
Showing 1-4 of 4 results.