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.

A333156 Number of Dyck paths with no UUU's and no DDD's, of semilength 2n and having exactly n (possibly overlapping) occurrences of the consecutive pattern UDUD, where U=(1,1) and D=(1,-1).

Original entry on oeis.org

1, 1, 1, 8, 20, 84, 448, 1500, 8085, 37895, 161161, 874328, 4053140, 19724964, 103818660, 499182288, 2574393657, 13320605595, 66783194335, 351243492600, 1816922207100, 9395207816280, 49712099948160, 259448325851520, 1367225671234800, 7260061875376752
Offset: 0

Views

Author

Alois P. Heinz, Mar 12 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x or t=8, 0,
         `if`(x=0, 1, expand(b(x-1, y+1, [2, 7, 4, 7, 2, 2, 8][t])
          +`if`(t=4, z, 1)  *b(x-1, y-1, [5, 3, 6, 3, 6, 8, 3][t]))))
        end:
    a:= n-> coeff(b(4*n, 0, 1),z,n):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y < 0 || y > x || t == 8, 0,
        If[x == 0, 1, Expand[b[x-1, y+1, {2, 7, 4, 7, 2, 2, 8}[[t]]] +
        If[t == 4, z, 1]    *b[x-1, y-1, {5, 3, 6, 3, 6, 8, 3}[[t]]]]]];
    a[n_] := Coefficient[b[4n, 0, 1], z, n];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)

Formula

a(n) = A166288(2n,n).
From Vaclav Kotesovec, Mar 25 2020: (Start)
Recurrence: 43*(n-3)*(n-2)*(n-1)*n*(n+3)*(29329371*n^8 - 668927160*n^7 + 6506375706*n^6 - 35220417132*n^5 + 115953126831*n^4 - 237666494332*n^3 + 296611537564*n^2 - 207261219680*n + 63003153728)*a(n) = - 4*(n-3)*(n-2)*(n-1)*(87988113*n^10 - 1918793367*n^9 + 21033212895*n^8 - 166219084485*n^7 + 1012118366637*n^6 - 4429730336313*n^5 + 12942580570661*n^4 - 23748947161707*n^3 + 25109635302718*n^2 - 12660105337632*n + 1551575603232)*a(n-1) + (n-3)*(n-2)*(17333658261*n^11 - 430003268082*n^10 + 4720195682289*n^9 - 30488738625378*n^8 + 130209568442559*n^7 - 391419388419558*n^6 + 854545434284843*n^5 - 1354517078622998*n^4 + 1497954483509776*n^3 - 1053300009224368*n^2 + 388719936912768*n - 43770999939840)*a(n-2) + 2*(n-3)*(75523130325*n^12 - 2175626218950*n^11 + 27885098744163*n^10 - 209720413989444*n^9 + 1027277775429867*n^8 - 3437608878152710*n^7 + 8015815014349173*n^6 - 13049567806279672*n^5 + 14668786642708680*n^4 - 11184194641379704*n^3 + 5732514658835232*n^2 - 2001452813291520*n + 419517078888960)*a(n-3) - 9*(n-4)*(3*n - 13)*(3*n - 11)^2*(3*n - 10)*(29329371*n^8 - 434292192*n^7 + 2645107974*n^6 - 8587188480*n^5 + 16087282131*n^4 - 17700650032*n^3 + 11496031852*n^2 - 4736806800*n + 1286464896)*a(n-4).
a(n) ~ c * d^n / n^2, where d = 5.710108688327460098727830084... is the largest real root of equation 729 - 5150*d - 591*d^2 + 12*d^3 + 43*d^4 = 0 and c = 0.6168196189025568013359529457528774707879625027815570205940188285182461138... (End)

A166290 Number of UDUD's in all Dyck paths of semilength n with no UUU's and no DDD's (U=(1,1), D=(1,-1)).

Original entry on oeis.org

0, 0, 1, 3, 9, 24, 63, 164, 423, 1088, 2794, 7168, 18385, 47158, 120991, 310537, 797381, 2048456, 5265059, 13539331, 34834238, 89665630, 230913976, 594938458, 1533501169, 3954384384, 10201142803, 26326101399, 67964928779, 175524139820
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 2009

Keywords

Examples

			a(3)=3 because UDUDUD, UDUUDD, UUDDUD, and UUDUDD have 2+0+0+1=3 UDUD's.
		

Crossrefs

Cf. A166288.

Programs

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

Formula

a(n) = Sum_{k>=0} k*A166288(n,k).
G.f. = (z-1)*(z+2)/(2*z^2) + (2-3*z-2*z^2-2*z^3+z^4) / [2*z^2*sqrt((1+z+z^2)*(1-3z+z^2))].
a(n) ~ sqrt(4 + 9/sqrt(5)) * (3+sqrt(5))^n / (sqrt(Pi*n) * 2^(n+1)). - Vaclav Kotesovec, Mar 20 2014. Equivalently, a(n) ~ phi^(2*n + 3) / (2 * 5^(1/4) * sqrt(Pi*n)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 08 2021
Conjecture: -(n+2)*(60283*n-319055)*a(n) +(-60283*n^2-13090*n+236862)*a(n-1) +(588710*n^2-2858167*n+437486)*a(n-2) +(-32043*n^2+2024290*n-2826488)*a(n-3) +(134686*n^2+585099*n-3417942)*a(n-4) +(-514307*n^2+4366464*n-8945002)*a(n-5) +(166729*n-863288)*(n-6)*a(n-6)=0. - R. J. Mathar, Jun 14 2016

A166289 Number of Dyck paths with no UUU's and no DDD's, of semilength n and having no UDUD's (U=(1,1), D=(1,-1)).

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 6, 9, 17, 26, 46, 81, 135, 246, 428, 757, 1373, 2431, 4411, 7990, 14434, 26423, 48137, 88144, 162086, 297662, 549342, 1014677, 1876551, 3480596, 6458974, 12008923, 22361683, 41675773, 77797373, 145368548, 271917704
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 2009

Keywords

Comments

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

Examples

			a(5)=4 because we have UDUUDDUUDD, UUDDUDUUDD, UUDDUUDDUD, and UUDUUDDUDD.
		

Crossrefs

Cf. A166288.

Programs

  • Maple
    F := RootOf(z^3*G^2-(1-z)*(1+z)^2*G+(1+z)^2, G): Fser := series(F, z = 0, 40): seq(coeff(Fser, z, n), n = 0 .. 36);

Formula

G.f.: G(z) satisfies z^3*G^2 - (1-z)(1+z)^2*G + (1+z)^2*G = 0.
D-finite with recurrence +(n+3)*a(n) +(n+1)*a(n-1) -2*n*a(n-2) +2*(-3*n+5)*a(n-3) +(-3*n+11)*a(n-4) +(n-5)*a(n-5)=0. - R. J. Mathar, Jul 22 2022
Showing 1-3 of 3 results.