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-2 of 2 results.

A190164 Triangle read by rows: T(n,k) is the number of peakless Motzkin paths of length n having a total of k (1,0)-steps at levels 0,2,4,... .

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 1, 3, 3, 0, 0, 1, 2, 4, 6, 4, 0, 0, 1, 4, 8, 9, 10, 5, 0, 0, 1, 7, 18, 19, 16, 15, 6, 0, 0, 1, 12, 35, 48, 36, 25, 21, 7, 0, 0, 1, 22, 66, 102, 100, 60, 36, 28, 8, 0, 0, 1, 41, 132, 209, 229, 180, 92, 49, 36, 9, 0, 0, 1, 76, 266, 450, 504, 440, 294, 133, 64, 45, 10, 0, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, May 06 2011

Keywords

Comments

Sum of entries in row n is A004148(n) (the RNA secondary structure numbers).
T(n,0)=A190165(n).
Sum_{k>=0} k*T(n,k) = A190166(n).
The trivariate g.f. H(t,s,z), where t (s) marks (1,0)-steps at even (odd) levels and z marks length, satisfies the equation
z^2*(1-tz+z^2)*H^2 - (1-tz+z^2)*(1-sz+z^2)*H + 1-sz+z^2 = 0.

Examples

			T(5,2)=3 because we have h'h'uhd, h'uhdh', and uhdh'h', where u=(1,1), h=(1,0), d=(1,-1) (the even-level h-steps are marked).
Triangle starts:
  1;
  0, 1;
  0, 0, 1;
  1, 0, 0, 1;
  1, 2, 0, 0, 1;
  1, 3, 3, 0, 0, 1;
		

Crossrefs

Programs

  • Maple
    eq := z^2*(1-t*z+z^2)*G^2-(1-z+z^2)*(1-t*z+z^2)*G+1-z+z^2 = 0: g := RootOf(eq, G): Gser := simplify(series(g, z = 0, 15)): for n from 0 to 13 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 0 to 12 do seq(coeff(P[n], t, k), k = 0 .. n) end do; # yields sequence in triangular form
  • Mathematica
    m = 13; G[_] = 0;
    Do[G[z_] = -((z^2 G[z]^2 (-t z + z^2 + 1) + z^2 - z + 1)/((z^2 - z + 1)(t z - z^2 - 1))) + O[z]^m, {m}];
    CoefficientList[#, t]& /@ CoefficientList[G[z], z] // Flatten (* Jean-François Alcover, Nov 15 2019 *)

Formula

G.f.: G = G(t,z) satisfies the equation z^2*(1-tz+z^2)*G^2 - (1-z+z^2)*(1-tz+z^2)*G + 1 - z + z^2 = 0.

A190168 Number of peakless Motzkin paths of length n having no (1,0)-steps at levels 1,3,5,... .

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 4, 7, 12, 21, 38, 70, 130, 243, 457, 865, 1647, 3152, 6059, 11693, 22647, 44007, 85770, 167626, 328430, 644993, 1269413, 2503339, 4945897, 9788700, 19404866, 38526335, 76599502, 152503123, 304006284, 606745700, 1212335896, 2424964327, 4855454654
Offset: 0

Views

Author

Emeric Deutsch, May 06 2011

Keywords

Comments

a(n) = A190167(n,0).

Examples

			a(5)=2 because we have hhhhh and uuhdd, where u=(1,1), h=(1,0), d=(1,-1).
		

Crossrefs

Programs

  • Maple
    eq := z^2*(1-z+z^2)*G^2-(1+z^2)*(1-z+z^2)*G+1+z^2=0: g:=RootOf(eq,G): Gser:=series(g,z=0,46): seq(coeff(Gser,z,n),n=0..38);
  • Mathematica
    CoefficientList[Series[(1 + 1/x^2 - Sqrt[1 + 1/x^4 - 2/x^2 - 4/x - (4 - 4 x)/(1 - x + x^2)])/2, {x, 0, 38}], x] (* Michael De Vlieger, Feb 12 2017 *)

Formula

G.f. G=G(z) satisfies the equation z^2*(1-z+z^2)G^2-(1+z^2)(1-z+z^2)G +1+z^2=0.
G.f.: (1+1/x^2-sqrt(1+1/x^4-2/x^2-4/x-(4-4*x)/(1-x+x^2)))/2. - Matthew House, Feb 12 2017
D-finite with recurrence (n+2)*a(n) +2*(-n-1)*a(n-1) +(n+2)*a(n-2) +2*(-n+2)*a(n-3) +2*(-n+4)*a(n-5) +(n-8)*a(n-6) +2*(-n+7)*a(n-7) +(n-8)*a(n-8)=0. - R. J. Mathar, Jul 26 2022
Showing 1-2 of 2 results.