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

A108431 Triangle read by rows: T(n,k) is number of paths from (0,0) to (3n,0) that stay in the first quadrant (but may touch the horizontal axis), consisting of steps u=(2,1),U=(1,2), or d=(1,-1) and have k hills (a hill is either a ud or a Udd starting at the x-axis).

Original entry on oeis.org

1, 0, 2, 6, 0, 4, 34, 24, 0, 8, 274, 136, 72, 0, 16, 2266, 1168, 408, 192, 0, 32, 19738, 9880, 3720, 1088, 480, 0, 64, 177642, 87840, 32088, 10496, 2720, 1152, 0, 128, 1640050, 802216, 291048, 92096, 27680, 6528, 2688, 0, 256, 15445690, 7492240
Offset: 0

Views

Author

Emeric Deutsch, Jun 03 2005

Keywords

Comments

Row sums yield A027307. T(n,0) = A108432(n). T(n,n) = 2^n.

Examples

			Example T(2,2)=4 because we have udud, udUdd, Uddud and UddUdd.
Triangle begins:
1;
0,2;
6,0,4;
34,24,0,8;
...
		

Crossrefs

Programs

  • Maple
    A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3: G:=1/(1-z*A+2*z-2*z*t-z*A^2): Gserz:=simplify(series(G,z=0,12)): P[0]:=1: for n from 1 to 10 do P[n]:=sort(coeff(Gserz,z^n)) od: for n from 0 to 9 do seq(coeff(t*P[n],t^k),k=1..n+1) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; expand(`if`(y<0 or y>x, 0,
         `if`(x=0, 1, b(x-1, y-1, t)*`if`(t and y=1, z, 1)+
          b(x-1, y+2, is(y=0))+b(x-2, y+1, is(y=0)))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..n))(b(3*n, 0, false)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Oct 06 2015
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = Expand[If[y<0 || y>x, 0, If[x == 0, 1, b[x-1, y-1, t]*If[t && y == 1, z, 1] + b[x-1, y+2, y == 0] + b[x-2, y+1, y == 0]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, n}]][b[ 3*n, 0, False]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 25 2015, after Alois P. Heinz *)

Formula

G.f.: 1/(1-2tz+2z-zA-zA^2), where A=1+zA^2+zA^3 or, equivalently, A=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3 (the g.f. of A027307).

A108432 Number of paths from (0,0) to (3n,0) that stay in the first quadrant (but may touch the horizontal axis), consisting of steps u=(2,1),U=(1,2), or d=(1,-1) and have no hills (a hill is either a ud or a Udd starting at the x-axis).

Original entry on oeis.org

1, 0, 6, 34, 274, 2266, 19738, 177642, 1640050, 15445690, 147813706, 1433309194, 14052298690, 139063589370, 1387288675002, 13936344557354, 140859338668306, 1431424362057018, 14616361066692778, 149892742974500042, 1543146417012350050, 15942622531081651578
Offset: 0

Views

Author

Emeric Deutsch, Jun 03 2005

Keywords

Comments

Column 0 of A108431.
The radius of convergence of g.f. y(x) is r = (5*sqrt(5)-11)/2, with y(r) = (11*sqrt(5)+23)/38. - Vaclav Kotesovec, Mar 17 2014

Examples

			a(2)=6 because we have uudd, uUddd, Ududd, UdUddd, Uuddd and UUdddd.
		

Crossrefs

Programs

  • Maple
    g:=1/(1+2*z-z*A-z*A^2): A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3:gser:=series(g,z=0,27): 1,seq(coeff(gser,z^n),n=1..24);
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, 1, `if`(t and y=1, 0, b(x-1, y-1, t))+
          b(x-1, y+2, is(y=0))+b(x-2, y+1, is(y=0))))
        end:
    a:= n-> b(3*n, 0, false):
    seq(a(n), n=0..25);  # Alois P. Heinz, Oct 06 2015
  • Mathematica
    CoefficientList[Series[9/(3 + 18*x + 2*(3+x)*Cos[2/3*ArcSin[Sqrt[x]*(18+x)/(3+x)^(3/2)]] - 2*x*Sqrt[(3+x)/x]*Sin[1/3*ArcSin[Sqrt[x]*(18+x)/(3+x)^(3/2)]]), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 17 2014 *)
  • PARI
    {a(n)=local(y=1); for(i=1, n, y=-(-1 + 6*x*y - 5*x*y^2 - 12*x^2*y^2 - x*y^3 + 6*x^2*y^3 + 8*x^3*y^3) + (O(x^n))^3); polcoeff(y, n)}
    for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Mar 17 2014

Formula

G.f.: 1/(1+2z-zA-zA^2), where A=1+zA^2+zA^3 or, equivalently, A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3 (the g.f. of A027307).
G.f. y(x) satisfies: -1 + y + 6*x*y - 5*x*y^2 - 12*x^2*y^2 - x*y^3 + 6*x^2*y^3 + 8*x^3*y^3 = 0. - Vaclav Kotesovec, Mar 17 2014
a(n) ~ (11+5*sqrt(5))^n * sqrt(273965 + 122523*sqrt(5)) / (361 * sqrt(5*Pi) * n^(3/2) * 2^(n+3/2)). - Vaclav Kotesovec, Mar 17 2014
D-finite with recurrence 4*n*(2*n+1)*a(n) +3*(-70*n^2+83*n-34)*a(n-1) +11*(154*n^2-436*n+327)*a(n-2) +3*(-1042*n^2+4875*n-4627)*a(n-3) +2*(-4016*n^2+18260*n-21399)*a(n-4) +12*(-206*n^2+1383*n-2322)*a(n-5) -80*(n-4)*(2*n-9)*a(n-6)=0. - R. J. Mathar, Jul 26 2022

A108434 Number of paths from (0,0) to (3n,0) that stay in the first quadrant (but may touch the horizontal axis), consisting of steps u=(2,1),U=(1,2), or d=(1,-1) and have no hills of the form ud (a hill is either a ud or a Udd starting at the x-axis).

Original entry on oeis.org

1, 1, 7, 47, 361, 2977, 25775, 231103, 2127409, 19990241, 190957559, 1848911279, 18104425561, 178975914433, 1783843502047, 17906040994559, 180858717257185, 1836792828317761, 18745545101801063, 192145823547338927
Offset: 0

Views

Author

Emeric Deutsch, Jun 03 2005

Keywords

Comments

Column 0 of A108433.
The radius of convergence of g.f. y(x) is r = (5*sqrt(5)-11)/2, with y(r) = (2+sqrt(5))/3. - Vaclav Kotesovec, Mar 17 2014

Examples

			a(2)=7 because we have uudd, uUddd, UddUdd, Ududd, UdUddd, Uuddd and UUdddd.
		

Crossrefs

Programs

  • Maple
    g:=1/(1+z-z*A-z*A^2): A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3:gser:=series(g,z=0,27): 1,seq(coeff(gser,z^n),n=1..24);
  • PARI
    {a(n)=local(y=1+x); for(i=1, n, y=-(-1 + 3*x*y - 3*x*(1+x)*y^2 + x*(-1+2*x+x^2)*y^3) + (O(x^n))^3); polcoeff(y, n)}
    for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Mar 17 2014

Formula

G.f. = 1/(1+z-zA-zA^2), where A=1+zA^2+zA^3 or, equivalently, A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3 (the g.f. of A027307).
G.f. y(x) satisfies: -1+y + 3*x*y - 3*x*(1+x)*y^2 + x*(-1+2*x+x^2)*y^3 = 0. - Vaclav Kotesovec, Mar 17 2014
a(n) ~ (11+5*sqrt(5))^n * sqrt(123 + 55*sqrt(5)) / (9 * 5^(1/4) * sqrt(Pi) * n^(3/2) * 2^(n+3/2)). - Vaclav Kotesovec, Mar 17 2014
a(n) ~ phi^(5*n + 5) / (18 * 5^(1/4) * sqrt(Pi) * n^(3/2)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Sep 23 2017
D-finite with recurrence n*(2*n+1)*(n-2)*a(n) +2*(-13*n^3+36*n^2-29*n+9)*a(n-1) +4*(n-1)*(10*n^2-20*n+9)*a(n-2) +2*(13*n^3-42*n^2+41*n-9)*a(n-3) +n*(n-2)*(2*n-5)*a(n-4)=0. - R. J. Mathar, Jul 26 2022
Showing 1-3 of 3 results.