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

A084605 G.f.: 1/(1-2x-15x^2)^(1/2); also, a(n) is the central coefficient of (1+x+4x^2)^n.

Original entry on oeis.org

1, 1, 9, 25, 145, 561, 2841, 12489, 60705, 281185, 1353769, 6418809, 30917041, 148331665, 716698425, 3462260265, 16786700865, 81464917185, 396215601225, 1929237099225, 9408084660945, 45928695279345, 224476389327705
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Comments

Also number of paths from (0,0) to (n,0) using steps U=(1,1), H=(1,0) and D=(1,-1), the U (or D) steps come in four colors. - N-E. Fahssi, Mar 30 2008
Ignoring initial term, equals the logarithmic derivative of A091147. - Paul D. Hanna, Dec 08 2018
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 10 2022

Crossrefs

Programs

  • Maple
    a := n -> simplify(2^n*GegenbauerC(n,-n, -1/4)):
    seq(a(n), n=0..22); # Peter Luschny, May 08 2016
  • Mathematica
    Table[n!*SeriesCoefficient[E^x*BesselI[0,4*x],{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 14 2012 *)
    a[n_] := Hypergeometric2F1[1/2 - n/2, -n/2, 1, 16];
    Table[a[n], {n, 0, 22}] (* Peter Luschny, Mar 18 2018 *)
  • PARI
    for(n=0,30,t=polcoeff((1+x+4*x^2)^n,n,x); print1(t","))
    for(n=0,20,print1(a(n),", "))
    
  • PARI
    {a(n) = sum(k=0,n, (-3)^(n-k)*2^k*binomial(n,k)*binomial(2*k,k))}
    for(n=0,20,print1(a(n),", ")) \\ Paul D. Hanna, Dec 09 2018

Formula

E.g.f.: exp(x)*BesselI(0, 4*x). - Vladeta Jovovic, Aug 20 2003
a(n) is also the central coefficient of (4+x+x^2)^n; a(n) = Sum_{k=0..n} 3^(n-k) C(n,k) T(k,n), where T(k,n) is the triangle of trinomial coefficients = Coefficient of x^n of (1+x+x^2)^k : A027907. - N-E. Fahssi, Mar 30 2008
a(n) = (1/Pi)*integral(x=-2..2, (2*x+1)^n/sqrt((2-x)*(2+x))). - Peter Luschny, Sep 12 2011
D-finite with recurrence a(n+2) = ((2*n+3)*a(n+1) + 15*(n+1)*a(n))/(n+2); a(0)=a(1)=1 - Sergei N. Gladkovskii, Aug 01 2012
a(n) ~ 5^(n+1/2)/(2*sqrt(2*Pi*n)). - Vaclav Kotesovec, Oct 14 2012
a(n) = 2^n*GegenbauerC(n, -n, -1/4). - Peter Luschny, May 08 2016
a(n) = hypergeom([1/2 - n/2, -n/2], [1], 16). - Peter Luschny, Mar 18 2018
a(n) = Sum_{k=0..n} (-3)^(n-k) * 2^k * binomial(n,k)*binomial(2*k,k). - Paul D. Hanna, Dec 09 2018
a(n) = Sum_{k=0..n} 5^(n-k) * (-2)^k * binomial(n,k)*binomial(2*k,k). - Seiichi Manyama, May 01 2019
a(n) = (1/4)^n * Sum_{k=0..n} (-3)^k * 5^(n-k) * binomial(2*k,k) * binomial(2*(n-k),n-k). - Seiichi Manyama, Aug 18 2025

A217275 Expansion of 2/(1-x+sqrt(1-2*x-27*x^2)).

Original entry on oeis.org

1, 1, 8, 22, 141, 561, 3291, 15583, 88691, 459187, 2599570, 14136200, 80391235, 450046143, 2579291352, 14710321998, 85002979083, 491050703739, 2859262171872, 16674374605722, 97747766045679, 574231140306699, 3385974360904227, 20009363692187115, 118582649963026677
Offset: 0

Views

Author

Vaclav Kotesovec, Sep 29 2012

Keywords

Crossrefs

Cf. A001006 (z=1), A025235 (z=2), A025237 (z=3), A091147 (z=4), A091148 (z=5), A091149 (z=6).

Programs

  • Mathematica
    Table[SeriesCoefficient[2/(1-x+Sqrt[1-2*x-27*x^2]),{x,0,n}],{n,0,25}]
    Table[Sum[Binomial[n,2k]*Binomial[2k,k]*7^k/(k+1),{k,0,n}],{n,0,25}]

Formula

Generally for G.f. = 2/(1-x+sqrt(1-2x-(4*z-1)*x^2)) is asymptotic
a(n) ~ (1+2*sqrt(z))^(n+3/2)/(2*sqrt(Pi)*z^(3/4)*n^(3/2)); here we have the case z=7.
D-finite with recurrence: (n+2)*a(n)=(2*n+1)*a(n-1)+(4*z-1)*(n-1)*a(n-2);; here with z=7.
G.f.: 1/(1 - x - 7*x^2/(1 - x - 7*x^2/(1 - x - 7*x^2/(1 - x - 7*x^2/(1 - ....))))), a continued fraction. - Ilya Gutkovskiy, May 26 2017

A306684 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, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 7, 9, 1, 1, 1, 5, 10, 21, 21, 1, 1, 1, 6, 13, 37, 61, 51, 1, 1, 1, 7, 16, 57, 121, 191, 127, 1, 1, 1, 8, 19, 81, 201, 451, 603, 323, 1, 1, 1, 9, 22, 109, 301, 861, 1639, 1961, 835, 1
Offset: 0

Views

Author

Seiichi Manyama, May 06 2019

Keywords

Examples

			Square array begins:
   1,   1,   1,    1,    1,    1,     1,     1, ...
   1,   1,   1,    1,    1,    1,     1,     1, ...
   1,   2,   3,    4,    5,    6,     7,     8, ...
   1,   4,   7,   10,   13,   16,    19,    22, ...
   1,   9,  21,   37,   57,   81,   109,   141, ...
   1,  21,  61,  121,  201,  301,   421,   561, ...
   1,  51, 191,  451,  861, 1451,  2251,  3291, ...
   1, 127, 603, 1639, 3445, 6231, 10207, 15583, ...
		

Crossrefs

Main diagonal gives A307906.

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).

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.

A322241 G.f.: exp( Sum_{n>=1} A084605(n)^2 * x^n/n ), where A084605(n) is the central coefficient in (1 + x + 4*x^2)^n.

Original entry on oeis.org

1, 1, 41, 249, 6305, 77569, 1665321, 27724889, 574252417, 10958980929, 228679916905, 4671350051321, 99292476904609, 2107949882690241, 45658568907254505, 993562984208479193, 21876513296218002433, 484448162130512673665, 10812975015547281792937, 242647271141110287979513, 5477046865641884201456033
Offset: 0

Views

Author

Paul D. Hanna, Dec 08 2018

Keywords

Comments

Compare to: exp( Sum_{n>=1} A084605(n) * x^n/n ) = (1-x - sqrt(1 - 2*x - 15*x^2))/(8*x^2), the g.f. of A091147.
Sequence A322240(n) = A084605(n)^2 has generating function 1 / AGM(1 + 15*x, sqrt((1 - 9*x)*(1 - 25*x)) ).

Examples

			G.f.: A(x) = 1 + x + 41*x^2 + 249*x^3 + 6305*x^4 + 77569*x^5 + 1665321*x^6 + 27724889*x^7 + 574252417*x^8 + 10958980929*x^9 + 228679916905*x^10 + ...
such that
log(A(x)) = x + 81*x^2/2 + 625*x^3/3 + 21025*x^4/4 + 314721*x^5/5 + 8071281*x^6/6 + 155975121*x^7/7 + 3685097025*x^8/8 + ... + A084605(n)^2 * x^n/n + ...
RELATED SERIES.
The g.f. of A084605 equals the series
1/sqrt(1 - 2*x - 15*x^2) = 1 + x + 9*x^2 + 25*x^3 + 145*x^4 + 561*x^5 + 2841*x^6 + 12489*x^7 + 60705*x^8 + 281185*x^9 + ... + A084605(n) * x^n/n + ...
		

Crossrefs

Programs

  • PARI
    {a(n)=if(n==0, 1, polcoeff(exp(sum(m=1, n, polcoeff(1/sqrt(1 - 2*x - 15*x^2 +x*O(x^m)), m)^2 *x^m/m)+x*O(x^n)), n))}
    for(n=0,30,print1(a(n),", "))

A344557 Triangle read by rows, T(n, k) = 2^(n - k)*M(n, k, 1/2, 1/2), where M(n, k, x, y) is a generalized Motzkin recurrence. T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 5, 2, 1, 13, 11, 3, 1, 57, 36, 18, 4, 1, 201, 165, 70, 26, 5, 1, 861, 646, 339, 116, 35, 6, 1, 3445, 2863, 1449, 595, 175, 45, 7, 1, 14897, 12104, 6692, 2744, 950, 248, 56, 8, 1, 63313, 53769, 29772, 13236, 4686, 1422, 336, 68, 9, 1
Offset: 0

Views

Author

Peter Luschny, May 25 2021

Keywords

Comments

The convolution triangle of A091147. - Peter Luschny, Oct 07 2022

Examples

			[0]     1;
[1]     1,     1;
[2]     5,     2,     1;
[3]    13,    11,     3,     1;
[4]    57,    36,    18,     4,    1;
[5]   201,   165,    70,    26,    5,    1;
[6]   861,   646,   339,   116,   35,    6,   1;
[7]  3445,  2863,  1449,   595,  175,   45,   7,  1;
[8] 14897, 12104,  6692,  2744,  950,  248,  56,  8, 1;
[9] 63313, 53769, 29772, 13236, 4686, 1422, 336, 68, 9, 1.
		

Crossrefs

A091147 (first column), A344558 (row sums).

Programs

  • Maple
    t := proc(n, k) option remember; if n = k then 1 elif k < 0 or n < 0 or k > n then 0 elif k = 0 then t(n-1, 0)/2 + t(n-1, 1) else t(n-1, k-1) + (1/2)*t(n-1, k) + t(n-1, k+1) fi end: T := (n, k) -> 2^(n-k) * t(n, k):
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Uses function PMatrix from A357368. Adds a row and column above and to the right.
    PMatrix(10, n -> simplify(hypergeom([1/2-n/2, 1-n/2], [2], 16))); # Peter Luschny, Oct 07 2022
  • Mathematica
    (* Uses function PMatrix from A357368 *)
    nmax = 9;
    M = PMatrix[nmax+2, HypergeometricPFQ[{1/2 - #/2, 1 - #/2}, {2}, 16]&];
    T[n_, k_] := M[[n+2, k+2]];
    Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 29 2023, after Peter Luschny *)

Formula

The generalized Motzkin recurrence M(n, k, x, y) is defined as follows:
If k < 0 or n < 0 or k > n then 0 else if n = 0 then 1 else if k = 0 then x*M(n-1, 0, x, y) + M(n-1, 1, x, y). In all other cases M(n, k, x, y) = M(n-1, k-1, x, y) + y*M(n-1, k, x, y) + M(n-1, k+1, x, y).

A272868 Triangle read by rows, T(n,k) = 2^k*GegenbauerC(k,-n,-1/4), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 1, 1, 1, 2, 9, 1, 3, 15, 25, 1, 4, 22, 52, 145, 1, 5, 30, 90, 285, 561, 1, 6, 39, 140, 495, 1206, 2841, 1, 7, 49, 203, 791, 2261, 6027, 12489, 1, 8, 60, 280, 1190, 3864, 11452, 27560, 60705, 1, 9, 72, 372, 1710, 6174, 20076, 54468, 134073, 281185
Offset: 0

Views

Author

Peter Luschny, May 08 2016

Keywords

Examples

			Triangle starts:
                                1;
                              1, 1;
                            1, 2, 9;
                          1, 3, 15, 25;
                       1, 4, 22, 52, 145;
                     1, 5, 30, 90, 285, 561;
                 1, 6, 39, 140, 495, 1206, 2841;
             1, 7, 49, 203, 791, 2261, 6027, 12489;
		

Crossrefs

Programs

  • Maple
    T := (n,k) -> simplify(2^k*GegenbauerC(k, -n, -1/4)):
    for n from 0 to 9 do seq(T(n,k), k=0..n) od;
  • Mathematica
    Table[If[n == 0, 1, 2^k GegenbauerC[k, -n, -1/4]], {n, 0, 9}, {k, 0, n}] // Flatten (* Michael De Vlieger, May 08 2016 *)

Formula

T(n,n) = A084605(n).
T(n,n-1) = A098520(n).
T(n+1,n)/(n+1) = A091147(n).
Showing 1-7 of 7 results.