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

A154825 Reversion of x*(1-2*x)/(1-3*x).

Original entry on oeis.org

1, -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 15 2009

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40); Coefficients(R!( (1+3*x-Sqrt(1-2*x+9*x^2))/(4*x) )); // G. C. Greubel, May 24 2022
    
  • Maple
    A154825_list := proc(n) local j, a, w; a := array(0..n); a[0] := 1;
    for w from 1 to n do a[w] := -a[w-1]+2*add(a[j]*a[w-j-1],j=1..w-1)od;
    convert(a, list) end: A154825_list(28); # Peter Luschny, May 19 2011
  • Mathematica
    CoefficientList[Series[(1+3*x-Sqrt[1-2*x+9*x^2])/(4*x), {x, 0, 40}], x] (* Vaclav Kotesovec, Feb 08 2014 *)
  • SageMath
    [sum(binomial(n+k,n-k)*catalan_number(k)*2^k*(-3)^(n-k) for k in (0..n)) for n in (0..40)] # G. C. Greubel, May 24 2022

Formula

G.f.: (1+3*x-sqrt(1-2*x+9*x^2))/(4*x). - corrected by Vaclav Kotesovec, Feb 08 2014
G.f.: 1/(1+x/(1-2x/(1+x/(1-2x/(1+x/(1-2x/(1+.... (continued fraction).
a(n) = Sum_{k=0..n} binomial(n+k, 2k)*A000108(k)*2^k*(-3)^(n-k).
From Philippe Deléham, Jan 17 2009: (Start)
a(n) = Sum_{k=0..n} A131198(n,k)*(-1)^(n-k)*2^k.
a(n) = Sum_{k=0..n} A090181(n,k)*(-1)^k*2^(n-k).
a(n) = Sum_{k=0..n} A060693(n,k)*2^(n-k)*(-3)^k.
a(n) = Sum_{k=0..n} A088617(n,k)*2^k*(-3)^(n-k).
a(n) = Sum_{k=0..n} A086810(n,k)*(-1)^k*3^(n-k).
a(n) = Sum_{k=0..n} A133336(n,k)*3^k*(-1)^(n-k). (End)
D-finite with recurrence (n+1)*a(n) = (2*n-1)*a(n-1) - 9*(n-2)*a(n-2). - R. J. Mathar, Nov 15 2012
a(n) = (-3)^n*Hypergeometric2F1([-n, n+1], [2]; 2/3). - G. C. Greubel, May 24 2022

A147720 Riordan array (1, x(1-x)/(1-3x)).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 6, 4, 1, 0, 18, 16, 6, 1, 0, 54, 60, 30, 8, 1, 0, 162, 216, 134, 48, 10, 1, 0, 486, 756, 558, 248, 70, 12, 1, 0, 1458, 2592, 2214, 1168, 410, 96, 14, 1, 0, 4374, 8748, 8478, 5160, 2150, 628, 126, 16
Offset: 0

Views

Author

Paul Barry, Nov 11 2008

Keywords

Comments

Array [0,2,1,0,0,0,....] DELTA [1,0,0,0,......] for Deléham DELTA as in A084938.
Row sums are A001835. Diagonal sums are related to A030186.
Row sums of inverse are essentially A091593. A147720*A007318 is A147721.

Examples

			Triangle begins
1;
0,   1;
0,   2,   1;
0,   6,   4,   1;
0,  18,  16,   6,   1;
0,  54,  60,  30,   8,   1;
0, 162, 216, 134,  48,  10,   1;
		

Programs

  • Mathematica
    nmax=9; Flatten[CoefficientList[Series[CoefficientList[Series[(1-3*x)/(1-(3+y)*x+y*x^2), {x, 0, nmax}],x],{y,0,nmax}],y]] (* Indranil Ghosh, Mar 10 2017, after Philippe Deléham *)

Formula

Sum_{k=0..n} T(n,k)*x^k = A000007(n), A001835(n), A147722(n), A084120(n) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Nov 15 2008
G.f.: (1-3*x)/(1-(3+y)*x+y*x^2). - Philippe Deléham, Feb 15 2012

A125694 Riordan array ((1+3x-sqrt(1+2x+9x^2))/(2x),(1+3x-sqrt(1+2x+9x^2))/2).

Original entry on oeis.org

1, -2, 1, 2, -4, 1, 2, 8, -6, 1, -10, -4, 18, -8, 1, 6, -24, -26, 32, -10, 1, 42, 60, -18, -72, 50, -12, 1, -102, 24, 162, 48, -150, 72, -14, 1, -82, -388, -214, 248, 230, -268, 98, -16, 1, 782, 536, -546, -800, 158, 600, -434, 128, -18, 1
Offset: 0

Views

Author

Paul Barry, Nov 30 2006

Keywords

Comments

First column is A125695. Row sums are A091593. Inverse of A125693.

Examples

			Triangle begins
1,
-2, 1,
2, -4, 1,
2, 8, -6, 1,
-10, -4, 18, -8, 1,
6, -24, -26, 32, -10, 1,
42, 60, -18, -72, 50, -12, 1
		

Programs

  • Mathematica
    m = 9;
    T[0, 0] = 1; T[1, 0] = 2; T[1, 1] = 1; T[n_, k_] /; 0 <= k <= n := T[n, k] = 3 T[n - 1, k] + T[n - 1, k - 1] - T[n - 2, k - 1]; T[, ] = 0;
    M = Table[T[n, k], {n, 0, m}, {k, 0, m}] // Inverse;
    A[n_, k_] := M[[n + 1, k + 1]];
    Table[A[n, k], {n, 0, m}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 13 2019 *)
  • Sage
    A125694 = lambda n,k : (-3)^(n-k)*binomial(n,k)*hypergeometric([k-n, n+1], [k+2], 1/3)
    for n in (0..6): [round(A125694(n,k).n(100)) for k in (0..n)] # Peter Luschny, Sep 17 2014

Formula

T(n-1,k-1) = (k/n)*sum_{i=0..n-k} binomial(n,n-k-i) *(-3)^(n-k-i) *binomial(i+n-1,n-1). - Vladimir Kruchinin, Feb 12 2011
T(n, k) = (-3)^(n-k)*C(n,k)*hypergeometric([k-n, n+1], [k+2], 1/3). - Peter Luschny, Sep 17 2014

A125695 Expansion of (sqrt(1+2x+9x^2)+x-1)/(2x).

Original entry on oeis.org

1, 2, -2, -2, 10, -6, -42, 102, 82, -782, 814, 3854, -12454, -5014, 98694, -142218, -472158, 1932258, 19038, -14816994, 27370410, 64159962, -334154442, 121279878, 2418497010, -5523511086, -8914677362, 61259567662, -44249714438
Offset: 0

Views

Author

Paul Barry, Nov 30 2006, Dec 10 2008

Keywords

Comments

First column of A125694.
Hankel transform is (-2)^C(n+1, 2)*A001045(n+2).

Crossrefs

Cf. A091593.

Programs

  • Mathematica
    CoefficientList[Series[(Sqrt[1+2x+9x^2]+x-1)/(2x),{x,0,30}],x] (* Harvey P. Dale, Jul 25 2013 *)

Formula

a(n)=0^n+2*sum{k=0..floor((n-1)/2), C(n-1,2k)*C(k)*(-1)^(n-k-1)*2^k}, C(n)=A000108(n).
D-finite with recurrence: (n+1)*a(n) +(2*n-1)*a(n-1) +9*(n-2)*a(n-2)=0. - R. J. Mathar, Dec 02 2014

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.

A308035 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of 2/(1 - x + sqrt(1 - 2*x + (1+4*k)*x^2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -2, 1, 1, 1, -2, -5, -3, 1, 1, 1, -3, -8, -3, 1, 1, 1, 1, -4, -11, 1, 21, 11, 1, 1, 1, -5, -14, 9, 61, 51, 15, 1, 1, 1, -6, -17, 21, 121, 91, -41, -13, 1, 1, 1, -7, -20, 37, 201, 101, -377, -391, -77, 1
Offset: 0

Views

Author

Seiichi Manyama, May 10 2019

Keywords

Examples

			Square array begins:
   1,  1,   1,    1,     1,     1,     1, ...
   1,  1,   1,    1,     1,     1,     1, ...
   1,  0,  -1,   -2,    -3,    -4,    -5, ...
   1, -2,  -5,   -8,   -11,   -14,   -17, ...
   1, -3,  -3,    1,     9,    21,    37, ...
   1,  1,  21,   61,   121,   201,   301, ...
   1, 11,  51,   91,   101,    51,   -89, ...
   1, 15, -41, -377, -1203, -2729, -5165, ...
		

Crossrefs

Columns k=2..3 give (-1)^n * A091593, A308036.
Main diagonal gives A307947.

Programs

  • Mathematica
    T[n_, k_] := Sum[If[k == j == 0, 1, (-k)^j] * Binomial[n, 2*j] * CatalanNumber[j], {j, 0, Floor[n/2]}]; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, May 12 2021 *)

Formula

A(n,k) is the coefficient of x^n in the expansion of 1/(n+1) * (1 + x - k*x^2)^(n+1).
A(n,k) = Sum_{j=0..floor(n/2)} (-k)^j * binomial(n,j) * binomial(n-j,j)/(j+1) = Sum_{j=0..floor(n/2)} (-k)^j * binomial(n,2*j) * A000108(j).
(n+2) * A(n,k) = (2*n+1) * A(n-1,k) - (1+4*k) * (n-1) * A(n-2,k).
Showing 1-6 of 6 results.