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.
%I A246179 #15 Jun 29 2015 06:50:04 %S A246179 1,1,2,3,1,5,3,8,9,13,23,1,21,56,5,34,131,20,55,300,67,1,89,678,204,7, %T A246179 144,1523,581,35,233,3416,1580,143,1,377,7677,4155,517,9,610,17329, %U A246179 10663,1716,54,987,39353,26880,5352,259,1,1597,90000,66891,15924,1079 %N A246179 Triangle read by rows: T(n,k) is the number of weighted lattice paths in B(n) having k returns to the horizontal axis (i.e., (1,-1)-steps ending on the horizontal axis). The members of B(n) are paths of weight n that start in (0,0), end on but never go below the horizontal axis, and whose steps are of the following four kinds: a (1,0)-step with weight 1; a (1,0)-step with weight 2; a (1,1)-step with weight 2; a (1,-1)-step with weight 1. The weight of a path is the sum of the weights of its steps. %C A246179 Number of entries in row n is 1+floor(n/3). %C A246179 Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers). %C A246179 T(n,0)=A000045(n+1) (the Fibonacci numbers). %H A246179 Alois P. Heinz, <a href="/A246179/b246179.txt">Rows n = 0..250, flattened</a> %H A246179 M. Bona and A. Knopfmacher, <a href="http://dx.doi.org/10.1007/s00026-010-0060-7">On the probability that certain compositions have the same number of parts</a>, Ann. Comb., 14 (2010), 291-306. %F A246179 G.f. G=G(t,z) satisfies G = 1 + z*G + z^2*G + t*z^3*g*G, where g=1+z*g+z^2*g+z^3*g^2. %e A246179 Row 3 is 3,1. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and u=(1,1), d=(1,-1), the four paths of weight 3 are: ud, hH, Hh, and hhh, having 1, 0, 0, and 0 returns to the horizontal axis, respectively. %e A246179 Triangle starts: %e A246179 1; %e A246179 1; %e A246179 2; %e A246179 3,1; %e A246179 5,3; %e A246179 8,9; %e A246179 13,23,1; %p A246179 eq := g = 1+z*g+z^2*g+z^3*g^2: g := RootOf(eq, g): G := 1/(1-z-z^2-t*z^3*g): Gser := simplify(series(G, z = 0, 20)): for n from 0 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 18 do seq(coeff(P[n], t, k), k = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form %p A246179 # second Maple program: %p A246179 b:= proc(n, y) option remember; `if`(y<0 or y>n, 0, %p A246179 `if`(n=0, 1, expand(b(n-1, y)+`if`(n>1, b(n-2, y)+ %p A246179 b(n-2, y+1), 0) +b(n-1, y-1)*`if`(y=1, x, 1)))) %p A246179 end: %p A246179 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): %p A246179 seq(T(n), n=0..20); # _Alois P. Heinz_, Aug 24 2014 %t A246179 b[n_, y_] := b[n, y] = If[y<0 || y>n, 0, If[n==0, 1, Expand[b[n-1, y] + If[n>1, b[n-2, y] + b[n-2, y+1], 0] + b[n-1, y-1]*If[y==1, x, 1]]]]; T[n_] := Function[ {p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Jun 29 2015, after _Alois P. Heinz_ *) %Y A246179 Cf. A004148, A000045, A246177. %K A246179 nonn,tabf %O A246179 0,3 %A A246179 _Emeric Deutsch_, Aug 23 2014