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.

Previous Showing 41-50 of 72 results. Next

A108441 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 having k U=(1,2) steps among the steps leading to the first d step.

Original entry on oeis.org

1, 1, 1, 3, 6, 1, 15, 39, 11, 1, 97, 284, 100, 16, 1, 721, 2249, 888, 186, 21, 1, 5827, 18890, 7977, 1952, 297, 26, 1, 49759, 165519, 72991, 19731, 3601, 433, 31, 1, 441729, 1496696, 680096, 196864, 40586, 5960, 594, 36, 1, 4035937, 13865297, 6439656
Offset: 0

Views

Author

Emeric Deutsch, Jun 08 2005

Keywords

Examples

			T(2,1)=6 because we have uUddd, Uddud, UddUdd, Ududd, UdUddd and Uuddd.
Triangle begins:
1;
1,1;
3,6,1;
15,39,11,1;
97,284,100,16,1;
		

Crossrefs

Row sums yield A027307. Column 0 yields A108442.

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-t*z*A^2): Gser:=simplify(series(G,z=0,12)): P[0]:=1: for n from 1 to 9 do P[n]:=coeff(Gser,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, false)+b(x-1, y+2, t)*
          `if`(t, z, 1)+b(x-2, y+1, t))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..n))(b(3*n, 0, true)):
    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, False] + b[x-1, y+2, t]*If[t, z, 1] + b[x-2, y+1, t]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, n}]][ b[3*n, 0, True]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 29 2016, after Alois P. Heinz *)

Formula

G.f.: G(t, z)=1/(1-zA-tzA^2)-1, where A=1+zA^2+zA^3=(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).

A108442 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 having only u steps among the steps leading to the first d step.

Original entry on oeis.org

1, 1, 3, 15, 97, 721, 5827, 49759, 441729, 4035937, 37702723, 358474735, 3457592161, 33748593841, 332730216579, 3308635650495, 33145196426753, 334193815799233, 3388807714823043, 34537227997917391, 353578650475659617, 3634495706671023505, 37496621681376849219, 388135791657414454815
Offset: 0

Views

Author

Emeric Deutsch, Jun 08 2005

Keywords

Examples

			a(2)=3 because we have udud, udUdd and uudd.
		

Crossrefs

Column 0 of A108441.

Programs

  • Maple
    A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3: gser:=series(1/(1-z*A),z=0,30): 1,seq(coeff(gser,z^n),n=1..25);
  • Mathematica
    Flatten[{1,Table[Sum[k*Sum[Binomial[2*n-k, i]*Binomial[3*n-2*k-i-1, 2*n-k-1], {i, 0, n-k}]/(2*n-k), {k, 1, n}],{n,1,20}]}] (* Vaclav Kotesovec, Mar 17 2014, after Vladimir Kruchinin *)
  • Maxima
    a(n):=if n=0 then 1 else sum((k*sum(binomial(2*n-k,i)*binomial(3*n-2*k-i-1,2*n-k-1),i,0,n-k))/(2*n-k),k,1,n); /* Vladimir Kruchinin, Oct 23 2011 */

Formula

G.f.: 1/(1-z*A), where A = 1 + z*A^2 + z*A^3 = (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).
a(n) = Sum_{k=1..n} (k*(Sum_{i=0..n-k} binomial(2*n-k, i)*binomial(3*n-2*k-i-1, 2*n-k-1))/(2*n-k)), n > 0, a(0)=1. - Vladimir Kruchinin, Oct 23 2011
G.f. y(x) satisfies: (3+x)*y*(1-y) + (1+x^2)*y^3 = 1. - Vaclav Kotesovec, Mar 17 2014
a(n) ~ (11+5*sqrt(5))^n / (5^(5/4) * sqrt(Pi) * n^(3/2) * 2^(n+1)). - Vaclav Kotesovec, Mar 17 2014
D-finite with recurrence (2*n-1)*(n-1)*a(n) +6*(n^2-10*n+13)*a(n-1) +(-310*n^2+1869*n-2759)*a(n-2) +48*(-n+3)*a(n-3) +(-310*n^2+1851*n-2705)*a(n-4) +6*(-n^2+2*n+11)*a(n-5) +(n-5)*(2*n-11)*a(n-6)=0. - R. J. Mathar, Jul 26 2022

A108448 Number of peaks of the form ud in all 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).

Original entry on oeis.org

1, 7, 61, 575, 5641, 56695, 579125, 5984767, 62390545, 654862247, 6911195501, 73265596607, 779594526361, 8321683861015, 89070157349221, 955598531432447, 10273391096237089, 110647714508386375, 1193641560393864605
Offset: 1

Views

Author

Emeric Deutsch, Jun 10 2005

Keywords

Comments

a(n) = Sum_{k=1..n} k*A108446(n,k). Example: a(3) = 1*32 + 2*13 + 3*1 = 61.

Examples

			a(2) = 7 because in the ten paths (ud)(ud), (ud)Udd, u(ud)d, uUddd, Udd(ud), UddUdd, Ud(ud)d, UdUddd, U(ud)dd and UUdddd (see A027307) we have 7 ud's (shown between parentheses).
		

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:=z*A/(1-2*z*A-3*z*A^2): Gser:=series(G,z=0,25): seq(coeff(Gser,z^n),n=1..23);
  • Mathematica
    RecurrenceTable[{(n-1)*(2*n-1)*a[n]==(18*n^2-26*n+1)*a[n-1] +(46*n^2-225*n+276)*a[n-2]+2*(n-3)*(2*n-5)*a[n-3], a[1]==1, a[2]==7, a[3]==61},a,{n,20}] (* Vaclav Kotesovec, Oct 18 2012 *)

Formula

G.f.: z*A/(1-2*z*A-3*z*A^2), where A=1+z*A^2+z*A^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).
Recurrence: (n-1)*(2*n-1)*a(n) = (18*n^2-26*n+1)*a(n-1) + (46*n^2-225*n+276)*a(n-2) + 2*(n-3)*(2*n-5)*a(n-3). - Vaclav Kotesovec, Oct 18 2012
a(n) ~ sqrt(70*sqrt(5)-150)*((11+5*sqrt(5))/2)^n/(20*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 18 2012. Equivalently, a(n) ~ phi^(5*n - 2) / (2 * 5^(1/4) * sqrt(Pi*n)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 07 2021
a(n) = Sum_{k=1..n} k*C(n-1,k-1)*C(2*n+k-1,n)/(n+k). - Vladimir Kruchinin, Mar 03 2014
a(n) = P(n-1,n,0,3), where P is the Jacobi Polynomial. - Richard Turk, Jun 27 2018
From Peter Bala, Feb 08 2024: (Start)
a(n) = Sum_{k = 0..n-1} binomial(2*n-1, k)*binomial(n-1, k)*2^k.
(n - 1)*(2*n - 1)*(10*n - 17)*a(n) = (220*n^3 - 814*n^2 + 950*n - 341)*a(n-1) + (n - 2)*(2*n - 3)*(10*n - 7)*a(n-2) with a(1) = 1 and a(2) = 7.. (End)

A108450 Number of pyramids in all 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) (a pyramid is a sequence u^pd^p or U^pd^(2p) for some positive integer p, starting at the x-axis).

Original entry on oeis.org

2, 10, 58, 402, 3122, 26010, 227050, 2049186, 18964194, 178976426, 1715905050, 16665027378, 163611970066, 1621103006010, 16189480081354, 162791835045698, 1646810150270914, 16748008972020554, 171135004105459194
Offset: 1

Views

Author

Emeric Deutsch, Jun 11 2005

Keywords

Comments

A108450(n)=sum(k*A108445(k),k=1..n) (for example, A108450(3)=1*18+2*8+3*8=58). A108450(n)=2*A108453(n). A108450 =2*partial sums of A032349.

Examples

			a(2)=10 because in the A027307(2)=10 paths we have altogether 10 pyramids (shown between parentheses): (ud)(ud), (ud)(Udd), (uudd), uUddd, (Udd)(ud), (Udd)(Udd), Ududd, UdUddd, Uuddd, (UUdddd).
		

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:=2*z*A^2/(1-z): gser:=series(g,z=0,25): seq(coeff(gser,z^n),n=1..22);
  • Mathematica
    Table[2 Sum[Sum[Binomial[2 k + 2, k - i] Binomial[2 k + i + 1, 2 k + 1], {i, 0, k}]/(k + 1), {k, 0, n - 1}], {n, 19}] (* Michael De Vlieger, Feb 29 2016 *)
  • Maxima
    a(n):=2*sum(sum(binomial(2*k+2,k-i)*binomial(2*k+i+1,2*k+1),i,0,k)/(k+1),k,0,n-1);
    /* Vladimir Kruchinin, Feb 29 2016 */
  • PARI
    {a(n)=local(y=2*x); for(i=1, n, y=(2*x*(2+y-x*y)^2)/((1-x)*(2-y+x*y)^2) + (O(x^n))^3); polcoeff(y, n)}
    for(n=1, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Mar 17 2014
    

Formula

G.f.: 2*z*A^2/(1-z), where A=1+z*A^2+z*A^3=(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: y = (2*x*(2+y-x*y)^2)/((1-x)*(2-y+x*y)^2). - Vaclav Kotesovec, Mar 17 2014
a(n) ~ (3*sqrt(5)-1) * ((11+5*sqrt(5))/2)^n /(11*5^(1/4)*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 17 2014
a(n) = 2*Sum_{k=0..n-1}(Sum_{i=0..k}(binomial(2*k+2,k-i)* binomial(2*k+i+1,2*k+1))/(k+1)). - Vladimir Kruchinin, Feb 29 2016
D-finite with recurrence n*(2*n-1)*a(n) +6*-(n-1)*(5*n-6)*a(n-1) +4*(23*n^2-97*n+111)*a(n-2) +2*(-29*n^2+142*n-174)*a(n-3) -3*(2*n-5)*(n-4)*a(n-4)=0. - R. J. Mathar, Jul 26 2022

A108453 Number of pyramids of the first kind in all 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) (a pyramid of the first kind is a sequence u^pd^p for some positive integer p, starting at the x-axis).

Original entry on oeis.org

1, 5, 29, 201, 1561, 13005, 113525, 1024593, 9482097, 89488213, 857952525, 8332513689, 81805985033, 810551503005, 8094740040677, 81395917522849, 823405075135457, 8374004486010277, 85567502052729597, 878066090712156521
Offset: 1

Views

Author

Emeric Deutsch, Jun 11 2005

Keywords

Comments

A108453(n)=sum(k*A108451(k),k=1..n) (for example, A108453(3)=1*16+2*5+3*1=29). A108453(n)=(1/2)*A108450(n). A108453 = partial sums of A032349.

Examples

			a(2)=5 because in the A027307(2)=10 paths we have altogether 5 pyramids of the first kind (shown between parentheses): (ud)(ud), (ud)Udd, (uudd), uUddd, Udd(ud), UddUdd, Ududd, UdUddd, Uuddd, UUdddd.
		

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:=z*A^2/(1-z): gser:=series(g,z=0,25): seq(coeff(gser,z^n),n=1..22);
  • PARI
    {a(n)=local(y=x); for(i=1, n, y=x*(1+y-x*y)^2/((1-x)*(1-y+x*y)^2) + (O(x^n))^3); polcoeff(y, n)}
    for(n=1, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Mar 17 2014

Formula

G.f.=zA^2/(1-z), where A=1+zA^2+zA^3=(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: x*(1+y-x*y)^2 = (1-x)*y*(1-y+x*y)^2. - Vaclav Kotesovec, Mar 17 2014
a(n) ~ sqrt(23*sqrt(5)-15) * (11+5*sqrt(5))^n / (11* sqrt(5*Pi) * n^(3/2) * 2^(n+1/2)). - Vaclav Kotesovec, Mar 17 2014
D-finite with recurrence n*(2*n-1)*a(n) -6*(n-1)*(5*n-6)*a(n-1) +4*(23*n^2-97*n+111)*a(n-2) +2*(-29*n^2+142*n-174)*a(n-3) -3*(2*n-5)*(n-4)*a(n-4)=0. - R. J. Mathar, Jul 26 2022

A361638 Expansion of g.f. A(x) satisfying A(x) = 1 + x * A(x)^2 * (1 + A(x)^3).

Original entry on oeis.org

1, 2, 14, 142, 1690, 21994, 303126, 4348102, 64235570, 970695442, 14934154334, 233133082494, 3683546302538, 58794776161274, 946619511627622, 15355445768326710, 250717346336174690, 4117189670041072930, 67956239699290313646, 1126763233375565370990
Offset: 0

Views

Author

Seiichi Manyama, Jul 13 2023

Keywords

Crossrefs

Programs

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

Formula

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

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

A108435 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 returns to the x-axis.

Original entry on oeis.org

2, 6, 4, 34, 24, 8, 238, 172, 72, 16, 1858, 1360, 624, 192, 32, 15510, 11444, 5520, 1952, 480, 64, 135490, 100520, 50040, 19136, 5600, 1152, 128, 1223134, 911068, 463512, 186416, 60320, 15168, 2688, 256, 11320066, 8457504, 4371808, 1821312, 629440, 178176, 39424, 6144, 512
Offset: 1

Views

Author

Emeric Deutsch, Jun 04 2005

Keywords

Comments

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 steps up to the first peak. Example: T(2,2)=4 because we have uudd, uUddd, Uuddd and UUdddd. Row sums yield A027307. T(n,1)=A108424(n). T(n,n)=2^n.

Examples

			T(2,2)=4 because u(d)u(d), u(d)Ud(d), Ud(d)u(d) and Ud(d)Ud(d) (the steps d that return to the x-axis are shown between parentheses).
Triangle begins:
  2;
  6,4;
  34,24,8;
  238,172,72,16;
  1858,1360,624,192,32;
  ...
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if k
    				
  • Mathematica
    T[n_, k_] := Which[k < n, (k/(n - k))*(3*2^k*Binomial[n - 1, k] + Sum[2^(n - 1 - j)*(5*n - 2*k + j + 1)*Binomial[n - 1, j]*Binomial[2*n - k - 1, n + j]/(n + j + 1), {j, 0, n - k - 2}]), k == n, 2^n, True, 0];
    Table[T[n, k], {n, 1, 9}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 11 2024, after Maple code. *)

Formula

T(n, k)=[k/(n-k)][3*2^k*binomial(n-1, k)+sum(2^(n-1-j)*(5n-2k+j+1)binomial(n-1, j)binomial(2n-k-1, n+j)/(n+j+1), j=0..n-k-2)] if kA027307).

Extensions

Keyword tabf changed to tabl by Michel Marcus, Apr 09 2013

A108443 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 triple descents (i.e., ddd's).

Original entry on oeis.org

1, 2, 6, 3, 1, 21, 24, 15, 5, 1, 80, 150, 145, 84, 31, 7, 1, 322, 857, 1145, 949, 528, 202, 53, 9, 1, 1347, 4692, 8096, 8801, 6598, 3551, 1394, 398, 81, 11, 1, 5798, 25102, 53457, 72338, 68594, 47805, 25092, 10019, 3040, 692, 115, 13, 1, 25512, 132484, 337132
Offset: 0

Views

Author

Emeric Deutsch and Paul D. Hanna, Jun 10 2005

Keywords

Comments

Row n has 2n-1 terms (n >= 1). Row sums yield A027307. Column 0 yields A106228.

Examples

			T(2,1) = 3 because we have uUddd, Uuddd and UdUddd.
Triangle begins:
    1;
    2;
    6,    3,    1;
   21,   24,   15,    5,    1;
   80,  150,  145,   84,   31,    7,    1;
  322,  857, 1145,  949,  528,  202,   53,    9,    1;
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t) option remember; expand(`if`(y<0 or y>x, 0,
          `if`(x=0, 1, b(x-1, y-1, min(2, t+1))*`if`(t=2, z, 1)+
           b(x-1, y+2, 0)+b(x-2, y+1, 0))))
        end:
    T:= n->(p->seq(coeff(p, z, i), i=0..degree(p)))(b(3*n, 0$2)):
    seq(T(n), n=0..8);  # 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, Min[2, t + 1]]*If[t == 2, z, 1] + b[x - 1, y + 2, 0] + b[x - 2, y + 1, 0]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[3*n, 0, 0]]; Table[T[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)
  • PARI
    {T(n,k)=local(G=1+z*O(z^n)+t*O(t^k));for(k=1,n, G=1+z*(t+z-t*z)^2*G^3+z*(2-t)*(t+z-t*z)*G^2+2*z*(1-t)*G); polcoeff(polcoeff(G,n,z),k,t)}

Formula

G.f. G = G(t,z) satisfies G = 1 + z(t + z - tz)^2*G^3 + z(2-t)(t + z - tz)G^2 + 2z(1-t)G.

A108446 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 peaks of the form ud.

Original entry on oeis.org

1, 1, 1, 4, 5, 1, 20, 32, 13, 1, 113, 223, 135, 26, 1, 688, 1620, 1300, 412, 45, 1, 4404, 12064, 12050, 5350, 1030, 71, 1, 29219, 91335, 109134, 62450, 17575, 2247, 105, 1, 199140, 699689, 973077, 682234, 254625, 49210, 4438, 148, 1, 1385904, 5407744
Offset: 0

Views

Author

Emeric Deutsch, Jun 10 2005

Keywords

Comments

Row sums yield A027307. Column 0 yields A108447. T(n,n-1) = A008778(n-1) = n(n^2+6n-1)/6. Number of ud peaks in all paths from (0,0) to (3n,0) is given by A108448.

Examples

			T(2,1) = 5 because we have udUdd, uudd, Uddud, Ududd and Uuddd.
Triangle begins:
1;
1,1;
4,5,1;
20,32,13,1;
113,223,135,26,1;
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if n=0 and k=0 then 1 elif n=0 then 0 elif k=n then 1 elif k=n then 1 else (1/n)*binomial(n,k)*sum(binomial(n-k,j)*binomial(n+2*j,k+j-1),j=0..n-k) fi end: for n from 0 to 9 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := (1/n) Binomial[n, k]*Sum[Binomial[n-k, j]* Binomial[n+2j, k+j-1], {j, 0, n-k}];
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 19 2018 *)

Formula

T(n,k) = (1/n) binomial(n, k)*sum(binomial(n-k,j)*binomial(n+2j,k+j-1), j=0..n-k).
G.f.: G = G(t,z) satisfies G = 1+z(G-1+t)G+zG^3.
Previous Showing 41-50 of 72 results. Next