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.

Previous Showing 51-60 of 79 results. Next

A059027 Number of Dyck paths of semilength n with no peak at height 4.

Original entry on oeis.org

1, 1, 2, 5, 13, 35, 97, 276, 805, 2404, 7343, 22916, 72980, 236857, 782275, 2625265, 8938718, 30834165, 107608097, 379454447, 1350434278, 4845475311, 17512579630, 63703732426, 233063976059, 857067469749, 3166309373615, 11745982220846
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2001

Keywords

Examples

			1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 35*x^5 + 97*x^6 + ...
		

References

  • Peart and Woan, in press, G_4(x).

Crossrefs

G_1, G_2, G_3, G_4 give A000957, A000108, A059019, A059027 resp.

Programs

  • Mathematica
    CoefficientList[Series[(2 - 3 x + x (1 - 4 x)^(1/2))/(2 - 5 x + x (1 - 4 x)^(1/2)), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 05 2013 *)
  • PARI
    x='x+O('x^66); Vec((2-3*x+x*(1-4*x)^(1/2))/(2-5*x+x*(1-4*x)^(1/2))) \\ Joerg Arndt, Oct 03 2013

Formula

G.f.: (2-3*x+x*(1-4*x)^(1/2))/(2-5*x+x*(1-4*x)^(1/2)).
a(n) = sum(k=1..n-2, sum(j=max(2*k-n+1,0)..k-1, (binomial(k,j)*((k-j)*binomial(2*n-3*k+j-3,n-1-2*k+j)))/(n-k-1)*2^j))+2^(n-1). - Vladimir Kruchinin, Oct 03 2013
a(n) ~ 4^n/(9*sqrt(Pi)*n^(3/2)) * (1+197/(24*n)). - Vaclav Kotesovec, Mar 20 2014

A105640 Triangle read by rows: T(n,k) is the number of hill-free Dyck paths of semilength n and having k UUDD's, where U=(1,1) and D=(1,-1) (0<=k<=floor(n/2), n>=2). A hill in a Dyck path is a peak at level 1.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 1, 5, 10, 3, 14, 29, 13, 1, 39, 89, 52, 6, 111, 279, 195, 36, 1, 322, 881, 722, 185, 10, 947, 2806, 2637, 867, 80, 1, 2818, 8997, 9528, 3846, 520, 15, 8470, 28997, 34163, 16382, 2976, 155, 1, 25677, 93858, 121749, 67696, 15631, 1246, 21
Offset: 2

Views

Author

Emeric Deutsch, May 08 2006

Keywords

Comments

Row n has 1+floor(n/2) terms. Row sums are the Fine numbers (A000957). T(n,0)=A105641(n). Sum(k*T(n,k),k=0..floor(n/2))=A116914(n).

Examples

			T(5,2)=3 because we have U(UUDD)(UUDD)D, (UUDD)U(UUDD)D and U(UUDD)D(UUDD) (the UUDD's are shown between parentheses).
Triangle starts:
  0,1;
  1,1;
  2,3,1;
  5,10,3;
  14,29,13,1;
  ...
		

Crossrefs

Programs

  • Maple
    G:=(1+2*z+z^2-t*z^2-sqrt(1-4*z+2*z^2-2*t*z^2+z^4-2*z^4*t+t^2*z^4))/2/z/(2+z+z^2-t*z^2)-1: Gser:=simplify(series(G,z=0,17)): for n from 2 to 14 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 2 to 14 do seq(coeff(P[n],t,j),j=0..floor(n/2)) od; # yields sequence in triangular form

Formula

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

A118974 Sum of the lengths of the first descents in all hill-free Dyck paths of semilength n (a hill in a Dyck path is a peak at level 1).

Original entry on oeis.org

0, 0, 2, 4, 11, 31, 94, 298, 977, 3283, 11243, 39087, 137569, 489171, 1754596, 6340756, 23063731, 84372061, 310216081, 1145748061, 4248861631, 15814069951, 59054807821, 221197379221, 830819449003, 3128511421663, 11808294045071, 44666151392095, 169294875129839
Offset: 0

Views

Author

Emeric Deutsch, May 08 2006

Keywords

Examples

			a(4)=11 because in the hill-free Dyck paths of semilength 4, namely uu(dd)uudd, uu(d)uuddd, uu(d)ududd, uuu(dd)udd, uuu(d)uddd and uuuu(dddd), the sum of the lengths of the first descents (shown between parentheses) is 2+1+1+2+1+4=11.
		

Crossrefs

Programs

  • Maple
    F:=(1-sqrt(1-4*z))/z/(3-sqrt(1-4*z)): C:=(1-sqrt(1-4*z))/2/z: g:=series(z^2*C*F*(1+C-z*C)/(1-z),z=0,32): seq(coeff(g,z,n),n=0..28);
  • Mathematica
    CoefficientList[Series[x^2*(1-Sqrt[1-4*x])/2/x*(1-Sqrt[1-4*x])/x/(3-Sqrt[1-4*x])*(1+(1-Sqrt[1-4*x])/2/x-x*(1-Sqrt[1-4*x])/2/x)/(1-x), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    my(x='x+O('x^50)); concat([0,0], Vec(x^2*(1-sqrt(1-4*x))/2/x*(1-sqrt(1-4*x))/x/(3-sqrt(1-4*x))*(1+(1-sqrt(1-4*x))/2/x-x*(1-sqrt(1-4*x))/2/x)/(1-x))) \\ G. C. Greubel, Mar 18 2017

Formula

a(n) = Sum_{k=1,..,n} k*A118972(n,k).
G.f.: z^2*C*F*(1+C-z*C)/(1-z), where F = (1-sqrt(1-4*z))/(z*(3-sqrt(1-4*z))) and C = (1-sqrt(1-4*z))/(2*z) is the Catalan function.
a(n) ~ 17*4^n/(27*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 20 2014
Conjecture: 2*(n+1)*(17*n^2-65*n+60)*a(n) -3*(3*n-4)*(17*n^2-48*n+15)*a(n-1) +3*(17*n^3-82*n^2+121*n-60)*a(n-2) +2*(2*n-5) *(17*n^2-31*n+12) *a(n-3)=0. - R. J. Mathar, Jun 22 2016

A119012 Number of valleys strictly above the x-axis in all hill-free Dyck paths of semilength n (a hill in a Dyck path is a peak at level 1).

Original entry on oeis.org

0, 0, 1, 5, 23, 98, 405, 1644, 6604, 26356, 104746, 415155, 1642493, 6490622, 25629581, 101156936, 399151400, 1574818496, 6213255614, 24515233082, 96739530062, 381803092580, 1507141137026, 5950525214360, 23498966702808
Offset: 1

Views

Author

Emeric Deutsch, May 08 2006

Keywords

Examples

			a(4)=5 because in the 6 (=A000957(5)) hill-free Dyck paths of semilength 4, namely UUUUDDDD, UUUD|UDDD, UUD|UUDDD, UUD|UD|UDD, UUUDD|UDD and UUDDUUDD (U=(1,1), D=(1,-1)) we have altogether 5 valleys strictly above the x-axis (indicated by |).
		

Crossrefs

Cf. A119011.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); [0,0] cat Coefficients(R!( 2*(1-3*x-(1-x)*Sqrt(1-4*x))/((1+2*x+ Sqrt(1-4*x))^2 *Sqrt(1-4*x)) )); // G. C. Greubel, Apr 06 2019
    
  • Maple
    G:=2*(1-3*z-(1-z)*sqrt(1-4*z))/(1+2*z+sqrt(1-4*z))^2/sqrt(1-4*z): Gser:=series(G,z=0,35): seq(coeff(Gser,z,n),n=1..30);
  • Mathematica
    Rest[CoefficientList[Series[2*(1-3*x-(1-x)*Sqrt[1-4*x])/(1+2*x+ Sqrt[1-4*x])^2/Sqrt[1-4*x], {x, 0, 30}], x]] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    x='x+O('x^30); concat([0,0], Vec(2*(1-3*x-(1-x)*sqrt(1-4*x)) /( (1+2*x+sqrt(1-4*x))^2*sqrt(1-4*x)))) \\ G. C. Greubel, Mar 19 2017
    
  • Sage
    a=(2*(1-3*x-(1-x)*sqrt(1-4*x)) /( (1+2*x+sqrt(1-4*x))^2* sqrt(1-4*x))).series(x, 30).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Apr 06 2019

Formula

a(n) = Sum_{k=0,..,n-2} k*A119011(n,k).
G.f.: 2*(1-3*z-(1-z)*sqrt(1-4*z))/((1+2*z+sqrt(1-4*z))^2*sqrt(1-4*z)).
a(n) ~ 2^(2*n+1)/(9*sqrt(Pi*n)). - Vaclav Kotesovec, Mar 20 2014
Conjecture: 2*(n-3)*(3*n-2)*(n+2)*a(n) +(-21*n^3+50*n^2-13*n-4)*a(n-1) -2*(n-1) *(2*n-1)*(3*n+1)*a(n-2)=0. - R. J. Mathar, Jun 22 2016

A135336 Number of Dyck paths of semilength n with no UUDU's starting at level 0.

Original entry on oeis.org

1, 1, 2, 4, 10, 28, 85, 271, 893, 3013, 10351, 36075, 127219, 453097, 1627378, 5887660, 21436354, 78484402, 288779728, 1067263660, 3960081904, 14746806292, 55094725918, 206450572930, 775724723086, 2922060848734
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2007

Keywords

Comments

Column 0 of A135330. Partial sums of the Fine sequence 1,0,1,2,6,18,... (A000957 without the first term). - Emeric Deutsch, Dec 14 2007

Examples

			a(3)=4 because among the 5 (=A000108(3)) Dyck paths of semilength 3 only UUDUDD does not qualify.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) options operator, arrow: (sum((-1)^j*(3*j+1)*binomial(2*n-3*j,n), j =0..floor((1/3)*n)))/(n+1) end proc: seq(a(n),n=0..25); # Emeric Deutsch, Dec 14 2007
  • Mathematica
    CoefficientList[Series[(1-Sqrt[1-4*x])/(2*x)/((1-x)*(1+x*(1-Sqrt[1-4*x])/(2*x))), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    x='x+O('x^50); Vec((1-sqrt(1-4*x))/(x*(1-x)*(3 - sqrt(1-4*x)))) \\ G. C. Greubel, Mar 21 2017

Formula

From Emeric Deutsch, Dec 14 2007: (Start)
a(n) = Sum_{j=0..floor(n/3)} (-1)^j*(3*j+1)*binomial(2*n-3*j,n)/(n+1).
G.f.: C/(1+z^3*C^3) = C/[(1-z)*(1+z*C)], where C = [1-sqrt(1-4*z)]/(2*z) is the g.f. of the Catalan numbers (A000108). (End)
a(n) ~ 4^(n+2)/(27*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 20 2014

Extensions

Edited and extended by Emeric Deutsch, Dec 14 2007

A167769 Pendular trinomial triangle (p=0), read by rows of 2n+1 terms (n>=0), defined by the recurrence : if 0

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 3, 6, 8, 6, 3, 1, 0, 0, 1, 4, 10, 18, 24, 18, 10, 4, 1, 0, 0, 1, 5, 15, 33, 57, 75, 57, 33, 15, 5, 1, 0, 0, 1, 6, 21, 54, 111, 186, 243, 186, 111, 54, 21, 6, 1, 0, 0, 1, 7, 28, 82, 193, 379, 622, 808, 622, 379, 193, 82, 28, 7, 1, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Nov 11 2009

Keywords

Comments

See A119369 for p=1 and A122445 for p=2. The diagonals may be generated by iterated convolutions of a base sequence B (A000108(n)) with the sequence C (A000957(n+1)) of central terms.

Examples

			Triangle begins :
  1;
  1, 0,  0;
  1, 1,  1,  0,  0;
  1, 2,  3,  2,  1,  0,  0;
  1, 3,  6,  8,  6,  3,  1,  0,  0;
  1, 4, 10, 18, 24, 18, 10,  4,  1, 0, 0,
  1, 5, 15, 33, 57, 75, 57, 33, 15, 5, 1, 0, 0; ...
		

References

  • Kim, Ki Hang; Rogers, Douglas G.; Roush, Fred W. Similarity relations and semiorders. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 577--594, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561081 (81i:05013) - From N. J. A. Sloane, Jun 05 2012

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k=0 and n=0 then 1;
        elif k<0 or k>2*(n-1) then 0;
        elif n=2 and k<3 then 1;
        elif kG. C. Greubel, Mar 17 2021
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 && n==0, 1, If[k<0 || k>2*(n-1), 0, If[n==2 && k<3, 1, If[kG. C. Greubel, Mar 17 2021 *)
  • PARI
    T(n, k)=if(k==0 && n==0, 1, if(k>2*n-2 || k<0, 0, if(n==2 && k<=2, 1, if(kPaul D. Hanna, Nov 12 2009
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0 and n==0): return 1
        elif (k<0 or k>2*(n-1)): return 0
        elif (n==2 and k<3): return 1
        elif (kG. C. Greubel, Mar 17 2021

Formula

Sum_{k=0..2*n} T(n,k) = A071724(n) = [n=0] + 3*binomial(2n,n-1)/(n+2) = [n=0] + n*C(n)/(n+2), where C(n) are the Catalan numbers (A000108). - G. C. Greubel, Mar 17 2021

A171368 Another version of A126216.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 0, 5, 0, 1, 0, 0, 5, 0, 9, 0, 1, 0, 0, 0, 21, 0, 14, 0, 1, 0, 0, 14, 0, 56, 0, 20, 0, 1, 0, 0, 0, 84, 0, 120, 0, 27, 0, 1, 0, 0, 42, 0, 300, 0, 225, 0, 35, 0, 1, 0, 0, 0, 330, 0, 825, 0, 385, 0, 44, 0, 1, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 06 2009

Keywords

Comments

Expansion of the first column of the triangle T_(0,x), T_(x,y) defined in A039599; T_(0,0)= A053121, T_(0,1)= A089942, T_(0,2)= A126093, T_(0,3)= A126970.
T(n,k) is the number of Riordan paths of length n with k horizontal steps. A Riordan path is a Motzkin path with no horizontal steps on the x-axis. - Emanuele Munarini, Oct 14 2023

Examples

			Triangle begins:
  1 ;
  0,0 ;
  1,0,0 ;
  0,1,0,0 ;
  2,0,1,0,0 ;
  0,5,0,1,0,0 ;
  5,0,9,0,1,0,0 ;
  ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A099323(n+1), A126120(n), A005043(n), A000957(n+1), A117641(n) for x = -1, 0, 1, 2, 3 respectively.

A237619 Riordan array (1/(1+x*c(x)), x*c(x)) where c(x) is the g.f. of Catalan numbers (A000108).

Original entry on oeis.org

1, -1, 1, 0, 0, 1, -1, 1, 1, 1, -2, 2, 3, 2, 1, -6, 6, 8, 6, 3, 1, -18, 18, 24, 18, 10, 4, 1, -57, 57, 75, 57, 33, 15, 5, 1, -186, 186, 243, 186, 111, 54, 21, 6, 1, -622, 622, 808, 622, 379, 193, 82, 28, 7, 1, -2120, 2120, 2742, 2120, 1312, 690, 311, 118, 36, 8, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 10 2014

Keywords

Examples

			Triangle begins:
    1;
   -1,  1;
    0,  0,  1;
   -1,  1,  1,  1;
   -2,  2,  3,  2,  1;
   -6,  6,  8,  6,  3,  1;
  -18, 18, 24, 18, 10,  4, 1;
  -57, 57, 75, 57, 33, 15, 5, 1;
Production matrix begins:
  -1, 1;
  -1, 1, 1;
  -1, 1, 1, 1;
  -1, 1, 1, 1, 1;
  -1, 1, 1, 1, 1, 1;
  -1, 1, 1, 1, 1, 1, 1;
  -1, 1, 1, 1, 1, 1, 1, 1;
  -1, 1, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Mathematica
    A065602[n_, k_]:= A065602[n, k]= Sum[(k-1+2*j)*Binomial[2*(n-j)-k-1, n-1]/(2*(n - j) -k-1), {j,0,(n-k)/2}];
    T[n_, k_]:= If[k==0, A065602[n, 0], If[n==1 && k==1, 1, A065602[n, k]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 27 2022 *)
  • SageMath
    def A065602(n, k): return sum( (k+2*j-1)*binomial(2*n-2*j-k-1, n-1)/(2*n-2*j-k-1) for j in (0..(n-k)//2) )
    def A237619(n, k):
        if (n<2): return (-1)^(n-k)
        elif (k==0): return A065602(n, 0)
        else: return A065602(n, k)
    flatten([[A237619(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 27 2022

Formula

Sum_{k=0..n} T(n,k)*x^k = A126983(n), A000957(n+1), A026641(n) for x = 0, 1, 2 respectively.
T(n, k) = A167772(n-1, k-1) for k > 0, with T(n, 0) = A167772(n, 0).
T(n, 0) = A126983(n).
T(n+1, 1) = A000957(n+1).
T(n+2, 2) = A000958(n+1).
T(n+3, 3) = A104629(n) = A000957(n+3).
T(n+4, 4) = A001558(n).
T(n+5, 5) = A001559(n).
T(n, k) = A065602(n, k) for k > 0, with T(n, k) = (-1)^(n-k), for n < 2, and T(n, 0) = A065602(n, 0). - G. C. Greubel, May 27 2022

A253831 Number of 2-Motzkin paths with no level steps at height 1.

Original entry on oeis.org

1, 2, 5, 12, 30, 76, 197, 522, 1418, 3956, 11354, 33554, 102104, 319608, 1027237, 3381714, 11371366, 38946892, 135505958, 477781296, 1703671604, 6132978608, 22256615602, 81327116484, 298938112816, 1104473254912, 4098996843500, 15272792557230, 57106723430892, 214202598271360, 805743355591301
Offset: 0

Views

Author

Keywords

Comments

For n=3 we have 12 paths: H(1)H(1)H(1), H(1)H(1)H(2), H(1)H(2)H(1), H(1)H(2)H(2), H(2)H(1)H(1), H(2)H(1)H(2), H(2)H(2)H(1), H(2)H(2)H(2), UDH(1), UDH(2), H(1)UD, H(2)UD.

Crossrefs

Programs

  • Maple
    rec:= (54+36*n)*a(n)+(-3+7*n)*a(n+1)+(-60-36*n)*a(n+2)+(36+16*n)*a(n+3)+(-6-2*n)*a(n+4) = 0:
    f:= gfun:-rectoproc({rec,seq(a(i)=[1,2,5,12][i+1],i=0..3)},a(n),remember):
    seq(f(n),n=0..100); # Robert Israel, Apr 29 2015
  • Mathematica
    CoefficientList[Series[1/(1-2*x-x*((1-Sqrt[1-4*x])/(3-Sqrt[1-4*x]))), {x, 0, 20}], x] (* Vaclav Kotesovec, Apr 21 2015 *)
  • Maxima
    a(n):=sum(sum(((sum((k+1)*binomial(k+m,k+1)*binomial(2*j-k+m-1,j-k)*(-1)^(k),k,0,j))*2^(n-j-2*m)*binomial(n-m-j,m))/(j+m),j,0,n-2*m),m,1,n/2)+2^n; /* Vladimir Kruchinin, Mar 11 2016 */

Formula

G.f.: 1/(1-2*x-x*F(x)), where F(x) is the g.f. of Fine numbers A000957.
G.f.: 2*(2+x)/(4-7*x-6*x^2+x*sqrt(1-4*x)).
a(n) ~ 4^(n+1) / (25*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 21 2015
(54+36*n)*a(n)+(-3+7*n)*a(n+1)+(-60-36*n)*a(n+2)+(36+16*n)*a(n+3)+(-6-2*n)*a(n+4) = 0. - Robert Israel, Apr 29 2015
a(n) = Sum_{m=1..n/2}(Sum_{j=0..n-2*m}(((Sum_{k=0..j}((k+1)*binomial(k+m,k+1)*binomial(2*j-k+m-1,j-k)*(-1)^(k)))*2^(n-j-2*m)*binomial(n-m-j,m))/(j+m)))+2^n. - Vladimir Kruchinin, Mar 11 2016

A294527 Number of Dyck paths of length 2n with exactly 2 hills.

Original entry on oeis.org

0, 0, 1, 0, 3, 6, 21, 66, 220, 744, 2562, 8942, 31569, 112530, 404445, 1464042, 5332872, 19532688, 71893470, 265778040, 986416614, 3674092044, 13729259586, 51455182260, 193369903608, 728504292576, 2750904025276, 10409856537786, 39470613237645, 149935171349546
Offset: 0

Views

Author

Eric M. Schmidt, Nov 01 2017

Keywords

Crossrefs

Column k=2 of A065600. Cf. A000957, A065601.

Programs

  • Mathematica
    a[n_] := Which[n>2, Sum[(i Binomial[i+2, i] Binomial[2n-2i-4, n-2])/(n-i-2), {i, 0, (n-2)/2}], n == 2, 1, True, 0];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jul 27 2018 *)

Formula

Conjecture: 2*(3*n-5) *(n-2) *(3*n+11) *(n+1) *a(n) -(3*n+11) *(n-3) *(21*n^2-35*n+10) *a(n-1) -2*(3*n+11) *(n-1) *(2*n-1) *(3*n-2) *a(n-2)= 0. - R. J. Mathar, Jun 24 2018
Previous Showing 51-60 of 79 results. Next