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.

A135328 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k UDDU's starting at level 1.

Original entry on oeis.org

1, 1, 2, 4, 1, 10, 4, 29, 12, 1, 90, 36, 6, 290, 114, 24, 1, 960, 376, 86, 8, 3246, 1272, 303, 40, 1, 11164, 4380, 1074, 168, 10, 38934, 15293, 3838, 660, 60, 1, 137358, 54012, 13812, 2528, 290, 12, 489341, 192612, 50013, 9584, 1265, 84, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2007

Keywords

Comments

Each of rows 0, 1, 2 has one term; row n (n >= 1) has ceiling(n/2) terms. Row sums are the Catalan numbers (A000108). Column 0 yields A135334. - Emeric Deutsch, Dec 14 2007

Examples

			Triangle begins:
     1;
     1;
     2;
     4    1;
    10    4;
    29   12   1;
    90   36   6;
   290  114  24  1;
   960  376  86  8;
  3246 1272 303 40 1;
  ...
T(4,1)=4 because we have UDU(UDDU)D, U(UDDU)DUD, U(UDDU)UDD and UUD(UDDU)D (the UDDU's starting at level 1 are shown between parentheses).
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) options operator, arrow: (2*k+2)*(sum((-1)^(j-k)*binomial(j+1, k+1)*binomial(2*n-2*j-1,n),j=k..floor((1/2)*n-1/2)))/(n+1) end proc: 1; for n to 13 do seq(T(n,k),k=0..ceil((n-2)*1/2)) end do; # yields sequence in triangular form; Emeric Deutsch, Dec 14 2007
    G:=1+z*C^2/(1+(1-t)*z^2*C^2): C:=((1-sqrt(1-4*z))*1/2)/z: Gser:=simplify(series(G,z=0,16)): for n from 0 to 13 do P[n]:=sort(coeff(Gser,z,n)) end do: 1; for n to 13 do seq(coeff(P[n],t,j),j=0..floor((n-1)*1/2)) end do; # yields sequence in triangular form; Emeric Deutsch, Dec 14 2007
    # third Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, 1, expand(b(x-1, y+1, `if`(y=1, 1, 0))*
          `if`(t=3, z, 1))+b(x-1, y-1, `if`(t in [1, 2], t+1, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Nov 16 2019
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y < 0 || y > x, 0,
         If[x == 0, 1, Expand[b[x - 1, y + 1, If[y == 1, 1, 0]]*
         If[t == 3, z, 1]] + b[x - 1, y - 1, If[1 <= t <= 2, t + 1, 0]]]];
    T[n_] := CoefficientList[b[2n, 0, 0], z];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Feb 14 2021, after Alois P. Heinz *)

Formula

From Emeric Deutsch, Dec 14 2007: (Start)
T(n,k) = 2*((k+1)/(n+1))*Sum_{j=k..floor((n-1)/2)} (-1)^(j-k)*binomial(j+1, k+1)*binomial(2n-2j-1, n) (n >= 1).
G.f.: 1 + z*C^2/(1 + (1-t)*z^2*C^2), where C = (1-sqrt(1-4z))/(2z) is the g.f. of the Catalan numbers (A000108). (End)

Extensions

Edited and extended by Emeric Deutsch, Dec 14 2007

A182486 Expansion of 2 * (2 + x) / (4 - x - x * sqrt(1 - 4*x)) in powers of x.

Original entry on oeis.org

1, 1, 0, -1, -2, -4, -10, -29, -90, -290, -960, -3246, -11164, -38934, -137358, -489341, -1757882, -6360634, -23160528, -84802606, -312041692, -1153271984, -4279311348, -15935808866, -59537435012, -223099337404, -838282693560, -3157706225584, -11922241414880
Offset: 0

Views

Author

Michael Somos, May 02 2012

Keywords

Comments

HANKEL transform of sequence and the sequence omitting a(0) is the sequence A033999(n) = (-1)^n. This is the unique sequence with that property.

Examples

			G.f. = 1 + x - x^3 - 2*x^4 - 4*x^5 - 10*x^6 - 29*x^7 - 90*x^8 - 290*x^9 + ...
1 = det([ 1]) = det([ 1]). -1 = det([ 1, 1; 1, 0]) = det([ 1, 0; 0, -1]). 1 = det([ 1, 1, 0; 1, 0, -1; 0, -1, -2]) = det([ 1, 0, -1; 0, -1, -2; -2, -4, -10]).
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!(2*(2+x)/(4-x -x*Sqrt(1-4*x)))); // G. C. Greubel, Aug 11 2018
  • Mathematica
    CoefficientList[Series[2*(2+x)/(4-x -x*Sqrt[1-4*x]), {x, 0, 50}], x] (* G. C. Greubel, Aug 11 2018 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 2 * (2 + x) / (4 - x - x * sqrt(1 - 4*x + x * O(x^n))) ,n))}
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( subst( (1 + x) / (1 + x^2), x, serreverse( x - x^2 + x * O(x^n))), n))}
    

Formula

G.f.: 2 * (2 + x) / (4 - x - x * sqrt(1 - 4*x)).
G.f.: (4 - x + x * sqrt(1 - 4*x)) / (2 * (2 - 2*x + x^2)).
G.f.: 1 / (1 - x / (1 + x / (1 - x / (1 - x / (1 - x / ...))))).
a(n) = -A135334(n - 2) if n > 2. a(n) - a(n+1) = A035929(n).
D-finite with recurrence: 2*(-n+1)*a(n) +2*(5*n-11)*a(n-1) +3*(-3*n+7)*a(n-2) +2*(2*n-5)*a(n-3)=0. - R. J. Mathar, Jun 08 2016

A202020 Number of 4-colored Motzkin paths of length n with no peaks at level 1.

Original entry on oeis.org

1, 4, 16, 68, 305, 1428, 6914, 34368, 174438, 900392, 4712034, 24944268, 133335497, 718664500, 3901458106, 21313500576, 117081025390, 646328535800, 3583680016616, 19949056745160, 111447034042634
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A135334.

Programs

  • Mathematica
    CoefficientList[Series[(2*x^2-4*x+1-Sqrt[12*x^2-8*x+1])/(2*x^4-8*x^3+4*x^2), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 24 2012 *)
  • PARI
    z='z+O('z^50); Vec((2*z^2-4*z+1-sqrt(12*z^2-8*z+1))/(2*z^4-8*z^3+ 4*z^2)) \\ G. C. Greubel, Mar 29 2017

Formula

G.f.: (2*z^2-4*z+1 - sqrt(12*z^2-8*z+1))/(2*z^4-8*z^3+4 z^2).
Conjecture: 2(n+2)*a(n) -4*(5n+4)*a(n-1) +3*(19n-2)*a(n-2) +4*(11-14n)*a(n-4) +12*(n-1)*a(n-4)=0. - R. J. Mathar, Dec 18 2011
a(n) ~ 18*6^(n+3/2)/(49*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 24 2012
Showing 1-3 of 3 results.