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.

A182896 Triangle read by rows: T(n,k) is the number of weighted lattice paths in L_n having k (1,-1)-returns to the horizontal axis. The members of L_n are paths of weight n that start at (0,0), end on the horizontal axis and whose steps are of the following four kinds: an (1,0)-step with weight 1, an (1,0)-step with weight 2, a (1,1)-step with weight 2, and a (1,-1)-step with weight 1. The weight of a path is the sum of the weights of its steps.

Original entry on oeis.org

1, 1, 2, 4, 1, 8, 3, 17, 9, 37, 25, 1, 82, 66, 5, 185, 171, 20, 423, 437, 70, 1, 978, 1107, 225, 7, 2283, 2790, 686, 35, 5373, 7009, 2015, 147, 1, 12735, 17574, 5760, 553, 9, 30372, 44019, 16135, 1932, 54, 72832, 110210, 44500, 6398, 264, 1, 175502, 275925, 121247, 20350, 1134, 11
Offset: 0

Views

Author

Emeric Deutsch, Dec 12 2010

Keywords

Examples

			T(3,1)=1. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and u=(1,1), d=(1,-1), the five paths of weight 3 are ud, du, hH, Hh, and hhh; exactly one of them, namely ud, has one (1,-1)-return to the horizontal axis.
Triangle starts:
   1;
   1;
   2;
   4,  1;
   8,  3;
  17,  9;
  37, 25, 1;
  82, 66, 5;
  ...
		

Crossrefs

Programs

  • Maple
    eq := c = 1+z*c+z^2*c+z^3*c^2: c := RootOf(eq, c): G := 1/(1-z-z^2-t*z^3*c-z^3*c): Gser := simplify(series(G, z = 0, 19)): for n from 0 to 16 do P[n] := sort(coeff(Gser, z, n)) end do; for n from 0 to 16 do seq(coeff(P[n], t, k), k = 0 .. floor((1/3)*n)) end do: #yields sequence in triangular form
  • PARI
    T(n)={[Vecrev(p) | p<-Vec(1/(1-x-x^2 - (1+y)*(1-x-x^2 - sqrt(1+x^4-2*x^3-x^2-2*x+O(x*x^n)))/2))]}
    { my(A=T(12)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Nov 05 2019

Formula

G.f.: G(t,z) = 1/(1-z-z^2-(1+t)z^3*c), where c satisfies c = 1 + zc + z^2*c + z^3*c^2.
Sum of entries in row n is A051286(n).
T(n,0) = A004148(n+1) (the secondary structure numbers).
Sum_{k=0..n} k*T(n,k) = A182897(n).

Extensions

Data corrected by Andrew Howroyd, Nov 05 2019