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

A352916 a(n) = A025179(n-2) + A102839(n-4), for n >= 4, with a(0) = a(2) = 0 and a(1) = a(3) = 1.

Original entry on oeis.org

0, 1, 0, 1, 1, 5, 13, 41, 121, 366, 1100, 3319, 10015, 30253, 91433, 276475, 836291, 2530321, 7657317, 23175867, 70150875, 212349687, 642803631, 1945819299, 5890003539, 17828324220, 53961228258, 163314594513, 494238394601, 1495593167851, 4525366817455
Offset: 0

Views

Author

Kassie Archer, Apr 26 2022

Keywords

Comments

a(n) + 2*A025565(n) is the number of Dyck paths of semilength n+2 with L(D) = 4 where L(D) is the product of binomial coefficients (u_i(D)+d_i(D) choose u_i(D)), where u_i(D) is the number of up-steps between the i-th and (i+1)-st down step and d_i(D) is the number of down-steps between the i-th and (i+1)-st up step.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, irem(n, 2),
         ((3*(n-4))*(n^4+6*n^3-41*n^2+18*n+76)*a(n-2)+
          (2*n^5+3*n^4-136*n^3+525*n^2-658*n+132)*a(n-1))/
          ((n^4+2*n^3-53*n^2+114*n+12)*(n-1)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, May 19 2022
  • Mathematica
    m[n_] := m[n] = If[n == 0, 1, m[n-1] + Sum[m[k]*m[n-2-k], {k, 0, n-2}]];
    a[n_] := Switch[n, 0|2, 0, 1|3|4, 1, _, m[n-3] + Binomial[n-3, 2]*m[n-5] + 2*Sum[(i+1)*m[i]*m[n-5-i], {i, 0, n-5}]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 26 2022 *)
  • PARI
    m(n) = polcoeff( ( 1 - x - sqrt((1 - x)^2 - 4 * x^2 + x^3 * O(x^n))) / (2 * x^2), n); \\ A001006
    a(n) = if (n<=3, n%2, m(n-3) + binomial(n-3,2)*m(n-5) + 2*sum(i=0, n-5, (i+1)*m(i)*m(n-5-i))); \\ Michel Marcus, May 19 2022

Formula

a(n) = m(n-3) + binomial(n-3,2)*m(n-5) + 2*Sum_{i=0..n-5} (i+1)*m(i)*m(n-5-i) for n>=3, where m(n) = A001006(n) is the n-th Motzkin number.
a(n) ~ sqrt(n) * 3^(n - 7/2) / (4*sqrt(Pi)). - Vaclav Kotesovec, Jun 03 2022
D-finite with recurrence (n-1)*(n-69)*a(n) +(n^2+221*n-513)*a(n-1) +(-37*n^2+356*n-312)*a(n-2) +(47*n^2-859*n+2820)*a(n-3) +12*(7*n-30)*(n-6)*a(n-4)=0. - R. J. Mathar, Jul 17 2023

A091869 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k peaks at even height.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 6, 3, 1, 9, 16, 12, 4, 1, 21, 45, 40, 20, 5, 1, 51, 126, 135, 80, 30, 6, 1, 127, 357, 441, 315, 140, 42, 7, 1, 323, 1016, 1428, 1176, 630, 224, 56, 8, 1, 835, 2907, 4572, 4284, 2646, 1134, 336, 72, 9, 1, 2188, 8350, 14535, 15240, 10710, 5292, 1890, 480, 90, 10, 1
Offset: 1

Views

Author

Emeric Deutsch, Mar 10 2004

Keywords

Comments

Number of ordered trees with n edges having k leaves at even height. Row sums are the Catalan numbers (A000108). T(n,0)=A001006(n-1) (the Motzkin numbers). Sum_{k=0..n-1} k*T(n,k) = binomial(2n-2, n-2) = A001791(n-1). Mirror image of A091187.
T(n,k) is the number of Dyck paths of semilength n and having k dud's (here u=(1,1) and d=(1,-1)). Example: T(4,2)=3 because we have uud(du[d)ud], uu(dud)(dud) and uu(du[d)ud]d (the dud's are shown between parentheses).
T(n,k) is the number of Dyck paths of semilength n and containing exactly k double rises whose matching down steps form a doublefall. Example: UUUDUDDD has 2 double rises but only the first has matching Ds - the path's last 2 steps - forming a doublefall. (Travel horizontally east from an up step to encounter its matching down step.) - David Callan, Jul 15 2004
T(n,k) is the number of ordered trees on n edges containing k edges of outdegree 1. (The outdegree of an edge is the outdegree of its child vertex. Thus edges of outdegree 1 correspond to non-root vertices of outdegree 1.) T(3,2)=2 because
/\.../\.
|.....|.
each have one edge of outdegree 1. - David Callan, Oct 25 2004
Exponential Riordan array [exp(x)*Bessel_I(1,2x)/x, x]. - Paul Barry, Mar 09 2010
T(n, k) is the number of Dyck paths of semilength n and having k udu's (here u=(1,1) and d=(1,-1)). Note that reversing a path swaps u and d, thus udu becomes dud and vice versa. - Michael Somos, Feb 26 2020

Examples

			T(4,1)=6 because we have u(ud)dudud, udu(ud)dud, ududu(ud)d, uuudd(ud)d, u(ud)uuddd and uuu(ud)ddd (here u=(1,1), d=(1,-1) and the peaks at even height are shown between parentheses).
Triangle begins:
    1;
    1,    1;
    2,    2,    1;
    4,    6,    3,    1;
    9,   16,   12,    4,    1;
   21,   45,   40,   20,    5,    1;
   51,  126,  135,   80,   30,    6,   1;
  127,  357,  441,  315,  140,   42,   7,  1;
  323, 1016, 1428, 1176,  630,  224,  56,  8, 1;
  835, 2907, 4572, 4284, 2646, 1134, 336, 72, 9, 1;
  ...
		

Crossrefs

Programs

  • Maple
    T := proc(n,k) if k0, b(x-1, y-1, 0)*z^irem(t*y+t, 2), 0)+
          `if`(y (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
    seq(T(n), n=1..16);  # Alois P. Heinz, May 12 2017
  • Mathematica
    (* m = MotzkinNumber *) m[0] = 1; m[n_] := m[n] = m[n - 1] + Sum[m[k]*m[n - 2 - k], {k, 0, n - 2}]; t[n_, n_] = 1; t[n_, k_] := m[n - k]*Binomial[n - 1, k - 1]; Table[t[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 10 2013 *)
  • PARI
    {T(n, k) = my(y, c, w); if( k<0 || k>=n, 0, w = vector(n);   forvec(v=vector(2*n, k, [0, 1]), c=y=0; for(k=1, 2*n, if( 0>(y += (-1)^v[k]), break)); if( y, next); for(i=1, 2*n-2, c += ([0, 1, 0] == v[i..i+2])); w[c+1]++); w[k+1])}; /* Michael Somos, Feb 26 2020 */

Formula

T(n, k) = binomial(n-1, k)*(Sum_{j=0..ceiling((n-k)/2)} binomial(n-k, j)*binomial(n-k-j, j-1))/(n-k) for 0 <= k < n; T(n, k)=0 for k >= n.
G.f.: G = G(t, z) satisfies z*G^2 - (1 + z - t*z)*G + 1 + z - t*z = 0.
T(n, k) = M(n-k-1)*binomial(n-1, k), where M(n) = A001006(n) are the Motzkin numbers.
T(n+1, k+1) = n*T(n, k)/(k+1). - David Callan, Dec 09 2004
G.f.: 1/(1-x-xy-x^2/(1-x-xy-x^2/(1-x-xy-x^2/(1-x-xy-x^2/(1-... (continued fraction). - Paul Barry, Aug 03 2009
E.g.f.: exp(x+xy)*Bessel_I(1,2x)/x. - Paul Barry, Mar 10 2010

A102840 a(0)=0, a(1)=1, a(n)=((2*n-1)*a(n-1)-5*n*a(n-2))/(n-1).

Original entry on oeis.org

0, 1, 3, 0, -20, -45, 21, 308, 540, -585, -4235, -5676, 11232, 54145, 51975, -182400, -654160, -380205, 2680425, 7516400, 1320900, -36753255, -82175665, 24032700, 477852900, 850446025, -749925189, -5944471092, -8220606800, 14049061455, 71102953305, 71989187536, -220682377872
Offset: 0

Views

Author

Benoit Cloitre, Feb 27 2005

Keywords

Comments

n divides a(n) iff the binary representation of n ends with an even number of zeros (i.e. n is in A003159)

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{-5 n a[n-2] + (2*n - 1) a[n-1] + (1 - n) a[n] ==
    0, a[0] == 0, a[1] == 1}, a, {n, 0, 30}] (* Vaclav Kotesovec, Feb 15 2019 *)
    nxt[{n_,a_,b_}]:={n+1,b,(b(2n+1)-5a(n+1))/n}; NestList[nxt,{1,0,1},40][[;;,2]] (* Harvey P. Dale, Apr 22 2024 *)
  • PARI
    a(n)=if(n<2,if(n,1,0),1/(n-1)*((2*n-1)*a(n-1)-5*n*a(n-2)))

Formula

log(abs(a(n))) is asymptotic to c*n where c=0.80... [c = log(5)/2 = 0.8047189562... - Vaclav Kotesovec, Feb 15 2019]
a(n) ~ sqrt(n) * 5^(n/2) / sqrt(8*Pi) * ((sqrt(2 + sqrt(5)) + sqrt(38 + 25*sqrt(5)) / (16*n)) * sin(n*arctan(2)) - (sqrt(-2 + sqrt(5)) - sqrt(-38 + 25*sqrt(5)) / (16*n)) * cos(n*arctan(2))). - Vaclav Kotesovec, Feb 15 2019
From Seiichi Manyama, Jul 09 2024: (Start)
G.f.: x/(1 - 2*x + 5*x^2)^(3/2).
a(n+1) = binomial(n+2,2) * A343773(n). (End)

A374506 Expansion of 1/(1 - 2*x - 3*x^2)^(7/2).

Original entry on oeis.org

1, 7, 42, 210, 966, 4158, 17094, 67782, 261261, 983983, 3635632, 13217568, 47393892, 167919948, 588772152, 2045481480, 7048466271, 24111291897, 81939285582, 276810647190, 930096277110, 3109797881190, 10350813392010, 34309326304890, 113288127469335
Offset: 0

Views

Author

Seiichi Manyama, Jul 09 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= Pochhammer[n+1, 6]*Hypergeometric2F1[(1-n)/2, -n/2, 4, 4]/6!; Array[a,25,0] (* Stefano Spezia, Jul 10 2024 *)
  • PARI
    a(n) = binomial(n+6, 3)/20*sum(k=0, n\2, binomial(n+3, n-2*k)*binomial(2*k+3, k));

Formula

a(0) = 1, a(1) = 7; a(n) = ((2*n+5)*a(n-1) + 3*(n+5)*a(n-2))/n.
a(n) = (binomial(n+6,3)/20) * Sum_{k=0..floor(n/2)} binomial(n+3,n-2*k) * binomial(2*k+3,k).
a(n) = Pochhammer(n+1, 6)*hypergeom([(1-n)/2, -n/2], [4], 4)/6!. - Stefano Spezia, Jul 10 2024
a(n) = Sum_{k=0..n} (-2)^k * (3/2)^(n-k) * binomial(-7/2,k) * binomial(k,n-k). - Seiichi Manyama, Aug 23 2025

A245551 Expansion of 1/(1 - 2*x - 3*x^2)^(5/2).

Original entry on oeis.org

1, 5, 25, 105, 420, 1596, 5880, 21120, 74415, 258115, 883883, 2994355, 10051860, 33479460, 110750580, 364177332, 1191186855, 3877914915, 12571302975, 40598200335, 130657125984, 419173385400, 1340928798300, 4278305877300, 13617034683525, 43243221276801, 137040737988105
Offset: 0

Views

Author

N. J. A. Sloane, Jul 30 2014

Keywords

Comments

From Petros Hadjicostas, Jun 03 2020: (Start)
For n >= 4, 2*a(n-4) counts 3-sets of leaves in "0,1,2" Motzkin rooted trees with n edges. "0,1,2" trees are rooted trees where each vertex has out-degree zero, one, or two. They are counted by the Motzkin numbers A001006.
For "0,1,2" trees, Salaam (2008) proved that the g.f. of the number of r-sets of leaves is A000108(r-1) * z^(2*r-2) * T(z)^(2*r-1), where T(z) = 1/sqrt(1 - 2*z - 3*z^2) is the g.f. of the central trinomial numbers A002426.
For r = 2, we get a shifted version of A102839. For r = 3, we get twice of a shifted version of the current sequence. (End)

Examples

			From _Petros Hadjicostas_, Jun 03 2020: (Start)
Out of the A001006(4) = 9 Motzkin trees with n = 4 edges, only the following 2*a(4-4) = 2 have 3-sets of leaves:
            A                    A
           / \                  / \
          /   \                /   \
         B     C              B     C
        / \                        / \
       /   \                      /   \
      D     E                    D     E
      {C, D, E}                {B, D, E}
(End)
		

Crossrefs

Programs

  • Maple
    A[0]:= 1: A[1]:= 5:
    for n from 2 to 100 do
    A[n]:= (2+3/n)*A[n-1] + (3+9/n)*A[n-2]
    od:
    seq(A[n],n=0..100); # Robert Israel, Aug 01 2014
  • Mathematica
    CoefficientList[Series[1/(1 - 2 x - 3 x^2)^(5/2), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 01 2014 *)
  • PARI
    x='x+O('x^50); Vec(1/(1-2*x-3*x^2)^(5/2)) \\ G. C. Greubel, Apr 06 2017

Formula

a(n) ~ 3^(n+3/2) * n^(3/2) / (8*sqrt(Pi)). - Vaclav Kotesovec, Jul 31 2014
a(n) = (2+3/n)*a(n-1) + (3+9/n)*a(n-2) for n >= 2. - Robert Israel, Aug 01 2014
a(n) = (binomial(n+4,2)/6) * Sum_{k=0..floor(n/2)} binomial(n+2,n-2*k) * binomial(2*k+2,k). - Seiichi Manyama, Jul 10 2024
a(n) = Sum_{k=0..n} (-2)^k * (3/2)^(n-k) * binomial(-5/2,k) * binomial(k,n-k). - Seiichi Manyama, Aug 23 2025

A371408 Number of Dyck paths of semilength n having exactly three (possibly overlapping) occurrences of the consecutive step pattern UDU, where U = (1,1) and D = (1,-1).

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 20, 80, 315, 1176, 4284, 15240, 53295, 183700, 625768, 2110472, 7057505, 23427600, 77271120, 253426752, 827009523, 2686728060, 8693388060, 28026897360, 90058925649, 288516259416, 921755412900, 2937377079000, 9338728806225, 29626186593276
Offset: 0

Views

Author

Alois P. Heinz, Mar 22 2024

Keywords

Examples

			a(4) = 1: UDUDUDUD.
a(5) = 4: UDUDUDUUDD, UDUDUUDUDD, UDUUDUDUDD, UUDUDUDUDD.
		

Crossrefs

Column k=3 of A091869.

Programs

  • Maple
    a:= n-> `if`(n<4, 0, binomial(n-1, 3)*add(binomial(n-3, j)*
             binomial(n-3-j, j-1), j=0..ceil((n-3)/2))/(n-3)):
    seq(a(n), n=0..29);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<5, [0$4, 1][n+1],
         (n-1)*((2*n-7)*a(n-1)+3*(n-2)*a(n-2))/((n-2)*(n-4)))
        end:
    seq(a(n), n=0..29);

Formula

a(n) mod 2 = A121262(n) for n >= 1.

A139263 Number of two element anti-chains in Riordan trees on n edges (also called non-redundant trees, i.e., ordered trees where no vertex has out-degree equal to 1).

Original entry on oeis.org

0, 0, 1, 3, 14, 48, 172, 580, 1941, 6373, 20725, 66763, 213575, 679141, 2148948, 6771068, 21257741, 66529077, 207639925, 646480555, 2008458669, 6227766899, 19277394308, 59577651108, 183865477474, 566700165898, 1744578701517, 5364804428455, 16480883532586, 50582859417868, 155114365434224
Offset: 0

Views

Author

Lifoma Salaam, Apr 12 2008

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 35); [0,0] cat Coefficients(R!( (1 -x -Sqrt(1-2*x-3*x^2))*Sqrt(1-2*x-3*x^2)/(2*(1+x)*(1-2*x-3*x^2)^2) )); // G. C. Greubel, Jun 02 2020
  • Maple
    a:= proc(n) option remember; `if`(n<4, [0$2, 1, 3][n+1],
          ((4*n-3)*(n-2)*a(n-1)+(2*n+9)*(n-2)*a(n-2)-3*
           (4*n-9)*n*a(n-3)-9*(n-1)*n*a(n-4))/(n*(n-2)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jun 02 2020
  • Mathematica
    CoefficientList[Series[(1 -x -Sqrt[1-2*x-3*x^2])*Sqrt[1-2*x-3*x^2]/(2*(1+x)*(1 - 2*x-3*x^2)^2), {x, 0, 35}], x] (* G. C. Greubel, Jun 02 2020 *)
  • PARI
    default(seriesprecision, 50)
    f(x) = 1/sqrt(1-2*x-3*x^2);
    r(x) = (1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x));
    a(n) = polcoef(x^2*r(x)^2*f(x)^3, n, x);
    for(n=0, 30, print1(a(n), ",")) \\ Petros Hadjicostas, Jun 02 2020
    
  • Sage
    r(x)=(1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x))
    m(x)=(1-x-sqrt(1-2*x-3*x^2))/(2*x^2)
    g(x)=derivative(x*r(x),x)
    a(x)=x^2*(x*m(x)+1)^3*g(x)^3/r(x)
    taylor(a(x),x,0,30).list() # Petros Hadjicostas, Jun 02 2020
    

Formula

G.f.: A(x) = x^2 * (x*M(x) + 1)^3 * (d(x*R(x))/dx)^3/R(x), where M is the generating function for the Motzkin numbers and R is the generating function for the Riordan numbers.
From Petros Hadjicostas, Jun 02 2020: (Start)
Here R(x) = (1 + x - sqrt(1 - 2*x - 3*x^2))/(2*x*(1-x)) = g.f. of A005043 and M(x) = (1 - x - sqrt(1 - 2*x - 3*x^2))/(2*x^2) = g.f. of A001006.
If we let s(x) = sqrt(1 - 2*x - 3*x^2), then A(x) = x^2*((1 + x - s(x))/(2*x*(1 + x)))^2/s(x)^3 (see p. 40 in Salaam (2008)).
Alternatively, we may write A(x) = x^2 * R(x)^2 * B(x), where B(x) = g.f. of (A102839(n+1): n >= 0). (End)

Extensions

a(10)-a(30) from Petros Hadjicostas, Jun 02 2020

A374487 Expansion of 1/(1 - 2*x - 7*x^2)^(3/2).

Original entry on oeis.org

1, 3, 18, 70, 315, 1281, 5348, 21708, 88245, 355135, 1425270, 5692050, 22666735, 89986365, 356400840, 1408459928, 5555679849, 21877337979, 86020384730, 337769595870, 1324677499299, 5189411915897, 20308936981932, 79406140870500, 310206869770525, 1210898719869111
Offset: 0

Views

Author

Seiichi Manyama, Jul 09 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{x}, CoefficientList[Series[1/(1 - (7*x + 2)*x)^(3/2), {x, 0, 25}], x]] (* Paolo Xausa, Aug 25 2025 *)
  • PARI
    a(n) = binomial(n+2, 2)*sum(k=0, n\2, 2^k*binomial(n, 2*k)*binomial(2*k, k)/(k+1));

Formula

a(0) = 1, a(1) = 3; a(n) = ((2*n+1)*a(n-1) + 7*(n+1)*a(n-2))/n.
a(n) = binomial(n+2,2) * A025235(n).
From Seiichi Manyama, Aug 20 2025: (Start)
a(n) = ((n+2)/2) * Sum_{k=0..floor(n/2)} 2^k * binomial(n+1,n-2*k) * binomial(2*k+1,k).
a(n) = Sum_{k=0..n} (1/2)^k * (7/2)^(n-k) * (2*k+1) * binomial(2*k,k) * binomial(k,n-k). (End)
a(n) ~ sqrt(n) * (1 + 2*sqrt(2))^(n + 3/2) / (2^(11/4) * sqrt(Pi)). - Vaclav Kotesovec, Aug 21 2025

A374488 Expansion of 1/(1 - 2*x - 11*x^2)^(3/2).

Original entry on oeis.org

1, 3, 24, 100, 555, 2541, 12628, 59004, 281655, 1315765, 6171132, 28692456, 133315273, 616780815, 2848833120, 13124483344, 60364983987, 277142478921, 1270586298520, 5817063737100, 26600252408961, 121501917998263, 554429553154044, 2527595449990500
Offset: 0

Views

Author

Seiichi Manyama, Jul 09 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{x}, CoefficientList[Series[1/(1 - (11*x + 2)*x)^(3/2), {x, 0, 25}], x]] (* Paolo Xausa, Aug 25 2025 *)
  • PARI
    a(n) = binomial(n+2, 2)*sum(k=0, n\2, 3^k*binomial(n, 2*k)*binomial(2*k, k)/(k+1));

Formula

a(0) = 1, a(1) = 3; a(n) = ((2*n+1)*a(n-1) + 11*(n+1)*a(n-2))/n.
a(n) = binomial(n+2,2) * A025237(n).
From Seiichi Manyama, Aug 20 2025: (Start)
a(n) = ((n+2)/2) * Sum_{k=0..floor(n/2)} 3^k * binomial(n+1,n-2*k) * binomial(2*k+1,k).
a(n) = Sum_{k=0..n} (1/2)^k * (11/2)^(n-k) * (2*k+1) * binomial(2*k,k) * binomial(k,n-k). (End)
a(n) ~ sqrt(n) * (1 + 2*sqrt(3))^(n + 3/2) / (4 * 3^(3/4) * sqrt(Pi)). - Vaclav Kotesovec, Aug 21 2025
Showing 1-9 of 9 results.