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

A202411 a(n) = Sum_{k=floor(n/4)..R} C(k, m*k - (-1)^n*(R - k)) * C(k + 1, m*(k + 2) - (-1)^n*(R - k + 1)) where m = (n + 1) mod 2 and R = (n + m - 3)/2 for n > 0 and a(0) = 1.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 4, 7, 10, 16, 24, 39, 58, 95, 143, 233, 354, 577, 881, 1436, 2204, 3590, 5534, 9011, 13940, 22691, 35213, 57299, 89162, 145043, 226238, 367931, 575114, 935078, 1464382, 2380405, 3734150, 6068745, 9534594, 15492702, 24374230, 39598631
Offset: 0

Views

Author

Peter Luschny, Jan 14 2012

Keywords

Examples

			Fibonacci meanders classified by maximal run length of 1s (see the link) lead to the triangle
   0,  1;
   1,  1,  0, 1;
   2,  1,  1, 1, 0, 1;
   4,  3,  2, 1, 1, 1, 0, 1;
  10,  7,  4, 3, 2, 1, 1, 1, 0, 1;
  24, 16, 10, 7, 4, 3, 2, 1, 1, 1, 0, 1.
		

Crossrefs

Programs

  • Maple
    A202411 := proc(n) local A, R, B, C, D, Z, H, J; if n = 0 then RETURN(1) fi;
    H:=iquo(n,2); A:=iquo(H,2); R:=H-1; B:=A-R/2+1; C:=A+1; D:=A-R; J:=n mod 2; if J = 0 then Z:=`if`(H mod 2 = 1,(H+1)/2,H^2*(H+2)/16) else Z:=`if`(H mod 2 = 1,1, H*(H+2)/4) fi; Z*hypergeom([1,C,C+1,D,D-J],[B,B,B-1/2,B+1/2-J],1/16) end:
    seq(simplify(A202411(i)),i=0..42);
  • Mathematica
    A202411[0] = 1; A202411[n_] := Module[{A, R, B, C, D, Z, H, J}, H = Quotient[n, 2]; A = Quotient[H, 2]; R = H-1; B = A - R/2 + 1; C = A+1; D = A - R; J = Mod[n, 2]; If[J == 0, Z = If[Mod[H, 2] == 1, (H+1)/2, H^2*(H + 2)/16], Z = If[Mod[H, 2] == 1, 1, H*(H+2)/4]]; Z*HypergeometricPFQ[{1, C, C + 1, D, D - J}, {B, B, B - 1/2, B + 1/2 - J}, 1/16]]; Table[A202411[n], {n, 0, 42}]
    (* Jean-François Alcover, Jan 27 2014, translated from Maple *)

Formula

For n > 0 let H = floor(n/2), A = floor(H/2), R = H - 1, B = A - R/2 + 1, C = A + 1, D = A - R, J = n mod 2 and Z = if(H mod 2 = 1, (H + 1)/2, H^2*(H + 2)/16) if J = 0 else Z = if(H mod 2 = 1, 1, H*(H + 2)/4); then:
a(n) = Z*Hypergeometric([1, C, C+1, D, D-J], [B, B, B-1/2, B+1/2-J], 1/16).

A203611 a(n) = Sum_{k=0..n} binomial(k-1,2*k-1-n)*binomial(k,2*k-n), with a(0) = 1.

Original entry on oeis.org

1, 1, 1, 3, 7, 16, 39, 95, 233, 577, 1436, 3590, 9011, 22691, 57299, 145043, 367931, 935078, 2380405, 6068745, 15492702, 39598631, 101323446, 259522398, 665332007, 1707137941, 4383662419, 11264675925, 28966161253, 74530441162, 191879611399, 494265165151
Offset: 0

Views

Author

Peter Luschny, Jan 14 2012

Keywords

Comments

For the connection with Fibonacci meanders classified by maximal run length of 1s (see the link).
Apparently the number of grand Motzkin paths of length n+1 that avoid UU. - David Scambler, Jul 04 2013

Crossrefs

Cf. A110236, bisection of A202411.

Programs

  • Magma
    A203611:= func< n | n eq 0 select 1 else (&+[Binomial(k-1,2*k-n-1)*Binomial(k,2*k-n): k in [0..n]]) >;
    [A203611(n): n in [0..40]]; // G. C. Greubel, Mar 12 2025
    
  • Maple
    a := n -> hypergeom([-n/2, 1 - n/2, (1-n)/2, (1-n)/2], [1, -n, 1 - n], 16):
    seq(simplify(a(n)), n = 0..31); # Peter Luschny, Mar 24 2023
  • Mathematica
    a[n_] := Module[{a, r, b, c, d, z}, If[n == 0, Return[1]]; a = Quotient[n, 2]; r = n-1; b = a-r/2+1; c = a+1; d = a-r; z = If[Mod[n, 2] == 1, (n+1)/2, n^2*(n+2)/16]; z*HypergeometricPFQ[{1, c, c+1, d, d}, {b, b, b-1/2, b+1/2}, 1/16] ]; Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Jun 27 2013, translated from Maple *)
    Table[Sum[Binomial[k-1,2k-1-n]Binomial[k,2k-n],{k,0,n}],{n,0,40}] (* Harvey P. Dale, May 25 2014 *)
  • PARI
    my(x='x+O('x^66)); Vec( 2*x/((1+x-x^2) * sqrt((x^2+x+1) * (x^2-3*x+1)) -x^4 +2*x^3 +x^2 +2*x -1) ) \\ Joerg Arndt, May 06 2013
    
  • SageMath
    def A203611(n): return 1 if n==0 else sum(binomial(k-1,2*k-n-1)*binomial(k,2*k-n) for k in range(n+1))
    print([A203611(n) for n in range(41)]) # G. C. Greubel, Mar 12 2025

Formula

For n>0 let A=floor(n/2), R = n-1, B = A - R/2 + 1, C = A+1, D = A-R and Z = (n+1)/2 if n mod 2 = 1, otherwise Z = n^2*(n+2)/16. Then a(n) = Z*Hypergeometric5F4([1,C,C+1,D,D],[B,B,B-1/2,B+1/2],1/16).
G.f.: 2*x/((1+x-x^2)*sqrt((1+x+x^2)*(1-3*x+x^2)) - (1-2*x-x^2-2*x^3+x^4)). - Mark van Hoeij, May 06 2013
a(n) ~ phi^(2*n + 1) / (2 * 5^(1/4) * sqrt(Pi*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 08 2019
a(n) = hypergeom([-n/2, 1 - n/2, (1-n)/2, (1-n)/2], [1, -n, 1 - n], 16). - Peter Luschny, Mar 24 2023
D-finite with recurrence n*a(n) -(n+1)*a(n-1) -2*(2*n-5)*a(n-2) -(n+3)*a(n-3) +3*(n-5)*a(n-5) -(n-6)*a(n-6) = 0. - R. J. Mathar, Nov 22 2024

A201631 a(n) is the number of Fibonacci meanders of length m*n and central angle 360/m degrees where m = 2.

Original entry on oeis.org

1, 3, 6, 13, 30, 70, 167, 405, 992, 2450, 6090, 15214, 38165, 96069, 242530, 613811, 1556856, 3956316, 10070871, 25674210, 65541142, 167517654, 428635032, 1097874434, 2814611701, 7221917871, 18544968768, 47655572191, 122544150258, 315313433594, 811792614547
Offset: 1

Views

Author

Peter Luschny, Jan 15 2012

Keywords

Comments

Empirically the partial sums of A051291. - Sean A. Irvine, Jul 13 2022
The above conjecture was proved by Baril et al., which also give a formal definition of the Fibonacci meanders and describe a bijection with a certain class of peakless grand Motzkin paths of length n. - Peter Luschny, Mar 16 2023

Examples

			a(3) = 6 = card({100001, 100100, 110000, 111001, 111100, 111111}).
		

Crossrefs

Programs

  • Maple
    A201631 := n -> add(A202411(k),k=0..2*n-1): seq(A201631(i),i=1..9);
    # Alternative, using the g.f. of Baril et al.:
    S := (x^2 - x + 1 - R)/((x - 1)*(x^2 - x - 1 + R)*R):
    R := (((x - 3)*x + 1)*(x^2 + x + 1))^(1/2): ser := series(S, x, 33):
    seq(coeff(ser, x, n), n = 1..31); # Peter Luschny, Mar 16 2023
    # Using a recurrence:
    a := proc(n) option remember; if n < 5 then return [0, 1, 3, 6, 13][n + 1] fi;
    (n*(2*n - 1)*(2*n - 3)*(n - 5)*a(n - 5) - (n - 4)*(2*n - 1)^2*(3*n - 5)*a(n - 4) + (2*n - 5)*(n - 3)*(2*n^2 - 3*n + 2)*a(n - 3) - (2*n - 3)*(n - 2)*(2*n^2 - 3*n + 5)*a(n - 2) + (3*n - 4)*(2*n - 1)*(2*n - 5)*(n - 1)*a(n - 1))/(n*(2*n - 3)*(2*n - 5)*(n - 1)) end: seq(a(n), n = 1..31); # Peter Luschny, Mar 16 2023
  • Mathematica
    a[n_] := Sum[A202411[k], {k, 0, 2 n - 1}];
    Array[a, 31] (* Jean-François Alcover, Jun 29 2019 *)

Formula

a(n) = Sum_{k=0..2n-1} A202411(k).
a(n) = [x^n] (x^2 - x + 1 - R)/((x - 1)*(x^2 - x - 1 + R) * R), where R = (((x - 3)*x + 1)*(x^2 + x + 1))^(1/2). (This is Theorem 21 in Baril et al.) - Peter Luschny, Mar 16 2023

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.

A190166 Number of (1,0)-steps at levels 0,2,4,... in all peakless Motzkin paths of length n.

Original entry on oeis.org

0, 1, 2, 3, 6, 14, 34, 83, 202, 495, 1224, 3046, 7616, 19115, 48130, 121527, 307602, 780244, 1982834, 5047377, 12867438, 32847357, 83952780, 214806750, 550170300, 1410412561, 3618785462, 9292203549, 23877482490, 61397367692, 157972743178, 406693829059, 1047585820586, 2699811117189
Offset: 0

Views

Author

Emeric Deutsch, May 06 2011

Keywords

Comments

a(n)=Sum(k*A190164(n,k),k>=0).
a(n)=A110236(n) - A190169(n).

Examples

			a(4)=6 because in h'h'h'h', h'uhd, uhdh', and uhhd, where u=(1,1), h=(1,0), d=(1,-1), we have 4+1+1+0 h-steps at even levels (marked).
		

Crossrefs

Programs

  • Maple
    G := z/((1-z+z^2)*sqrt((1+z+z^2)*(1-3*z+z^2))): Gser := series(G,z=0,36): seq(coeff(Gser,z,n),n=0..33);

Formula

G.f. = z/[(1-z+z^2)sqrt((1+z+z^2)(1-3z+z^2))].
Conjecture: (-n+1)*a(n) +(3*n-4)*a(n-1) +2*(-n+1)*a(n-2) +3*(n-2)*a(n-3) +2*(-n+3)*a(n-4) +(3*n-8)*a(n-5) +(-n+3)*a(n-6)=0. - R. J. Mathar, Apr 09 2019
a(n) ~ phi^(2*n+2) / (4 * 5^(1/4) * sqrt(Pi*n)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, May 29 2022

A190169 Number of (1,0)-steps at levels 1,3,5,... in all peakless Motzkin paths of length n.

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 24, 60, 152, 386, 980, 2488, 6324, 16098, 41032, 104711, 267512, 684138, 1751316, 4487217, 11506792, 29530524, 75841152, 194910254, 501234960, 1289755668, 3320603016, 8553723949, 22044934324, 56841474482, 146626826376, 378392593206, 976884539336, 2522936490418
Offset: 0

Views

Author

Emeric Deutsch, May 06 2011

Keywords

Comments

a(n)=Sum(k*A190167(n,k),k>=0).
a(n)=A110236(n) - A190166(n).

Examples

			a(4)=4 because in hhhh, huh'd, uh'dh, and uh'h'd, where u=(1,1), h=(1,0), d=(1,-1), we have 0+1+1+2 h-steps at odd levels (marked).
		

Crossrefs

Programs

  • Maple
    G := ((1-2*z+z^2-2*z^3+z^4)*1/2)/(z*(1-z+z^2)*sqrt((1+z+z^2)*(1-3*z+z^2)))-(1/2)/z: Gser:=series(G,z=0,36): seq(coeff(Gser,z,n),n=0..33);

Formula

G.f. = (1-2z+z^2-2z^3+z^4)/[2z(1-z+z^2)sqrt((1+z+z^2)(1-3z+z^2))]-1/(2z).
Conjecture: -(n-1)*(n+1)*a(n) -n*(n-19)*a(n-1) +2*(n-1)*(7*n-40)*a(n-2) -(n-2)*(17*n-97)*a(n-3) +2*(9*n^2-64*n+119)*a(n-4) -17*(n-4)*(n-5)*a(n-5) +(19*n-59)*(n-5)*a(n-6) -2*(8*n-21)*(n-6)*a(n-7) +2*(2*n-5)*(n-7)*a(n-8)=0. - R. J. Mathar, Apr 09 2019

A190172 Triangle read by rows: T(n,k) is the number of peakless Motzkin paths of length n having k UHD's; here U=(1,1), H=(1,0), and D=(1,-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 1, 16, 18, 3, 33, 40, 9, 69, 90, 25, 1, 146, 204, 69, 4, 312, 467, 183, 16, 673, 1074, 479, 56, 1, 1463, 2481, 1239, 185, 5, 3202, 5752, 3180, 576, 25, 7050, 13378, 8104, 1734, 105, 1, 15605, 31196, 20544, 5076, 405, 6, 34705, 72912, 51852, 14546, 1451, 36
Offset: 0

Views

Author

Emeric Deutsch, May 06 2011

Keywords

Comments

Number of entries in row n is 1+floor(n/3).
Sum of entries in row n = A004148 (the RNA secondary structure numbers).
T(n,0)=A004149(n).
Sum(k*T(n,k),k>=0)=A110236(n-2) (n>=3).

Examples

			T(5,1)=4 because we have HHUHD, HUHDH, UHDH, and UUHDD.
Triangle starts:
1;
1;
1;
1,1;
2,2;
4,4;
8,8,1;
16,18,3;
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G*(G-1-z+t*z): G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 17 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 17 do seq(coeff(P[n], t, k), k = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form

Formula

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

A089742 Number of subwords UHH...HD in all peakless Motzkin paths of length n+3, where U=(1,1), D=(1,-1) and H=(1,0).

Original entry on oeis.org

1, 3, 7, 17, 41, 99, 242, 596, 1477, 3681, 9215, 23155, 58368, 147530, 373768, 948882, 2413264, 6147414, 15682008, 40056238, 102434119, 262228051, 671945055, 1723350315, 4423518544, 11362907022, 29208834520, 75131251334, 193370093508
Offset: 0

Views

Author

Emeric Deutsch, Jan 08 2004

Keywords

Comments

This sequence can also be easily expressed using RNA secondary structure terminology.

Examples

			a(1)=3 because in the four peakless Motzkin paths of length 4, namely HHHH, H(UHD), (UHD)H and (UHHD), we have altogether three subwords of the required form (shown between parentheses).
		

Crossrefs

Cf. A004148.
Partial sums of A110236.

Programs

  • Maxima
    a(n):=sum(sum(j*sum((binomial(2*j+2*i,i)*sum(binomial(k,m-k-2*j-2*i)*binomial(k+2*j+2*i-1,k)*(-1)^(k-m),k,0,m-2*j-2*i))/(j+i),i,0,m/2-j),j,1,m/2),m,0,n+2); /* Vladimir Kruchinin, Mar 07 2016 */

Formula

G.f.= g^2/[(1-z)(1-z^2*g^2)], where g=(1-z+z^2-sqrt(1-2z-z^2-2*z^3+z^4))/(2z^2) is the g.f. of sequence A004148 (RNA secondary structures).
a(n) = Sum_{m=0..n+2 }(Sum_{j=1..m/2}(j*Sum_{i=0..m/2-j} ((binomial(2*j+2*i,i)*Sum_{k=0..m-2*j-2*i}(binomial(k,m-k-2*j-2*i)*binomial(k+2*j+2*i-1,k)*(-1)^(k-m)))/(j+i)))). - Vladimir Kruchinin, Mar 07 2016
D-finite with recurrence (n+2)*a(n) +(-4*n-5)*a(n-1) +(5*n-1)*a(n-2) +(-5*n+7)*a(n-3) +(5*n-3)*a(n-4) +(-5*n+9)*a(n-5) +(4*n-13)*a(n-6) +(-n+4)*a(n-7)=0. - R. J. Mathar, Jul 24 2022

A110235 Triangle read by rows: T(n,k)(1<=k<=n) is the number of peakless Motzkin paths of length n having k (1,0) steps (can be easily translated into RNA secondary structure terminology).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 0, 6, 0, 1, 0, 6, 0, 10, 0, 1, 1, 0, 20, 0, 15, 0, 1, 0, 10, 0, 50, 0, 21, 0, 1, 1, 0, 50, 0, 105, 0, 28, 0, 1, 0, 15, 0, 175, 0, 196, 0, 36, 0, 1, 1, 0, 105, 0, 490, 0, 336, 0, 45, 0, 1, 0, 21, 0, 490, 0, 1176, 0, 540, 0, 55, 0, 1, 1, 0, 196, 0, 1764, 0, 2520, 0
Offset: 1

Views

Author

Emeric Deutsch, Jul 17 2005

Keywords

Comments

Row sums yield A004148. sum(k*T(n,k),k=1..n)=A110236(n).

Examples

			T(5,3)=6 because we have UHDHH, UHHDH, UHHHD, HUHDH, HUHHD and HHUHD, where U=(1,1), D=(1,-1), H=(1,0).
Triangle starts:
1;
0, 1;
1, 0, 1;
0, 3, 0, 1;
1, 0, 6, 0, 1;
0, 6, 0, 10, 0, 1;
1, 0, 20, 0, 15, 0, 1;
0, 10, 0, 50, 0, 21, 0, 1;
1, 0, 50, 0, 105, 0, 28, 0, 1;
0, 15, 0, 175, 0, 196, 0, 36, 0, 1;
1, 0, 105, 0, 490, 0, 336, 0, 45, 0, 1; ...
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if n+k mod 2 = 0 then 2*binomial((n+k)/2,k)*binomial((n+k)/2,k-1)/(n+k) else 0 fi end: for n from 1 to 14 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • PARI
    T(n,k)=polcoeff(polcoeff(exp(sum(m=1,n,sum(j=0,m,binomial(m,j)^2*y^j*x^(m-j))*x^m/m)+O(x^(n+1))),n,x),k,y)
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print()) \\ Paul D. Hanna, Oct 21 2012

Formula

T(n, k) = [2/(n+k)]binomial((n+k)/2, k)*binomial((n+k)/2, k-1).
G.f.: g=g(t, z) satisfies g=1+tzg+z^2*g(g-1).
G.f.: A(x,y) = exp( Sum_{n>=1} [Sum_{k=0..n} C(n,k)^2 * y^k * x^(n-k)] * x^n/n ). - Paul D. Hanna, Oct 21 2012

A110237 Triangle read by rows: T(n,k) (0 <= k <= ceiling(n/2)-1) is the number of (1,0) steps at level k in all peakless Motzkin paths of length n (can be easily translated into RNA secondary structure terminology).

Original entry on oeis.org

1, 2, 3, 1, 6, 4, 13, 10, 1, 28, 24, 6, 62, 59, 21, 1, 140, 144, 62, 8, 320, 350, 174, 36, 1, 740, 852, 474, 128, 10, 1728, 2077, 1263, 410, 55, 1, 4068, 5072, 3318, 1240, 230, 12, 9645, 12412, 8634, 3608, 835, 78, 1, 23010, 30440, 22314, 10216, 2792, 376, 14
Offset: 1

Views

Author

Emeric Deutsch, Jul 17 2005

Keywords

Comments

Row n has ceiling(n/2) terms. Row sums yield A110236.

Examples

			T(5,1)=10 because in the 8 (=A004148(5)) peakless Motzkin paths of length 5, namely HHHHH, U(H)DHH, U(HH)DH, U(HHH)D, HU(H)DH, HU(HH)D, HHU(H)D and UUHDD (where U=(1,1), H=(1,0) and D=(1,-1)), we have altogether 10 H steps at level 1 (shown between parentheses).
Triangle starts:
   1;
   2;
   3,  1;
   6,  4;
  13, 10,  1;
		

Crossrefs

Programs

  • Maple
    g:=(1-z+z^2-sqrt(1-2*z-z^2-2*z^3+z^4))/2/z^2: G:=z*g^2/(1-t*z^2*g^2): Gser:=simplify(series(G,z=0,20)): for n from 1 to 15 do P[n]:=coeff(Gser,z^n) od: for n from 1 to 15 do seq(coeff(t*P[n],t^k),k=1..ceil(n/2)) od;
  • Maxima
    T(n,m):=(m+1)*sum((binomial(2*m+2*i+2,i)*sum(binomial(k,n-2*m-k-2*i-1)*binomial(2*m+k+2*i+1,k)*(-1)^(n-k-1),k,0,n-2*m-2*i-1))/(m+i+1),i,0,(n-1)/2-m); /* Vladimir Kruchinin, Mar 07 2016 */

Formula

G.f.: z*g^2/(1-tz^2*g^2), where g = 1 + zg + z^2*g(g-1) = (1 - z + z^2 - sqrt(1 - 2z - z^2 - 2z^3 + z^4))/(2z^2) is the g.f. of the RNA secondary structure numbers (A004148).
T(n,m) = (m+1)*Sum_{i=0..(n-1)/2-m}((binomial(2*m+2*i+2,i)*Sum_{k=0..n-2*m-2*i-1}(binomial(k,n-2*m-k-2*i-1)*binomial(2*m+k+2*i+1,k)*(-1)^(n-k-1)))/(m+i+1)). - Vladimir Kruchinin, Mar 07 2016
Showing 1-10 of 10 results.