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-10 of 10 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

A045500 Fifth-from-right diagonal of triangle A121207.

Original entry on oeis.org

1, 1, 6, 27, 125, 635, 3488, 20425, 126817, 831915, 5744784, 41618459, 315388311, 2493721645, 20526285716, 175529425815, 1556577220651, 14290644428279, 135624265589086, 1328702240382589, 13420603191219111, 139592874355534071
Offset: 0

Views

Author

Keywords

Comments

With leading 0 and offset 4: number of permutations beginning with 54321 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
a(n) is the number of set partitions of {1,2,...,n+4} in which the last block has length 4: the blocks are arranged in order of their least element. - Don Knuth, Jun 12 2017

References

  • See also references under sequence A040027.

Crossrefs

Column k=4 of A124496.

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n+3, k+4]*a[k], {k, 0, n-1}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 14 2018, after Vladeta Jovovic *)
  • PARI
    {a(n)=local(A=1+x); for(i=1, n, A=1+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^5); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
    
  • Python
    # The function Gould_diag is defined in A121207.
    A045500_list = lambda size: Gould_diag(5, size)
    print(A045500_list(24)) # Peter Luschny, Apr 24 2016

Formula

a(n+1) = Sum_{k=0..n} binomial(n+4, k+4)*a(k). - Vladeta Jovovic, Nov 10 2003
With offset 4, e.g.f.: x^4 + exp(exp(x))/24 * int[0..x, t^4*exp(-exp(t)+t) dt]. - Ralf Stephan, Apr 25 2004
O.g.f. satisfies: A(x) = 1 + x*A( x/(1-x) ) / (1-x)^5. - Paul D. Hanna, Mar 23 2012

Extensions

More terms from Vladeta Jovovic, Nov 10 2003
Entry revised by N. J. A. Sloane, Dec 11 2006

A045501 Third-from-right diagonal of triangle A121207.

Original entry on oeis.org

1, 1, 4, 14, 54, 233, 1101, 5625, 30846, 180474, 1120666, 7352471, 50772653, 367819093, 2787354668, 22039186530, 181408823710, 1551307538185, 13756835638385, 126298933271289, 1198630386463990, 11742905240821910
Offset: 1

Views

Author

Keywords

Comments

With leading 0 and offset 2: number of permutations beginning with 321 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
Second diagonal in table of binomial recurrence coefficients. Related to A040027. - Vladeta Jovovic, Feb 05 2008
Equals eigensequence of triangle A104712. - Gary W. Adamson, Apr 10 2009
a(n) is the number of set partitions of {1,2,...,n+1} in which the last block has length 2; the blocks are arranged in order of their least element. - Don Knuth, Jun 12 2017

Crossrefs

Cf. A104712. - Gary W. Adamson, Apr 10 2009
Column k=2 of A124496.

Programs

  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = Sum[Binomial[n, k+1]*a[k], {k, 0, n-1}];
    Array[a, 22] (* Jean-François Alcover, Jul 14 2018, after Vladeta Jovovic *)
  • PARI
    {a(n)=local(A=x+x^2); for(i=1, n, A=x+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^2); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
    
  • Python
    # The function Gould_diag is defined in A121207.
    A045501_list = lambda size: Gould_diag(3, size)
    print(A045501_list(24)) # Peter Luschny, Apr 24 2016

Formula

a(n+1) = Sum_{k=0..n} binomial(n+2, k+2)*a(k). - Vladeta Jovovic, Nov 10 2003
With offset 2, e.g.f.: x^2 + exp(exp(x))/2 * Integral_{0..x} t^2*exp(-exp(t)+t) dt. - Ralf Stephan, Apr 25 2004
G.f.: A(x) = Sum_{k>=0} x^(k+1)/((1-k*x)^2 * Product_{m=0..k} (1 - m*x)). - Vladeta Jovovic, Feb 05 2008
O.g.f. satisfies: A(x) = x + x*A( x/(1-x) ) / (1-x)^2. - Paul D. Hanna, Mar 23 2012

Extensions

More terms from Vladeta Jovovic, Nov 10 2003
Entry revised by N. J. A. Sloane, Dec 11 2006

A351817 G.f. A(x) satisfies: A(x) = 1 + x * A(x/(1 - x)^4) / (1 - x)^4.

Original entry on oeis.org

1, 1, 5, 23, 139, 1052, 9166, 90073, 989205, 11981051, 158149438, 2255926638, 34549223880, 564898101239, 9812669832553, 180324597042263, 3492960489714519, 71092066388237562, 1516044005669227542, 33788707128788508476, 785270646437483414261, 18992014442689191510460
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 20 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 21; A[] = 0; Do[A[x] = 1 + x A[x/(1 - x)^4]/(1 - x)^4 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n + 3 k + 2, n - k - 1] a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 21}]

Formula

a(0) = 1; a(n) = Sum_{k=0..n-1} binomial(n+3*k+2,n-k-1) * a(k).

A346059 G.f. A(x) satisfies: A(x) = 1 - x * A(x/(1 - x)) / (1 - x)^4.

Original entry on oeis.org

1, -1, -3, -2, 15, 62, 56, -566, -3318, -6241, 33022, 330939, 1211873, -1330691, -47459905, -310788796, -675462411, 7151217040, 93213242926, 515144576280, 122725585740, -27551616750331, -296570472858772, -1477869678576483, 3416889475636695, 146832017085068163, 1522825949942199537
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 03 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 26; A[] = 0; Do[A[x] = 1 - x A[x/(1 - x)]/(1 - x)^4 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[n_] := a[n] = -Sum[Binomial[n + 2, k + 3] a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 26}]

Formula

a(n+1) = -Sum_{k=0..n} binomial(n+3,k+3) * a(k).

A351283 G.f. A(x) satisfies: A(x) = 1 + x + x^2 * A(x/(1 - x)) / (1 - x)^4.

Original entry on oeis.org

1, 1, 1, 5, 16, 46, 142, 496, 1888, 7538, 31291, 135739, 617461, 2939215, 14575027, 75014471, 399901294, 2205630124, 12572140372, 73961880118, 448447331338, 2798640572516, 17956583819425, 118336081817953, 800278211629795, 5549154792085813, 39420390891260821
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 12 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 26; A[] = 0; Do[A[x] = 1 + x + x^2 A[x/(1 - x)]/(1 - x)^4 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n + 1, k + 3] a[k], {k, 0, n - 2}]; Table[a[n], {n, 0, 26}]

Formula

a(0) = a(1) = 1; a(n) = Sum_{k=0..n-2} binomial(n+1,k+3) * a(k).

A352861 a(n) = 1 + Sum_{k=0..n-1} binomial(n+2,k+3) * a(k).

Original entry on oeis.org

1, 2, 7, 28, 121, 570, 2911, 15968, 93433, 580162, 3806275, 26284368, 190415809, 1442982350, 11409436363, 93913277608, 803094241309, 7121757279798, 65383520552131, 620517308328812, 6079168380979213, 61402851498255790, 638674759049919079, 6833589979500278700
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 06 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = 1 + Sum[Binomial[n + 2, k + 3] a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 23}]
    nmax = 23; A[] = 0; Do[A[x] = 1/(1 - x) + x A[x/(1 - x)]/(1 - x)^4 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]

Formula

G.f. A(x) satisfies: A(x) = 1 / (1 - x) + x * A(x/(1 - x)) / (1 - x)^4.
a(0) = 1; a(n) = a(n-1) + Sum_{k=0..n-1} binomial(n+1,k+2) * a(k).

A352862 a(n) = 1 + Sum_{k=0..n-1} binomial(n+3,k+4) * a(k).

Original entry on oeis.org

1, 2, 8, 36, 170, 865, 4742, 27757, 172375, 1130865, 7809057, 56572404, 428710587, 3389749264, 27901667938, 238599540142, 2115876327408, 19425465343555, 184355895494512, 1806122902809371, 18242807108024625, 189750478368293523, 2030261803964224359, 22323607721661782198
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 06 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = 1 + Sum[Binomial[n + 3, k + 4] a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 23}]
    nmax = 23; A[] = 0; Do[A[x] = 1/(1 - x) + x A[x/(1 - x)]/(1 - x)^5 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]

Formula

G.f. A(x) satisfies: A(x) = 1 / (1 - x) + x * A(x/(1 - x)) / (1 - x)^5.
a(0) = 1; a(n) = a(n-1) + Sum_{k=0..n-1} binomial(n+2,k+3) * a(k).

A352863 a(0) = 1; a(n) = Sum_{k=0..n-1} binomial(n+3,k+3) * a(k).

Original entry on oeis.org

1, 4, 30, 260, 2625, 30296, 393372, 5675160, 90062775, 1559197420, 29242803018, 590638256572, 12781663255725, 295040675093360, 7236113219901240, 187911083837928048, 5150869386839932995, 148622674413214927140, 4502761102131604279590, 142914444471765753144820
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 06 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n + 3, k + 3] a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 19}]
    nmax = 19; CoefficientList[Series[D[x^3/(3! (2 - Exp[x])), {x, 3}], {x, 0, nmax}], x] Range[0, nmax]!

Formula

E.g.f.: d^3/dx^3 ( x^3 / (3!*(2 - exp(x))) ).
a(n) = A000292(n+1) * A000670(n).
Showing 1-10 of 10 results.