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.

A342912 a(n) = [x^n] (1 - 2*x - sqrt((1 - 3*x)/(1 + x)))/(2*x^3).

Original entry on oeis.org

1, 1, 3, 6, 15, 36, 91, 232, 603, 1585, 4213, 11298, 30537, 83097, 227475, 625992, 1730787, 4805595, 13393689, 37458330, 105089229, 295673994, 834086421, 2358641376, 6684761125, 18985057351, 54022715451, 154000562758, 439742222071, 1257643249140, 3602118427251
Offset: 0

Views

Author

Peter Luschny, Apr 18 2021

Keywords

Crossrefs

The diagonal sums of the Motzkin triangle A064189 (with the Motzkin numbers A001006 as first column), the row sums of A020474, and a shifted version of the Riordan numbers A005043.

Programs

  • Maple
    gf := (1 - 2*x - sqrt((1 - 3*x)/(1 + x)))/(2*x^3): ser := series(gf, x, 36):
    seq(coeff(ser, x, n), n = 0..30);
    a := proc(n) option remember; `if`(n < 3, [1, 1, 3][n + 1],
    ((2*a(n - 1) + 3*a(n - 2))*(n + 1))/(n + 3)) end: seq(a(n), n=0..30);
  • Mathematica
    a[n_] := (-1)^n*HypergeometricPFQ[{1/2, -2 - n}, {2}, 4]
    Table[a[n], {n, 0, 30}]
  • Python
    def rnum():
        a, b, n = 1, 3, 3
        yield 1
        yield 1
        while True:
            yield b
            n += 1
            a, b = b, (n*(3*a + 2*b))//(n + 2)
    A342912 = rnum()
    print([next(A342912) for _ in range(31)])

Formula

D-finite with recurrence a(n) = (2*a(n - 1) + 3*a(n - 2))*(n + 1)/(n + 3) for n >= 3.
a(n) = (-1)^n*hypergeom([1/2, -2 - n], [2], 4).
a(n) ~ (3^(n + 7/2)*(16*n + 11))/(128*sqrt(Pi)*(n + 2)^(5/2)).
G.f.: (M(x) - 1) / (x + x^2) where M(x) is the g.f. of A001006. - Werner Schulte, Jan 05 2025