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.

A121207 Triangle read by rows. The definition is by diagonals. The r-th diagonal from the right, for r >= 0, is given by b(0) = b(1) = 1; b(n+1) = Sum_{k=0..n} binomial(n+2,k+r)*a(k).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 9, 15, 1, 1, 5, 14, 31, 52, 1, 1, 6, 20, 54, 121, 203, 1, 1, 7, 27, 85, 233, 523, 877, 1, 1, 8, 35, 125, 400, 1101, 2469, 4140, 1, 1, 9, 44, 175, 635, 2046, 5625, 12611, 21147, 1, 1, 10, 54, 236, 952, 3488, 11226, 30846, 69161, 115975
Offset: 0

Views

Author

N. J. A. Sloane, based on email from R. J. Mathar, Dec 11 2006

Keywords

Comments

From Paul D. Hanna, Dec 12 2006: (Start)
Consider the row reversal, which is A124496 with an additional left column (A000110 = Bell numbers). The matrix inverse of this triangle is very simple:
1;
-1, 1;
-1, -1, 1;
-1, -2, -1, 1;
-1, -3, -3, -1, 1;
-1, -4, -6, -4, -1, 1;
-1, -5, -10, -10, -5, -1, 1;
-1, -6, -15, -20, -15, -6, -1, 1;
-1, -7, -21, -35, -35, -21, -7, -1, 1;
-1, -8, -28, -56, -70, -56, -28, -8, -1, 1; ...
This gives the recurrence and explains why the Bell numbers appear. (End)
Triangle A160185 = reversal then deletes right border of 1's. - Gary W. Adamson, May 03 2009

Examples

			Triangle begins (compare also table 9.2 in the Gould-Quaintance reference):
  1;
  1, 1;
  1, 1,  2;
  1, 1,  3,  5;
  1, 1,  4,  9,  15;
  1, 1,  5, 14,  31, 52;
  1, 1,  6, 20,  54, 121, 203;
  1, 1,  7, 27,  85, 233, 523,  877;
  1, 1,  8, 35, 125, 400,1101, 2469,  4140;
  1, 1,  9, 44, 175, 635,2046, 5625, 12611, 21147;
  1, 1, 10, 54, 236, 952,3488,11226, 30846, 69161, 115975;
  1, 1, 11, 65, 309,1366,5579,20425, 65676,180474, 404663, 678570;
  1, 1, 12, 77, 395,1893,8494,34685,126817,407787,1120666,2512769,4213597;
		

Crossrefs

Diagonals, reading from the right, are A000110, A040027, A045501, A045499, A045500.
A124496 is a very similar triangle, obtained by reversing the rows and appending a rightmost diagonal which is A000110, the Bell numbers. See also A046936, A298804, A186020, A160185.
T(2n,n) gives A297924.

Programs

  • Julia
    function Gould_diag(diag, size)
        size < 1 && return []
        size == 1 && return [1]
        L = [1, 1]
        accu = ones(BigInt, diag)
        for _ in 1:size-2
            accu = cumsum(vcat(accu[end], accu))
            L = vcat(L, accu[end])
        end
    L end # Peter Luschny, Mar 30 2022
  • Maple
    # This is the Jovovic formula with general index 'd'
    # where A040027, A045499, etc. use one explicit integer
    # Index n+1 is shifted to n from the original formula.
    Gould := proc(n, d) local k;
        if n <= 1 then return 1 else
        return add(binomial(n-1+d, k+d)*Gould(k, d), k=0..n-1);
        fi
    end:
    # row and col refer to the extrapolated super-table:
    # working up to row, not row-1, shows also the Bell numbers
    # at the end of each row.
    for row from 0 to 13 do
        for col from 0 to row do
           # 'diag' is constant for one of A040027, A045499 etc.
           diag := row - col;
           printf("%4d, ", Gould(col, diag));
        od;
        print();
    od; # R. J. Mathar
    # second Maple program:
    T:= proc(n, k) option remember; `if`(k=0, 1,
          add(T(n-j, k-j)*binomial(n-1, j-1), j=1..k))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Jan 08 2018
  • Mathematica
    g[n_ /; n <= 1, ] := 1; g[n, d_] := g[n, d] = Sum[ Binomial[n-1+d, k+d]*g[k, d], {k, 0, n-1}]; Flatten[ Table[ diag = row-col; g[col, diag], {row, 0, 13}, {col, 0, row}]] (* Jean-François Alcover, Nov 25 2011, after R. J. Mathar *)
    T[n_, k_] := T[n, k] = If[k == 0, 1, Sum[T[n-j, k-j] Binomial[n-1, j-1], {j, 1, k}]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 26 2018, after Alois P. Heinz *)
  • Python
    # Computes the n-th diagonal of the triangle reading from the right.
    from itertools import accumulate
    def Gould_diag(diag, size):
        if size < 1: return []
        if size == 1: return [1]
        L, accu = [1,1], [1]*diag
        for _ in range(size-2):
            accu = list(accumulate([accu[-1]] + accu))
            L.append(accu[-1])
        return L # Peter Luschny, Apr 24 2016
    

A124496 Triangle read by rows: T(n,k) is the number of set partitions of {1,2,...,n} in which the size of the last block is k, 1<=k<=n; the blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 9, 4, 1, 1, 31, 14, 5, 1, 1, 121, 54, 20, 6, 1, 1, 523, 233, 85, 27, 7, 1, 1, 2469, 1101, 400, 125, 35, 8, 1, 1, 12611, 5625, 2046, 635, 175, 44, 9, 1, 1, 69161, 30846, 11226, 3488, 952, 236, 54, 10, 1, 1, 404663, 180474, 65676, 20425, 5579, 1366, 309, 65, 11, 1, 1
Offset: 1

Views

Author

Emeric Deutsch, Nov 14 2006

Keywords

Comments

Number of restricted growth functions of length n with a multiplicity k of the maximum value. RGF's are here defined as f(1)=1, f(i) <= 1+max_{1<=jR. J. Mathar, Mar 18 2016
This is table 9.2 in the Gould-Quaintance reference. - Peter Luschny, Apr 25 2016

Examples

			T(4,2) = 4 because we have 13|24, 14|23, 12|34 and 1|2|34.
Triangle starts:
  1;
  1,1;
  3,1,1;
  9,4,1,1;
  31,14,5,1,1;
  121,54,20,6,1,1;
  523,233,85,27,7,1,1;
  2469,1101,400,125,35,8,1,1;
  12611,5625,2046,635,175,44,9,1,1;
  69161,30846,11226,3488,952,236,54,10,1,1;
  404663,180474,65676,20425,5579,1366,309,65,11,1,1;
  2512769,1120666,407787,126817,34685,8494,1893,395,77,12,1,1;
  ...
		

Crossrefs

Row sums are the Bell numbers (A000110). It seems that T(n, 1), T(n, 2), T(n, 3) and T(n, 4) are given by A040027, A045501, A045499 and A045500, respectively. A121207 gives a very similar triangle.
T(2n,n) gives A297924.

Programs

  • Maple
    Q[1]:=t*s: for n from 2 to 12 do Q[n]:=expand(t*s*subs(t=1,Q[n-1])+s*diff(Q[n-1],s)+t*Q[n-1]-Q[n-1]) od:for n from 1 to 12 do P[n]:=sort(subs(s=1,Q[n])) od: for n from 1 to 12 do seq(coeff(P[n],t,j),j=1..n) od;
    # second Maple program:
    T:= proc(n, k) option remember; `if`(n=k, 1,
          add(T(n-j, k)*binomial(n-1, j-1), j=1..n-k))
        end:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Jul 05 2016
  • Mathematica
    T[n_, k_] := T[n, k] = If[n == k, 1, Sum[T[n-j, k]*Binomial[n-1, j-1], {j, 1, n-k}]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten; (* Jean-François Alcover, Jul 21 2016, after Alois P. Heinz *)

Formula

The row enumerating polynomial P[n](t)=Q[n](t,1), where Q[1](t,s)=ts and Q[n](t,s)=s*dQ[n-1](t,s)/ds +(t-1)Q[n-1](t,s)+tsQ[n-1](1,s) for n>=2.
A008275^-1*ONES*A008275 or A008277*ONES*A008277^-1 where ONES is a triangle with all entries = 1. [From Gerald McGarvey, Aug 20 2009]
Conjectures: T(n,n-3) = A000096(n). T(n,n-4)= A055831(n+1). - R. J. Mathar, Mar 13 2016

A186020 Eigentriangle of the binomial matrix.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 5, 3, 1, 1, 15, 9, 4, 1, 1, 52, 31, 14, 5, 1, 1, 203, 121, 54, 20, 6, 1, 1, 877, 523, 233, 85, 27, 7, 1, 1, 4140, 2469, 1101, 400, 125, 35, 8, 1, 1, 21147, 12611, 5625, 2046, 635, 175, 44, 9, 1, 1, 115975, 69161, 30846, 11226, 3488, 952, 236, 54, 10, 1, 1
Offset: 0

Views

Author

Paul Barry, Feb 10 2011

Keywords

Comments

Reversal of Gould triangle A121207. First column is A000110. Second column is A040027.
Row sums are A186021. Diagonal sums are A186022.
Construction is described by Paul D. Hanna in A121207. The method of construction is general for this class of eigentriangle.

Examples

			Triangle T begins
       1;
       1,     1;
       2,     1,     1;
       5,     3,     1,     1;
      15,     9,     4,     1,    1;
      52,    31,    14,     5,    1,   1;
     203,   121,    54,    20,    6,   1,   1;
     877,   523,   233,    85,   27,   7,   1,  1;
    4140,  2469,  1101,   400,  125,  35,   8,  1,  1;
   21147, 12611,  5625,  2046,  635, 175,  44,  9,  1, 1;
  115975, 69161, 30846, 11226, 3488, 952, 236, 54, 10, 1, 1;
Inverse is the identity matrix I minus binomial matrix B shifted down once, or
T^{-1}(n,k)=if(k=n,1,if(k<n,-binomial(n-1,k),0)). This begins
   1;
  -1,  1;
  -1, -1,   1;
  -1, -2,  -1,   1;
  -1, -3,  -3,  -1,   1;
  -1, -4,  -6,  -4,  -1,   1;
  -1, -5, -10, -10,  -5,  -1,   1;
  -1, -6, -15, -20, -15,  -6,  -1,  1;
  -1, -7, -21, -35, -35, -21,  -7, -1,  1;
  -1, -8, -28, -56, -70, -56, -28, -8, -1, 1;
Production matrix is
      1,     1;
      1,     0,    1;
      2,     1,    0,    1;
      5,     3,    1,    0,   1;
     15,     9,    4,    1,   0,   1;
     52,    31,   14,    5,   1,   0,  1;
    203,   121,   54,   20,   6,   1,  0, 1;
    877,   523,  233,   85,  27,   7,  1, 0, 1;
   4140,  2469, 1101,  400, 125,  35,  8, 1, 0, 1;
  21147, 12611, 5625, 2046, 635, 175, 44, 9, 1, 0, 1;
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := t[n, k] = If[k == 0, 1, Sum[t[n-j, k-j] Binomial[n-1, j-1], {j, 1, k}]];
    T[n_, k_] := t[n, n-k];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 27 2018 *)

Formula

Lower triangular (infinite) matrix T = (U - D*P)^{-1} with the unit matrix U, the Pascal matrix P from A007318 and the matrix D with elements delta_{i,j+1}, for i, j >= 0 (row 0 has only 0s). From the Paul Barry paper rewritten in matrix notation. T satisfies P*T = D'*(T - U), with D' the transposed matrix D, that is the diagonal of T has been erased and the row index shifted on the r.h.s. (showing that the name Eigentriangle or -matrix is a misnomer). For finite N X N matrices P*T = D'*(T - U), only up to the last row. - Wolfdieter Lang, Apr 07 2021

A309495 Triangle read by rows, derived from A007318, row sums = the Bell Sequence.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 6, 1, 4, 9, 17, 21, 1, 5, 14, 34, 67, 82, 1, 6, 20, 58, 148, 290, 354, 1, 7, 27, 90, 275, 701, 1368, 1671, 1, 8, 35, 131, 460, 1411, 3579, 6986, 8536, 1, 9, 44, 182, 716, 2536, 7738, 19620, 38315, 46814, 1, 10, 54, 244, 1057, 4213, 14846, 45251, 114798, 224189, 273907
Offset: 1

Views

Author

Gary W. Adamson, Aug 04 2019

Keywords

Comments

As described in A160185, we extract eigensequences of a rotated variant of Pascal's triangle:
1;
3, 1;
3, 2, 1;
1, 1, 1, 1;
Say, for these 4 columns, the eigensequence is (1, 4, 9, 15). Then preface the latter with a zero and take the first finite difference row, = (1, 3, 5, 6), fourth row of the triangle.

Examples

			Row 5 of A121207 is (1, 5, 14, 31, 52). Preface with a zero and take the first difference row:
     (0,  1,  5, 14, 31, 52)
  (..., 1,  4,  9, 17, 21) = row 5 of the triangle.
First few rows of the triangle:
  1;
  1, 1;
  1, 2,  2;
  1, 3,  5,  6;
  1, 4,  9, 17,  21;
  1, 5, 14, 34,  67,  82;
  1, 6, 20, 58, 148, 290, 354;
  ...
		

Crossrefs

Row sums are A000110.
Main diagonal is A032346.

Programs

  • PARI
    \\ here U(n) is A121207.
    U(n)={my(M=matrix(n,n)); for(n=1, n, M[n,1]=1; for(k=1, n-1, M[n,k+1]=sum(j=1, k, M[n-j, k-j+1]*binomial(n-2,j-1)))); M}
    T(n)={my(A=U(n+1)); vector(n, n, my(t=A[n+1,2..n+1]); t-concat([0], t[1..n-1]))}
    { my(A=T(10)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Feb 20 2022

Formula

T(n,k) = A121207(n,k) - A121207(n, k-1) for k >= 2.

Extensions

Terms a(37) and beyond from Andrew Howroyd, Feb 20 2022
Showing 1-4 of 4 results.