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.

Showing 1-3 of 3 results.

A166295 Triangle read by rows: T(n,k) is the number of Dyck paths with no UUU's and no DDD's, of semilength n and having k UUDUDD's starting at level 0 (0 <= k <= floor(n/3); U=(1,1), D=(1,-1)).

Original entry on oeis.org

1, 1, 2, 3, 1, 6, 2, 12, 5, 26, 10, 1, 57, 22, 3, 128, 48, 9, 291, 109, 22, 1, 670, 250, 54, 4, 1558, 582, 129, 14, 3655, 1366, 311, 40, 1, 8639, 3232, 750, 109, 5, 20554, 7696, 1818, 284, 20, 49185, 18432, 4419, 730, 65, 1, 118301, 44368, 10776, 1856, 195, 6
Offset: 0

Views

Author

Emeric Deutsch, Oct 29 2009

Keywords

Comments

Row n has 1 + floor(n/3) terms.
Sum of entries in row n = A004148(n+1) (the secondary structure numbers).
T(n,0) = A166296(n).
Sum_{k=0..floor(n/3)} k*T(n,k) = A166297(n).

Examples

			T(4,1)=2 because we have UDUUDUDD and UUDUDDUD.
Triangle starts:
   1;
   1;
   2;
   3,  1;
   6,  2;
  12,  5;
  26, 10,  1;
		

Crossrefs

Programs

  • Maple
    G := 2/(1-z-z^2+2*z^3-2*t*z^3+sqrt(1-2*z-z^2-2*z^3+z^4)): Gser := simplify(series(G, z = 0, 20)): 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, j), j = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = 1/(1-z-z^2+z^3-t*z^3-z^3*g), where g = 1+zg + z^2*g + z^3*g^2.

A368376 Arises from enumeration of a certain class of zig-zag knight's paths on the square grid.

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 1, 6, 3, 13, 9, 29, 25, 65, 66, 148, 171, 341, 437, 793, 1107, 1860, 2790, 4395, 7009, 10452, 17574, 24999, 44019, 60097, 110210, 145130, 275925, 351916, 690993, 856502, 1731224, 2091599, 4339980, 5123437, 10887192, 12585354, 27331465
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2024

Keywords

Comments

It would be nice to have a more precise definition.

Crossrefs

A093128 is a bisection.

Programs

  • Mathematica
    r = (1 - z^4 - z^2 - Sqrt[z^8 - 2z^6 - z^4 - 2z^2 + 1]) / (2z^3);
    gf = r (u^2 z + u z^2 + 1) / (z^3 (1 - r u));
    Table[SeriesCoefficient[gf,{u,0,2},{z,0,n}], {n,0,33}] (* Andrei Zabolotskii, Jul 25 2025 *)

Formula

G.f.: (x + x^2 * R(x) + R(x)^2) * R(x) / x^3, where R(x) = x * (A(x^2) - 1) and A(x) is the g.f. of A004148. - Andrei Zabolotskii, Jul 25 2025

Extensions

Terms a(14) and beyond from Andrei Zabolotskii, Jul 25 2025

A182906 Triangle read by rows: T(n,k) is the number of weighted lattice paths in F[n] having endpoint height k (k<=floor(n/2)). The members of F[n] are paths of weight n that start at (0,0), do not go below 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, 1, 4, 2, 8, 5, 1, 17, 12, 3, 37, 28, 9, 1, 82, 66, 25, 4, 185, 156, 66, 14, 1, 423, 370, 171, 44, 5, 978, 882, 437, 129, 20, 1, 2283, 2112, 1107, 364, 70, 6, 5373, 5079, 2790, 1000, 225, 27, 1, 12735, 12264
Offset: 0

Views

Author

Emeric Deutsch, Dec 17 2010

Keywords

Comments

The paths need not end on the horizontal axis.
Number of entries in row n is 1+floor(n/2).
Sum of entries in row n is A182905(n).
T(n,0) = A004148(n+1).
T(n,1) = A166297(n+1).

Examples

			T(4,1)=5. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U=(1,1), D=(1,-1), we have hhU, hUh, Uhh, HU, and UH.
Triangle starts:
   1;
   1;
   2,  1;
   4,  2;
   8,  5,  1;
  17, 12,  3;
  37, 28,  9,  1;
		

Crossrefs

Programs

  • Maple
    g := ((1-z-z^2-sqrt((1+z+z^2)*(1-3*z+z^2)))*1/2)/z^3: G := g/(1-t*z^2*g); Gser := simplify(series(G, z = 0, 22)): for n from 0 to 14 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 14 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
    T := proc (n, k) if k < 0 then 0 elif n < 0 then 0 elif (1/2)*n < k then 0 elif n = 0 and k = 0 then 1 else T(n-1, k)+T(n-1, 1+k)+T(n-2, k)+T(n-2, k-1) end if end proc: for n from 0 to 14 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do;
  • Maxima
    T(n,k):=(k+1)*sum((binomial(i+1,n+1-i)*binomial(i+1,-i+n-k))/(i+1),i,0,n-k+1);
    /* Vladimir Kruchinin, Jan 25 2019 */

Formula

G.f.: G(t,z) = g/(1-tz^2*g), where g=g(z) is defined by g = 1 + z*g + z^2*g + z^3*g^2.
Rec. rel.: T(n,k) = T(n-1,k) + T(n-1,k+1) + T(n-2,k) + T(n-2,k-1); the 2nd Maple program makes use of this.
T(n,k) = (k+1)*Sum_{i=0..n-k+1} C(i+1,n+1-i)*C(i+1,-i+n-k)/(i+1). - Vladimir Kruchinin, Jan 25 2019
Showing 1-3 of 3 results.