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-5 of 5 results.

A086810 Triangle obtained by adding a leading diagonal 1,0,0,0,... to A033282.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 5, 5, 0, 1, 9, 21, 14, 0, 1, 14, 56, 84, 42, 0, 1, 20, 120, 300, 330, 132, 0, 1, 27, 225, 825, 1485, 1287, 429, 0, 1, 35, 385, 1925, 5005, 7007, 5005, 1430, 0, 1, 44, 616, 4004, 14014, 28028, 32032, 19448, 4862, 0, 1, 54, 936, 7644, 34398, 91728
Offset: 0

Views

Author

Philippe Deléham, Aug 05 2003

Keywords

Comments

Mirror image of triangle A133336. - Philippe Deléham, Dec 10 2008
From Tom Copeland, Oct 09 2011: (Start)
With polynomials
P(0,t) = 0
P(1,t) = 1
P(2,t) = t
P(3,t) = t + 2 t^2
P(4,t) = t + 5 t^2 + 5 t^3
P(5,t) = t + 9 t^2 + 21 t^3 + 14 t^4
The o.g.f. A(x,t) = {1+x-sqrt[(1-x)^2-4xt]}/[2(1+t)] (see Drake et al.).
B(x,t)= x-t x^2/(1-x)= x-t(x^2+x^3+x^4+...) is the comp. inverse in x.
Let h(x,t) = 1/(dB/dx) = (1-x)^2/(1+(1+t)*x*(x-2)) = 1/(1-t(2x+3x^2+4x^3+...)), an o.g.f. in x for row polynomials in t of A181289. Then P(n,t) is given by (1/n!)(h(x,t)*d/dx)^n x, evaluated at x=0, A = exp(x*h(y,t)*d/dy) y, eval. at y=0, and dA/dx = h(A(x,t),t). These results are a special case of A133437 with u(x,t) = B(x,t), i.e., u_1=1 and (u_n)=-t for n > 1. See A001003 for t = 1. (End)
Let U(x,t) = [A(x,t)-x]/t, then U(x,0) = -dB(x,t)/dt and U satisfies dU/dt = UdU/dx, the inviscid Burgers' equation (Wikipedia), also called the Hopf equation (see Buchstaber et al.). Also U(x,t) = U(A(x,t),0) = U(x+tU,0) since U(x,0) = [x-B(x,t)]/t. - Tom Copeland, Mar 12 2012
Diagonals of A132081 are essentially rows of this sequence. - Tom Copeland, May 08 2012
T(r, s) is the number of [0,r]-covering hierarchies with s segments (see Kreweras). - Michel Marcus, Nov 22 2014
From Yu Hin Au, Dec 07 2019: (Start)
T(n,k) is the number of small Schröder n-paths (lattice paths from (0,0) to (2n,0) using steps U=(1,1), F=(2,0), D=(1,-1) with no F step on the x-axis) that has exactly k U steps.
T(n,k) is the number of Schröder trees (plane rooted tree where each internal node has at least two children) with exactly n+1 leaves and k internal nodes. (End)

Examples

			Triangle starts:
  1;
  0,  1;
  0,  1,  2;
  0,  1,  5,  5;
  0,  1,  9, 21, 14;
  ...
		

Crossrefs

The diagonals (except for A000007) are also the diagonals of A033282.
Row sums: A001003 (Schroeder numbers).

Programs

  • Mathematica
    Table[Boole[n == 2] + If[# == -1, 0, Binomial[n - 3, #] Binomial[n + # - 1, #]/(# + 1)] &[k - 1], {n, 2, 12}, {k, 0, n - 2}] // Flatten (* after Jean-François Alcover at A033282, or *)
    Table[If[n == 0, 1, Binomial[n, k] Binomial[n + k, k - 1]/n], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Aug 22 2016 *)
  • PARI
    t(n, k) = if (n==0, 1, binomial(n, k)*binomial(n+k, k-1)/n);
    tabl(nn) = {for (n=0, nn, for (k=0, n, print1(t(n,k), ", ");); print(););} \\ Michel Marcus, Nov 22 2014

Formula

Triangle T(n, k) read by rows; given by [0, 1, 0, 1, 0, 1, ...] DELTA [1, 1, 1, 1, 1, 1, 1, 1, 1, ...] where DELTA is Deléham's operator defined in A084938.
For k>0, T(n, k) = binomial(n-1, k-1)*binomial(n+k, k)/(n+1); T(0, 0) = 1 and T(n, 0) = 0 if n > 0. [corrected by Marko Riedel, May 04 2023]
Sum_{k>=0} T(n, k)*2^k = A107841(n). - Philippe Deléham, May 26 2005
Sum_{k>=0} T(n-k, k) = A005043(n). - Philippe Deléham, May 30 2005
T(n, k) = A108263(n+k, k). - Philippe Deléham, May 30 2005
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A001003(n), A107841(n), A131763(n), A131765(n), A131846(n), A131926(n), A131869(n), A131927(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, respectively. - Philippe Deléham, Nov 05 2007
Sum_{k=0..n} T(n,k)*5^k*(-2)^(n-k) = A152601(n). - Philippe Deléham, Dec 10 2008
Sum_{k=0..n} T(n,k)*(-1)^k*3^(n-k) = A154825(n). - Philippe Deléham, Jan 17 2009
Umbrally, P(n,t) = Lah[n-1,-t*a.]/n! = (1/n)*Sum_{k=1..n-1} binomial(n-2,k-1)a_k t^k/k!, where (a.)^k = a_k = (n-1+k)!/(n-1)!, the rising factorial, and Lah(n,t) = n!*Laguerre(n,-1,t) are the Lah polynomials A008297 related to the Laguerre polynomials of order -1. - Tom Copeland, Oct 04 2014
T(n, k) = binomial(n, k)*binomial(n+k, k-1)/n, for k >= 0; T(0, 0) = 1 (see Kreweras, p. 21). - Michel Marcus, Nov 22 2014
P(n,t) = Lah[n-1,-:Dt:]/n! t^(n-1) with (:Dt:)^k = (d/dt)^k t^k = k! Laguerre(k,0,-:tD:) with (:tD:)^j = t^j D^j. The normalized Laguerre polynomials of 0 order are given in A021009. - Tom Copeland, Aug 22 2016

Extensions

Typo in a(60) corrected by Michael De Vlieger, Nov 21 2019

A091593 Reversion of Jacobsthal numbers A001045.

Original entry on oeis.org

1, -1, -1, 5, -3, -21, 51, 41, -391, 407, 1927, -6227, -2507, 49347, -71109, -236079, 966129, 9519, -7408497, 13685205, 32079981, -167077221, 60639939, 1209248505, -2761755543, -4457338681, 30629783831, -22124857219, -206064020315, 572040039283, 590258340811
Offset: 0

Views

Author

Paul Barry, Jan 23 2004

Keywords

Comments

Hankel transform is (-2)^C(n+1,2). - Paul Barry, Apr 28 2009

Crossrefs

Programs

  • Maple
    a := n -> hypergeom([-n,-n-1], [2], -2);
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 22 2014
    # Using function CompInv from A357588.
    CompInv(25, n -> (2^n - (-1)^n)/3 ); # Peter Luschny, Oct 07 2022
  • Mathematica
    a[n_] := Hypergeometric2F1[-n - 1, -n - 1, 2, -2] + (n + 1)*Hypergeometric2F1[-n, -n, 3, -2]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 03 2016, after Vladimir Kruchinin *)
  • Maxima
    a(n) := hypergeometric([ -n - 1, -n - 1 ], [ 2 ], -2) + (n + 1) * hypergeometric([ -n, -n ], [ 3 ], -2); /* Vladimir Kruchinin, Oct 12 2011 */
    
  • Sage
    # Algorithm of L. Seidel (1877)
    def A091593_list(n) :
        D = [0]*(n+2); D[1] = 1
        R = []; b = false; h = 1
        for i in range(2*n) :
            if b :
                for k in range(1, h, 1) : D[k] += -2*D[k+1]
                R.append(D[1])
            else :
                for k in range(h, 0, -1) : D[k] += D[k-1]
                h += 1
            b = not b
        return R
    A091593_list(30)  # Peter Luschny, Oct 19 2012

Formula

G.f.: (-(1+x)+sqrt(1+2*x+9*x^2))/(4*x^2). - Corrected by Seiichi Manyama, May 12 2019
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*C(k)*(-1)^(n-k)*2^k, where C(n) is A000108(n). - Paul Barry, May 16 2005
G.f.: 1/(1+x+2x^2/(1+x+2x^2/(1+x+2x^2/(1+x+2x^2/(1+ ... (continued fraction). - Paul Barry, Apr 28 2009
a(n) = Sum_{i=0..n} (2^(i)*(-1)^(n-i)*binomial(n+1,i)^2*(n-i+1)/(i+1))/(n+1). - Vladimir Kruchinin, Oct 12 2011
Conjecture: (n+2)*a(n) +(2*n+1)*a(n-1) +9*(n-1)*a(n-2)=0. - R. J. Mathar, Nov 26 2012
a(n) = (-1)^n*hypergeom([-n/2, (1-n)/2], [2], -8). - Peter Luschny, May 28 2014
R. J. Mathar's conjecture confirmed by Maple using this hypergeom form. - Robert Israel, Sep 22 2014
a(n) = Sum_{k = 0..n} (-2)^k * (1/(n+1))*binomial(n+1, k)*binomial(n+1, k+1) = Sum_{k = 0..n} (-2)^k * N(n+1,k+1), where N(n,k) = A001263(n,k) are the Narayana numbers. - Peter Bala, Sep 01 2023

A336709 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(0,k) = 1 and T(n,k) = (1/n) * Sum_{j=1..n} (-2)^(n-j) * binomial(n,j) * binomial(n+(k-1)*j,j-1) for n > 0.

Original entry on oeis.org

1, 1, 1, 1, 1, -2, 1, 1, -1, 2, 1, 1, 0, -1, 4, 1, 1, 1, -1, 5, -24, 1, 1, 2, 2, 0, -3, 48, 1, 1, 3, 8, 5, 2, -21, 24, 1, 1, 4, 17, 36, 13, 0, 51, -464, 1, 1, 5, 29, 109, 177, 36, -5, 41, 1376, 1, 1, 6, 44, 240, 766, 922, 104, 0, -391, -704
Offset: 0

Views

Author

Seiichi Manyama, Aug 01 2020

Keywords

Examples

			Square array begins:
    1,   1,  1,  1,   1,    1,     1, ...
    1,   1,  1,  1,   1,    1,     1, ...
   -2,  -1,  0,  1,   2,    3,     4, ...
    2,  -1, -1,  2,   8,   17,    29, ...
    4,   5,  0,  5,  36,  109,   240, ...
  -24,  -3,  2, 13, 177,  766,  2177, ...
   48, -21,  0, 36, 922, 5699, 20910, ...
		

Crossrefs

Columns k=0-3 give: A307969(n-1), (-1)^n * A154825(n), A090192, A246555.
Main diagonal gives A336714.

Programs

  • Mathematica
    T[0, k_] := 1; T[n_, k_] := Sum[(-2)^(n - j) * Binomial[n, j] * Binomial[n + (k - 1)*j, j - 1], {j, 1, n}] / n; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Aug 01 2020 *)
  • PARI
    {T(n, k) = if(n==0, 1, sum(j=1, n, (-2)^(n-j)*binomial(n, j)*binomial(n+(k-1)*j, j-1))/n)}
    
  • PARI
    {T(n, k) = local(A=1+x*O(x^n)); for(i=0, n, A=1+x*A^k/(1+2*x*A)); polcoef(A, n)}

Formula

G.f. A_k(x) of column k satisfies A_k(x) = 1 + x * A_k(x)^k / (1 + 2 * x * A_k(x)).

A336727 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(0,k) = 1 and T(n,k) = (1/n) * Sum_{j=1..n} (-k)^(n-j) * binomial(n,j) * binomial(n,j-1) for n > 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -2, -1, 0, 1, 1, 1, -3, 1, 5, 2, 1, 1, 1, -4, 5, 10, -3, 0, 1, 1, 1, -5, 11, 9, -38, -21, -5, 1, 1, 1, -6, 19, -4, -103, 28, 51, 0, 1, 1, 1, -7, 29, -35, -174, 357, 289, 41, 14, 1, 1, 1, -8, 41, -90, -203, 1176, -131, -1262, -391, 0, 1
Offset: 0

Views

Author

Seiichi Manyama, Aug 02 2020

Keywords

Examples

			  1,  1,   1,   1,    1,    1,    1, ...
  1,  1,   1,   1,    1,    1,    1, ...
  1,  0,  -1,  -2,   -3,   -4,   -5, ...
  1, -1,  -1,   1,    5,   11,   19, ...
  1,  0,   5,  10,    9,   -4,  -35, ...
  1,  2,  -3, -38, -103, -174, -203, ...
  1,  0, -21,  28,  357, 1176, 2575, ...
		

Crossrefs

Columns k=0-3 give: A000012, A090192, (-1)^n * A154825(n), A336729.
Main diagonal gives A336728.

Programs

  • Mathematica
    T[0, k_] := 1; T[n_, k_] := Sum[If[k == 0, Boole[n == j],(-k)^(n - j)] * Binomial[n, j] * Binomial[n , j - 1], {j, 1, n}] / n; Table[T[k, n- k], {n, 0, 11}, {k, 0, n}] //Flatten (* Amiram Eldar, Aug 02 2020 *)
  • PARI
    {T(n, k) = if(n==0, 1, sum(j=1, n, (-k)^(n-j)*binomial(n, j)*binomial(n, j-1))/n)}
    
  • PARI
    {T(n, k) = local(A=1+x*O(x^n)); for(i=0, n, A=1+x*A/(1+k*x*A)); polcoef(A, n)}
    
  • PARI
    {T(n, k) = sum(j=0, n, (-k)^j*(k+1)^(n-j)*binomial(n, j)*binomial(n+j, n)/(j+1))}

Formula

G.f. A_k(x) of column k satisfies A_k(x) = 1 + x * A_k(x) / (1 + k * x * A_k(x)).
A_k(x) = 2/(1 - (k+1)*x + sqrt(1 + 2*(k-1)*x + ((k+1)*x)^2)).
T(n, k) = Sum_{j=0..n} (-k)^j * (k+1)^(n-j) * binomial(n,j) * binomial(n+j,n)/(j+1).
(n+1) * T(n,k) = -(k-1) * (2*n-1) * T(n-1,k) - (k+1)^2 * (n-2) * T(n-2,k) for n>1. - Seiichi Manyama, Aug 08 2020

A352687 Triangle read by rows, a Narayana related triangle whose rows are refinements of twice the Catalan numbers (for n >= 2).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 4, 1, 0, 1, 7, 12, 7, 1, 0, 1, 11, 30, 30, 11, 1, 0, 1, 16, 65, 100, 65, 16, 1, 0, 1, 22, 126, 280, 280, 126, 22, 1, 0, 1, 29, 224, 686, 980, 686, 224, 29, 1, 0, 1, 37, 372, 1512, 2940, 2940, 1512, 372, 37, 1
Offset: 0

Views

Author

Peter Luschny, Apr 26 2022

Keywords

Comments

This is the second triangle in a sequence of Narayana triangles. The first is A090181, whose n-th row is a refinement of Catalan(n), whereas here the n-th row of T is a refinement of 2*Catalan(n-1). We can show that T(n, k) <= A090181(n, k) for all n, k. The third triangle in this sequence is A353279, where also a recurrence for the general case is given.
Here we give a recurrence for the row polynomials, which correspond to the recurrence of the classical Narayana polynomials combinatorially proved by Sulanke (see link).
The polynomials have only real zeros and form a Sturm sequence. This follows from the recurrence along the lines given in the Chen et al. paper.
Some interesting sequences turn out to be the evaluation of the polynomial sequence at a fixed point (see the cross-references), for example the reversion of the Jacobsthal numbers A001045 essentially is -(-2)^n*P(n, -1/2).
The polynomials can also be represented as the difference between generalized Narayana polynomials, see the formula section.

Examples

			Triangle starts:
[0] 1;
[1] 0, 1;
[2] 0, 1,  1;
[3] 0, 1,  2,   1;
[4] 0, 1,  4,   4,   1;
[5] 0, 1,  7,  12,   7,   1;
[6] 0, 1, 11,  30,  30,  11,   1;
[7] 0, 1, 16,  65, 100,  65,  16,   1;
[8] 0, 1, 22, 126, 280, 280, 126,  22,  1;
[9] 0, 1, 29, 224, 686, 980, 686, 224, 29, 1;
		

Crossrefs

Cf. A090181 and A001263 (Narayana), A353279 (case 3), A000108 (Catalan), A145596, A172392 (central terms), A000124 (subdiagonal, column 2), A115143.
Essentially twice the Catalan numbers: A284016 (also A068875, A002420).
Values of the polynomial sequence: A068875 (row sums): P(1), A154955: P(-1), A238113: P(2)/2, A125695 (also A152681): P(-2), A054872: P(3)/2, P(3)/6 probable A234939, A336729: P(-3)/6, A082298: P(4)/5, A238113: 2^n*P(1/2), A154825 and A091593: 2^n*P(-1/2).

Programs

  • Maple
    T := (n, k) -> if n = k then 1 elif k = 0 then 0 else
    binomial(n, k)^2*(k*(2*k^2 + (n + 1)*(n - 2*k))) / (n^2*(n - 1)*(n - k + 1)) fi:
    seq(seq(T(n, k), k = 0..n), n = 0..10);
    # Alternative:
    gf := 1 - x + (1 + y)*(1 - x*(y - 1) - sqrt((x*y + x - 1)^2 - 4*x^2*y))/2:
    serx := expand(series(gf, x, 16)): coeffy := n -> coeff(serx, x, n):
    seq(seq(coeff(coeffy(n), y, k), k = 0..n), n = 0..10);
    # Using polynomial recurrence:
    P := proc(n, x) option remember; if n < 3 then [1, x, x + x^2] [n + 1] else
    ((2*n - 3)*(x + 1)*P(n - 1, x) - (n - 3)*(x - 1)^2*P(n - 2, x)) / n fi end:
    Trow := n -> seq(coeff(P(n, x), x, k), k = 0..n): seq(Trow(n), n = 0..10);
    # Represented by generalized Narayana polynomials:
    N := (n, k, x) -> add(((k+1)/(n-k))*binomial(n-k,j-1)*binomial(n-k,j+k)*x^(j+k), j=0..n-2*k): seq(print(ifelse(n=0, 1, expand(N(n,0,x) - N(n,1,x)))), n=0..7);
  • Mathematica
    H[0, ] := 1; H[1, x] := x;
    H[n_, x_] := x*(x + 1)*Hypergeometric2F1[1 - n, 2 - n, 2, x];
    Hrow[n_] := CoefficientList[H[n, x], x]; Table[Hrow[n], {n, 0, 9}] // TableForm
  • Python
    from math import comb as binomial
    def T(n, k):
        if k == n: return 1
        if k == 0: return 0
        return ((binomial(n, k)**2 * (k * (2 * k**2 + (n + 1) * (n - 2 * k))))
               // (n**2 * (n - 1) * (n - k + 1)))
    def Trow(n): return [T(n, k) for k in range(n + 1)]
    for n in range(10): print(Trow(n))
    
  • Python
    # The recursion with cache is (much) faster:
    from functools import cache
    @cache
    def T_row(n):
        if n < 3: return ([1], [0, 1], [0, 1, 1])[n]
        A = T_row(n - 2) + [0, 0]
        B = T_row(n - 1) + [1]
        for k in range(n - 1, 1, -1):
            B[k] = (((B[k] + B[k - 1]) * (2 * n - 3)
                   - (A[k] - 2 * A[k - 1] + A[k - 2]) * (n - 3)) // n)
        return B
    for n in range(10): print(T_row(n))

Formula

Explicit formula (additive form):
T(n, n) = 1, T(n > 0, 0) = 0 and otherwise T(n, k) = binomial(n, k)*binomial(n - 1, k - 1)/(n - k + 1) - 2*binomial(n - 1, k)*binomial(n - 1, k - 2)/(n - 1).
Multiplicative formula with the same boundary conditions:
T(n, k) = binomial(n, k)^2*(k*(2*k^2 + (n + 1)*(n - 2*k)))/(n^2*(n-1)*(n- k + 1)).
Bivariate generating function:
T(n, k) = [x^n] [y^k](1 - x + (1+y)*(1-x*(y-1) - sqrt((x*y+x-1)^2 - 4*x^2*y))/2).
Recursion based on polynomials:
T(n, k) = [x^k] (((2*n - 3)*(x + 1)*P(n - 1, x) - (n - 3)*(x - 1)^2*P(n - 2, x)) / n) with P(0, x) = 1, P(1, x) = x, and P(2, x) = x + x^2.
Recursion based on rows (see the second Python program):
T(n, k) = (((B(k) + B(k-1)) * (2*n - 3) - (A(k) - 2*A(k-1) + A(k-2))*(n-3))/n), where A(k) = T(n-2, k) and B(k) = T(n-1, k), for n >= 3.
Hypergeometric representation:
T(n, k) = [x^k] x*(x + 1)*hypergeom([1 - n, 2 - n], [2], x) for n >= 2.
Row sums:
Sum_{k=0..n} T(n, k) = (2/n)*binomial(2*(n - 1), n - 1) = A068875(n-1) for n >= 2.
A generalization of the Narayana polynomials is given by
N{n, k}(x) = Sum_{j=0..n-2*k}(((k + 1)/(n - k)) * binomial(n - k, j - 1) * binomial(n - k, j + k) * x^(j + k)).
N{n, 0}(x) are the classical Narayana polynomials A001263 and N{n, 1}(x) is a shifted version of A145596 based in (3, 2). Our polynomials are the difference P(n, x) = N{n, 0}(x) - N{n, 1}(x) for n >= 1.
Let RS(T, n) denote the row sum of the n-th row of T, then RS(T, n) - RS(A090181, n) = -4*binomial(2*n - 3, n - 3)/(n + 1) = A115143(n + 1) for n >= 3.
Showing 1-5 of 5 results.