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 12 results. Next

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

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 4, 7, 11, 16, 24, 39, 67, 116, 196, 324, 534, 892, 1516, 2601, 4463, 7630, 13022, 22276, 38286, 66084, 114328, 197929, 342783, 594218, 1031794, 1794944, 3127450, 5455272, 9523812, 16640542, 29102938, 50951070, 89289998, 156616648, 274923328, 482945930, 848972814
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 23 2022

Keywords

Crossrefs

Programs

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

Formula

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

A365698 G.f. satisfies A(x) = 1 + x^5 / (1 - x*A(x)).

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 4, 7, 11, 16, 22, 31, 47, 76, 126, 207, 331, 517, 801, 1251, 1987, 3206, 5212, 8465, 13677, 21997, 35341, 56937, 92169, 149860, 244274, 398383, 649379, 1058055, 1724575, 2814475, 4600923, 7533150, 12347908, 20252837, 33230545
Offset: 0

Views

Author

Seiichi Manyama, Sep 16 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\5, binomial(n-4*k-1, n-5*k)*binomial(n-5*k+1, k)/(n-5*k+1));

Formula

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

A346503 G.f. A(x) satisfies A(x) = 1 + x^3 * A(x)^2 / (1 - x).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 3, 5, 7, 14, 26, 43, 79, 148, 264, 483, 903, 1664, 3080, 5771, 10795, 20209, 38059, 71799, 135569, 256762, 487310, 925981, 1762841, 3361897, 6419595, 12275301, 23505143, 45061424, 86485016, 166176499, 319630115, 615387675, 1185940209, 2287527119, 4416083429
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 21 2021

Keywords

Crossrefs

Programs

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

Formula

a(0) = 1, a(1) = a(2) = 0; a(n) = a(n-1) + Sum_{k=0..n-3} a(k) * a(n-k-3).
a(n) ~ 2^(n+1) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Jul 30 2021
From Seiichi Manyama, Sep 26 2024: (Start)
G.f.: 2/(1 + sqrt(1 - 4*x^3/(1 - x))).
a(n) = Sum_{k=0..floor(n/3)} binomial(2*k,k) * binomial(n-2*k-1,n-3*k) / (k+1). (End)

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

Original entry on oeis.org

1, 1, 0, 1, 3, 4, 6, 14, 28, 49, 95, 196, 386, 754, 1524, 3102, 6258, 12700, 26032, 53440, 109772, 226457, 468863, 972300, 2020274, 4208530, 8784556, 18365322, 38461110, 80682740, 169501696, 356579216, 751138916, 1584281062, 3345404514, 7072055268, 14965933024, 31702754496
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 21 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 37; A[] = 0; Do[A[x] = 1 + x + x^3 A[x]^2/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = a[1] = 1; a[2] = 0; a[n_] := a[n] = a[n - 1] + Sum[a[k] a[n - k - 3], {k, 0, n - 3}]; Table[a[n], {n, 0, 37}]
    CoefficientList[Series[(1 - x)*(1 - Sqrt[(1 - x - 4*x^3 - 4*x^4)/(1 - x)]) / (2*x^3), {x, 0, 40}], x] (* Vaclav Kotesovec, Sep 27 2023 *)

Formula

a(0) = a(1) = 1, a(2) = 0; a(n) = a(n-1) + Sum_{k=0..n-3} a(k) * a(n-k-3).
G.f.: (1-x)*(1 - sqrt((1 - x - 4*x^3 - 4*x^4)/(1-x))) / (2*x^3). - Vaclav Kotesovec, Sep 27 2023

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

Original entry on oeis.org

1, 1, 1, 1, 0, -2, -5, -9, -12, -10, 3, 35, 91, 163, 215, 163, -136, -858, -2107, -3675, -4639, -2879, 5161, 23741, 54910, 91988, 108843, 47483, -186582, -700420, -1527461, -2440985, -2656442, -507076, 6617735, 21456279, 44213835, 67037683, 65541879, -9699085, -232548686
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 06 2021

Keywords

Crossrefs

Programs

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

Formula

G.f.: (-1 + x + sqrt((1 - x)^2 + 4*x^4)) / (2*x^4).
a(0) = 1; a(n) = a(n-1) - Sum_{k=0..n-4} a(k) * a(n-k-4).
a(n) = Sum_{k=0..floor(n/4)} (-1)^k * binomial(n-2*k,2*k) * Catalan(k).
a(n) = F([(1-n)/4, (2-n)/4, (3-n)/4, -n/4], [2, (1-n)/2, -n/2], -64), where F is the generalized hypergeometric function. - Stefano Spezia, Nov 07 2021

A359364 Triangle read by rows. The Motzkin triangle, the coefficients of the Motzkin polynomials. M(n, k) = binomial(n, k) * CatalanNumber(k/2) if k is even, otherwise 0.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 6, 0, 2, 1, 0, 10, 0, 10, 0, 1, 0, 15, 0, 30, 0, 5, 1, 0, 21, 0, 70, 0, 35, 0, 1, 0, 28, 0, 140, 0, 140, 0, 14, 1, 0, 36, 0, 252, 0, 420, 0, 126, 0, 1, 0, 45, 0, 420, 0, 1050, 0, 630, 0, 42, 1, 0, 55, 0, 660, 0, 2310, 0, 2310, 0, 462, 0
Offset: 0

Views

Author

Peter Luschny, Jan 09 2023

Keywords

Comments

The generalized Motzkin numbers M(n, k) are a refinement of the Motzkin numbers M(n) (A001006) in the sense that they are coefficients of polynomials M(n, x) = Sum_{n..k} M(n, k) * x^k that take the value M(n) at x = 1. The coefficients of x^n are the aerated Catalan numbers A126120.
Variants are the irregular triangle A055151 with zeros deleted, A097610 with reversed rows, A107131 and A080159.
In the literature the name 'Motzkin triangle' is also used for the triangle A026300, which is generated from the powers of the generating function of the Motzkin numbers.

Examples

			Triangle M(n, k) starts:
[0] 1;
[1] 1, 0;
[2] 1, 0,  1;
[3] 1, 0,  3, 0;
[4] 1, 0,  6, 0,   2;
[5] 1, 0, 10, 0,  10, 0;
[6] 1, 0, 15, 0,  30, 0,   5;
[7] 1, 0, 21, 0,  70, 0,  35, 0;
[8] 1, 0, 28, 0, 140, 0, 140, 0,  14;
[9] 1, 0, 36, 0, 252, 0, 420, 0, 126, 0;
		

Crossrefs

Cf. A001006 (Motzkin numbers), A026300 (Motzkin gf. triangle), A126120 (aerated Catalan), A000108 (Catalan).

Programs

  • Maple
    CatalanNumber := n -> binomial(2*n, n)/(n + 1):
    M := (n, k) -> ifelse(irem(k, 2) = 1, 0, CatalanNumber(k/2)*binomial(n, k)):
    for n from 0 to 9 do seq(M(n, k), k = 0..n) od;
    # Alternative, as coefficients of polynomials:
    p := n -> hypergeom([(1 - n)/2, -n/2], [2], (2*x)^2):
    seq(print(seq(coeff(simplify(p(n)), x, k), k = 0..n)), n = 0..9);
    # Using the exponential generating function:
    egf := exp(x)*BesselI(1, 2*x*t)/(x*t): ser:= series(egf, x, 11):
    seq(print(seq(coeff(simplify(n!*coeff(ser, x, n)), t, k), k = 0..n)), n = 0..9);
  • Python
    from functools import cache
    @cache
    def M(n: int, k: int) -> int:
        if k %  2: return 0
        if n <  3: return 1
        if n == k: return (2 * (n - 1) * M(n - 2, n - 2)) // (n // 2 + 1)
        return (M(n - 1, k) * n) // (n - k)
    for n in range(10): print([M(n, k) for k in range(n + 1)])

Formula

Let p(n, x) = hypergeom([(1 - n)/2, -n/2], [2], (2*x)^2).
p(n, 1) = A001006(n); p(n, sqrt(2)) = A025235(n); p(n, 2) = A091147(n).
p(2, n) = A002522(n); p(3, n) = A056107(n).
p(n, n) = A359649(n); 2^n*p(n, 1/2) = A000108(n+1).
M(n, k) = [x^k] p(n, x).
M(n, k) = [t^k] (n! * [x^n] exp(x) * BesselI(1, 2*t*x) / (t*x)).
M(n, k) = [t^k][x^n] ((1 - x - sqrt((x-1)^2 - (2*t*x)^2)) / (2*(t*x)^2)).
M(n, n) = A126120(n).
M(n, n-1) = A138364(n), the number of Motzkin n-paths with exactly one flat step.
M(2*n, 2*n) = A000108(n), the number of peakless Motzkin paths having a total of n up and level steps.
M(4*n, 2*n) = A359647(n), the central terms without zeros.
M(2*n+2, 2*n) = A002457(n) = (-4)^n * binomial(-3/2, n).
Sum_{k=0..n} M(n - k, k) = A023426(n).
Sum_{k=0..n} k * M(n, k) = 2*A014531(n-1) = 2*GegenbauerC(n - 2, -n, -1/2).
Sum_{k=0..n} i^k*M(n, k) = A343773(n), (i the imaginary unit), is the excess of the number of even Motzkin n-paths (A107587) over the odd ones (A343386).
Sum_{k=0..n} Sum_{j=0..k} M(n, j) = A189912(n).
Sum_{k=0..n} Sum_{j=0..k} M(n, n-j) = modified A025179(n).
For a recursion see the Python program.

A364552 G.f. satisfies A(x) = 1 + x*A(x) + x^4*A(x)^3.

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 11, 21, 39, 78, 169, 373, 808, 1727, 3719, 8153, 18100, 40315, 89770, 200250, 448755, 1010685, 2284295, 5173961, 11740697, 26699780, 60863291, 139045991, 318247190, 729572315, 1675085099, 3851795549, 8869990949, 20453679944, 47223844863
Offset: 0

Views

Author

Seiichi Manyama, Jul 28 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\4, binomial(n-k, 3*k)*binomial(3*k, k)/(2*k+1));

Formula

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

A365695 G.f. satisfies A(x) = 1 + x^3*A(x)^5 / (1 - x*A(x)).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 6, 12, 19, 62, 156, 318, 852, 2254, 5262, 13441, 35543, 88772, 226880, 596937, 1539188, 3980364, 10468270, 27410289, 71702956, 189169352, 499529048, 1318355542, 3493861461, 9278408639, 24647900618, 65620808508, 175037591303, 467277998136
Offset: 0

Views

Author

Seiichi Manyama, Sep 16 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\3, binomial(n-2*k-1, n-3*k)*binomial(n+2*k+1, k)/(n+2*k+1));

Formula

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

A365694 G.f. satisfies A(x) = 1 + x^3*A(x)^2 / (1 - x*A(x)).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 3, 6, 10, 20, 42, 84, 170, 354, 740, 1549, 3269, 6945, 14811, 31711, 68177, 147091, 318313, 690837, 1503351, 3279445, 7169907, 15708485, 34482475, 75830981, 167042763, 368548926, 814341362, 1801867812, 3992172298, 8855912464, 19668236110
Offset: 0

Views

Author

Seiichi Manyama, Sep 16 2023

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2/(1 + x + Sqrt[1 + x*(-2 + x - 4*x^2)]), {x, 0, 20}], x] (* Vaclav Kotesovec, Sep 16 2023 *)
  • PARI
    a(n) = sum(k=0, n\3, binomial(n-2*k-1, n-3*k)*binomial(n-k+1, k)/(n-k+1));

Formula

a(n) = Sum_{k=0..floor(n/3)} binomial(n-2*k-1,n-3*k) * binomial(n-k+1,k) / (n-k+1).
G.f.: A(x) = 2/(1 + x + sqrt(1 + x*(-2 + x - 4*x^2))). - Vaclav Kotesovec, Sep 16 2023

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

Original entry on oeis.org

1, 0, 1, 2, 2, 4, 8, 13, 25, 49, 91, 177, 349, 681, 1349, 2693, 5377, 10806, 21820, 44163, 89721, 182868, 373616, 765341, 1571551, 3233690, 6667242, 13772469, 28498419, 59065838, 122606998, 254865837, 530507839, 1105663034, 2307131590, 4819623077, 10079039819, 21099213611, 44211213545
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 23 2022

Keywords

Crossrefs

Programs

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

Formula

G.f. A(x) satisfies: A(x) = 1 + x^2 * (1 + x * A(x)^2) / (1 - x).
Showing 1-10 of 12 results. Next