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.

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

This page as a plain text file.
%I A108431 #14 Dec 25 2015 21:09:37
%S A108431 1,0,2,6,0,4,34,24,0,8,274,136,72,0,16,2266,1168,408,192,0,32,19738,
%T A108431 9880,3720,1088,480,0,64,177642,87840,32088,10496,2720,1152,0,128,
%U A108431 1640050,802216,291048,92096,27680,6528,2688,0,256,15445690,7492240
%N 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).
%C A108431 Row sums yield A027307. T(n,0) = A108432(n). T(n,n) = 2^n.
%H A108431 Alois P. Heinz, <a href="/A108431/b108431.txt">Rows n = 0..140, flattened</a>
%H A108431 Emeric Deutsch, <a href="http://www.jstor.org/stable/2589192">Problem 10658: Another Type of Lattice Path</a>, American Math. Monthly, 107, 2000, 368-370.
%F A108431 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).
%e A108431 Example T(2,2)=4 because we have udud, udUdd, Uddud and UddUdd.
%e A108431 Triangle begins:
%e A108431 1;
%e A108431 0,2;
%e A108431 6,0,4;
%e A108431 34,24,0,8;
%e A108431 ...
%p A108431 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
%p A108431 # second Maple program:
%p A108431 b:= proc(x, y, t) option remember; expand(`if`(y<0 or y>x, 0,
%p A108431      `if`(x=0, 1, b(x-1, y-1, t)*`if`(t and y=1, z, 1)+
%p A108431       b(x-1, y+2, is(y=0))+b(x-2, y+1, is(y=0)))))
%p A108431     end:
%p A108431 T:= n-> (p-> seq(coeff(p, z, i), i=0..n))(b(3*n, 0, false)):
%p A108431 seq(T(n), n=0..10);  # _Alois P. Heinz_, Oct 06 2015
%t A108431 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_ *)
%Y A108431 Cf. A027307, A108432, A108433.
%K A108431 nonn,tabl
%O A108431 0,3
%A A108431 _Emeric Deutsch_, Jun 03 2005