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.

A247290 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k uhd strings.

This page as a plain text file.
%I A247290 #15 May 27 2015 08:40:24
%S A247290 1,1,2,4,7,1,15,2,32,5,69,13,154,30,1,346,74,3,786,183,9,1806,449,28,
%T A247290 4180,1114,78,1,9745,2767,219,4,22865,6882,611,14,53938,17170,1674,50,
%U A247290 127865,42906,4569,161,1,304447,107392,12398,506,5,727733,269237,33450,1564,20
%N A247290 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k uhd strings.
%C A247290 B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: h = (1,0) of weight 1, H = (1,0) of weight 2,  u = (1,1) of weight 2, and d = (1,-1) of weight 1. The weight of a path is the sum of the weights of its steps.
%C A247290 Row n contains 1 + floor(n/4) entries.
%C A247290 Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).
%C A247290 T(n,0) = A247291(n).
%C A247290 Sum(k*T(n,k), k=0..n) = A110320(n-3) (n>=3)
%H A247290 Alois P. Heinz, <a href="/A247290/b247290.txt">Rows n = 0..300, flattened</a>
%H A247290 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 A247290 G.f. G = G(t,z) satisfies G = 1 + z*G + z^2*G + z^3*G*(G - z + t*z).
%e A247290 T(5,1)=2 because we have huhd and uhdh.
%e A247290 Triangle starts:
%e A247290 1;
%e A247290 1;
%e A247290 2;
%e A247290 4;
%e A247290 7,1;
%e A247290 15,2;
%p A247290 eq := G = 1+z*G+z^2*G+z^3*(G-z+t*z)*G: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 22 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 22 do seq(coeff(P[n], t, k), k = 0 .. floor((1/4)*n)) end do; # yields sequence in triangular form
%p A247290 # second Maple program:
%p A247290 b:= proc(n, y, t) option remember; `if`(y<0 or y>n, 0, `if`(n=0, 1,
%p A247290       expand(b(n-1, y, `if`(t=1, 2, 0))+`if`(n>1, b(n-2, y, 0)+
%p A247290       b(n-2, y+1, 1), 0)+b(n-1, y-1, 0)*`if`(t=2, x, 1))))
%p A247290     end:
%p A247290 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
%p A247290 seq(T(n), n=0..20);  # _Alois P. Heinz_, Sep 16 2014
%t A247290 b[n_, y_, t_] := b[n, y, t] = If[y<0 || y>n, 0, If[n == 0, 1, Expand[b[n-1, y, If[t == 1, 2, 0]] + If[n>1, b[n-2, y, 0] + b[n-2, y+1, 1], 0] + b[n-1, y-1, 0]*If[t == 2, x, 1]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, May 27 2015, after _Alois P. Heinz_ *)
%Y A247290 Cf. A004148, A110320, A247291, A247292, A247294.
%K A247290 nonn,tabf
%O A247290 0,3
%A A247290 _Emeric Deutsch_, Sep 16 2014