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
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;
-
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
-
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 *)
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
a(2)=3 because we have udud, udUdd and uudd.
-
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);
-
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 *)
-
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 */
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
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).
-
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);
-
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 *)
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
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).
-
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);
-
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 *)
-
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 */
-
{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
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
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.
-
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);
-
{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
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
-
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
a(2)=7 because we have uudd, uUddd, UddUdd, Ududd, UdUddd, Uuddd and UUdddd.
-
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);
-
{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
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
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;
...
-
T:=proc(n,k) if k
-
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. *)
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
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;
-
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
-
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 *)
-
{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)}
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
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;
-
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
-
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 *)
Comments