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 11-20 of 590 results. Next

A026945 A bisection of the Motzkin numbers A001006.

Original entry on oeis.org

1, 2, 9, 51, 323, 2188, 15511, 113634, 853467, 6536382, 50852019, 400763223, 3192727797, 25669818476, 208023278209, 1697385471211, 13933569346707, 114988706524270, 953467954114363, 7939655757745265, 66368199913921497
Offset: 0

Views

Author

Keywords

Comments

a(n) is the sum of the squares of numbers in row n of array T given by A026300.
Number of closed walks of length 2n on the one-way infinite ladder graph starting from (and ending at) a node of degree 2. - Mitch Harris, Mar 06 2004
a(n) is the number of ways to connect 2n points labeled 1,2,...,2n in a line with 0 or more noncrossing arcs. For example, with arcs separated by dashes, a(2)=9 counts {} (no arcs), 12, 13, 14, 23, 24, 34, 12-34, 14-23. - David Callan, Sep 18 2007

Crossrefs

Programs

  • Maple
    G:=(1-x-(1-2*x-3*x^2)^(1/2))/(2*x^2): GG:=series(G,x=0,60): 1, seq(coeff(GG,x^(2*n)),n=1..23);
    a := n -> hypergeom([1/2-n, -n], [2], 4);
    seq(simplify(a(n)), n=0..29); # Peter Luschny, May 15 2016
  • Mathematica
    Table[SeriesCoefficient[(1-x-Sqrt[1-2*x-3*x^2])/(2*x^2),{x,0,2*n}],{n,0,20}] (* Vaclav Kotesovec, Oct 08 2012 *)
    MotzkinNumber = DifferenceRoot[Function[{y, n}, {(-3n-3)*y[n] + (-2n-5)*y[n+1] + (n+4)*y[n+2] == 0, y[0] == 1, y[1] == 1}]];
    Table[MotzkinNumber[2n], {n, 0, 20}] (* Jean-François Alcover, Oct 27 2021 *)
  • PARI
    C(n)=binomial(2*n,n)/(n+1);
    a(n)=sum(k=0,n, binomial(2*n,2*k)*C(k));
    \\ Joerg Arndt, May 04 2013
    
  • PARI
    {a(n)=polcoeff(1/x*serreverse( x * (1-x) * (1-2*x)^2 /(1 - 3*x + 3*x^2 +x^2*O(x^n)) ),n)}
    for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Oct 03 2014

Formula

a(n) = A005043(2n) + A005043(2n+1). - Ralf Stephan, Feb 06 2004
a(n) = Sum_{k=0..n} binomial(2n,2k)*C(k), C(n)=A000108(n); - Paul Barry, Jul 11 2008
a(n) = (2/Pi)*integral(x=-1..1, (1+2*x)^(2*n)*sqrt(1-x^2)). - Peter Luschny, Sep 11 2011
D-finite with recurrence: (n+1)*(2*n+1)*a(n) = (14*n^2+9*n-2)*a(n-1) + 3*(14*n^2-51*n+43)*a(n-2) - 27*(n-2)*(2*n-5)*a(n-3). - Vaclav Kotesovec, Oct 08 2012
a(n) ~ 3^(2*n+3/2)/(2^(5/2)*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 08 2012
G.f.: (1/x) * Series_Reversion( x * (1-x) * (1-2*x)^2 / (1 - 3*x + 3*x^2) ). - Paul D. Hanna, Oct 03 2014
From Peter Luschny, May 15 2016: (Start)
a(n) = ((9-9*n)*(2*n-3)*(4*n+1)*a(n-2)+((8*n-2))*(10*n^2-5*n-3)*a(n-1))/((1+2*n)*(4*n-3)*(n+1)) for n>=2.
a(n) = hypergeom([1/2-n, -n], [2], 4). (End)

Extensions

Entry revised by N. J. A. Sloane, Nov 16 2004

A099250 Bisection of Motzkin numbers A001006.

Original entry on oeis.org

1, 4, 21, 127, 835, 5798, 41835, 310572, 2356779, 18199284, 142547559, 1129760415, 9043402501, 73007772802, 593742784829, 4859761676391, 40002464776083, 330931069469828, 2750016719520991, 22944749046030949, 192137918101841817, 1614282136160911722
Offset: 0

Views

Author

N. J. A. Sloane, Nov 16 2004

Keywords

Comments

a(n) is the number of grand Motzkin paths from (0,0) to (2n+2,0) that avoid vertices (k,0) for all odd k and end on a down step. - Alexander Burstein, May 11 2021

Crossrefs

Programs

  • Maple
    G:=(1-x-(1-2*x-3*x^2)^(1/2))/(2*x^2): GG:=series(G,x=0,60): seq(coeff(GG,x^(2*n-1)),n=1..24);  # Emeric Deutsch
    M := proc(n) option remember; `if`(n<2,1,(3*(n-1)*M(n-2)+(2*n+1)*M(n-1))/(n+2)) end: A099250 := n -> M(2*n+1):
    seq(A099250(i),i=0..20); # Peter Luschny, Sep 11 2011
  • Mathematica
    Take[CoefficientList[Series[(1-x-(1-2x-3x^2)^(1/2))/(2x^2), {x,0,60}], x], {2,-1,2}] (* Harvey P. Dale, Sep 11 2011 *)
    Table[Hypergeometric2F1[-1/2-n, -n, 2, 4], {n, 0, 30}] (* Jean-François Alcover, Apr 03 2015 *)
    MotzkinNumber = DifferenceRoot[Function[{y, n}, {(-3n-3)*y[n] + (-2n-5)*y[n+1] + (n+4)*y[n+2] == 0, y[0] == 1, y[1] == 1}]];
    Table[MotzkinNumber[2n+1], {n, 0, 20}] (* Jean-François Alcover, Oct 27 2021 *)
  • PARI
    my(x='x+O('x^66)); v=Vec((1-x-(1-2*x-3*x^2)^(1/2))/(2*x^2)); vector(#v\2,n,v[2*n]) \\ Joerg Arndt, May 12 2013
    
  • PARI
    {a(n)=polcoeff(1/x*serreverse( x*(1+x)/((1+2*x)^2*(1+x+x^2) +x^2*O(x^n)) ),n)}
    for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Oct 03 2014

Formula

a(n) = (2/Pi)*Integral_{x=-1..1} (1+2*x)^(2*n+1)*sqrt(1-x^2). [Peter Luschny, Sep 11 2011]
Recurrence: (n+1)*(2*n+3)*a(n) = (14*n^2+23*n+6)*a(n-1) + 3*(14*n^2-37*n+21)*a(n-2) - 27*(n-2)*(2*n-3)*a(n-3). - Vaclav Kotesovec, Oct 17 2012
a(n) ~ 3^(2*n+5/2)/(4*sqrt(2*Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 17 2012
G.f.: (1/x) * Series_Reversion( x*(1+x) / ( (1+2*x)^2 * (1+x+x^2) ) ). - Paul D. Hanna, Oct 03 2014
From Peter Bala, Apr 20 2024: (Start)
a(n) = Sum_{k = 0..2*n+1} (-1)^(k+1) * binomial(2*n+1, k)*Catalan(k+1).
a(n) = Sum_{k = 0..2*n+1} (-1)^k * binomial(2*n+1, k)*Catalan(k+1)*3^(2*n-k+1).
(4*n - 1)*(2*n + 3)*(n + 1)*a(n) = 2*(4*n + 1)*(10*n^2 + 5*n - 3)*a(n-1) - 9*(4*n + 3)*(2*n - 1)*(n - 1)*a(n-2) with a(0) = 1 and a(1) = 4. (End)

Extensions

More terms from Emeric Deutsch, Nov 17 2004

A026107 Second differences of Motzkin numbers (A001006).

Original entry on oeis.org

1, 3, 7, 18, 46, 120, 316, 841, 2257, 6103, 16611, 45475, 125139, 345957, 960417, 2676291, 7483299, 20989833, 59042805, 166520124, 470781528, 1333970190, 3787707322, 10775741271, 30711538351, 87677551081, 250704001213, 717923179762
Offset: 2

Views

Author

Keywords

Comments

Number of (s(0), s(1), ..., s(n)) such that every s(i) is a nonnegative integer, s(0) = 0, s(1) = 1 = s(n), |s(i) - s(i-1)| <= 1 for i >= 2. Also a(n) = T(n,n-1), where T is array in A026105 and U(n,n+1), where U is array in A026120.
Also number of (s(0),s(1),...,s(n)) such that every s(i) is a nonnegative integer, s(0) = 1, s(n) = 0, |s(1) - s(0)| = 1, |s(i) - s(i-1)| <= 1 for i >= 2.
Number of Motzkin paths of length n+1 that start with a (1,1) step and end with a (1,-1) step. - Emeric Deutsch, Jul 11 2001
Equals iterates of M * [1,1,1,1,0,0,0,...] where M = an infinite tridiagonal matrix with [0,1,1,1,...] in the main diagonal and [1,1,1,...] in the super- and subdiagonals. - Gary W. Adamson, Jan 08 2009
Number of Motzkin paths of length n-1 that are allowed to go down to the line y=-1 [He-Shapiro, page 38]. - R. J. Mathar, Jul 23 2017
With offset 1, a[n] = [x^n](1 + x + x^2)^n - [x^(n-4)](1 + x + x^2)^n, that is, the difference between the n-th central trinomial coefficient and its fourth predecessor. For example, with n = 4, (1 + x + x^2)^4 = 1 + 4*x + 10*x^2 + 16*x^3 + 19*x^4 + 16*x^5 + 10*x^6 + 4*x^7 + x^8 and a(4) = 19 - 1. - David Callan, Dec 18 2021

Crossrefs

Cf. A001006. First differences of A002026.
Cf. A026122.

Formula

a(n) = A001006(n+1) - 2*A001006(n) + A001006(n-1).
The sequence 1,1,3,7,18,... has a(n) = Sum_{k=0..n} binomial(n,2k)*A000108(k+1). - Paul Barry, Jul 18 2003
G.f.: ((1-z)^2*M - 1 + z - z^2)/z, where M is the generating function of the Motzkin sequence A001006 (M = 1 + z*M + z^2*M^2).
(n+3)*a(n) + 3*(-n-1)*a(n-1) + (-n-3)*a(n-2) + 3*(n-3)*a(n-3) = 0. - R. J. Mathar, Nov 26 2012
a(n) ~ 2 * 3^(n + 1/2) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Sep 17 2019
With offset 0 and a(0) = 1 prepended (see Paul Barry's formula above), a(n) = hypergeom([3/2, (1 - n)/2, -n/2], [1/2, 3], 4). - Peter Luschny, Dec 19 2021

Extensions

Simpler definition from Ralf Stephan, Dec 16 2004

A120895 G.f. satisfies: A(x) = G(x)*A(x^3*G(x)^2) where G(x) is the g.f. of the Motzkin numbers (A001006).

Original entry on oeis.org

1, 1, 2, 5, 12, 30, 78, 206, 552, 1498, 4105, 11340, 31541, 88237, 248076, 700478, 1985397, 5646129, 16104378, 46056513, 132031176, 379315946, 1091890772, 3148736064, 9095091878, 26310816944, 76219704957, 221085782559, 642058752476, 1866693825362, 5432795508417
Offset: 0

Views

Author

Paul D. Hanna, Jul 14 2006

Keywords

Comments

Equals column 0 and main diagonal of triangle A120894 (cascadence of 1+x+x^2).

Examples

			A(x) = 1 + x + 2*x^2 + 5*x^3 + 12*x^4 + 30*x^5 + 78*x^6 + 206*x^7+...
= G(x)*A(x^3*G(x)^2) where
G(x) = 1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 21*x^5 + 51*x^6 + 127*x^7 +...
is the g.f. of the Motzkin numbers (A001006) so that G(x) satisfies:
G(x) = 1 + x*G(x) + x^2*G(x)^2.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(A=1+x,G=1/x*serreverse(x/(1+x+x^2+x*O(x^n)))); for(i=0,n,A=G*subst(A,x,x^3*G^2 +x*O(x^n)));polcoeff(A,n,x)}

A248137 Least positive integer m such that m + n divides M(m) + M(n), where M(.) is given by A001006.

Original entry on oeis.org

1, 1, 244, 1, 23, 4, 1, 1, 3494, 1, 68058, 4, 20, 18, 35, 1, 4, 14, 32, 13, 21, 1, 5, 22, 172, 7, 8, 1, 1, 28, 14, 19, 2, 178, 15, 227, 2, 6, 109, 1, 22, 122, 47, 22, 126, 1, 43, 60, 41, 18, 24, 1, 13, 23, 21, 24, 126, 1, 152, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 02 2014

Keywords

Comments

Conjecture: a(n) exists for any n > 0.

Examples

			a(5) = 23 since 5 + 23 = 28 divides M(5) + M(23) = 21 + 1129760415 = 1129760436 = 28*40348587.
		

Crossrefs

Programs

  • Mathematica
    M[n_]:=Sum[Binomial[n,2k]Binomial[2k,k]/(k+1),{k,0,n/2}]
    Do[m=1;Label[aa];If[Mod[M[m]+M[n],m+n]==0,Print[n," ",m];Goto[bb]];m=m+1;Goto[aa];Label[bb];Continue,{n,1,60}]

A167630 Riordan array (1/(1-x),xm(x)) where m(x) is the g.f. of Motzkin numbers A001006.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 8, 8, 4, 1, 1, 17, 20, 13, 5, 1, 1, 38, 50, 38, 19, 6, 1, 1, 89, 126, 107, 63, 26, 7, 1, 1, 216, 322, 296, 196, 96, 34, 8, 1, 1, 539, 834, 814, 588, 326, 138, 43, 9, 1, 1, 1374, 2187, 2236, 1728, 1052, 507, 190, 53, 10, 1
Offset: 0

Views

Author

Philippe Deléham, Nov 07 2009

Keywords

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  1;
  1,  4,  3,  1;
  1,  8,  8,  4,  1;
  1, 17, 20, 13,  5, 1;
  1, 38, 50, 38, 19, 6, 1;
  ...
		

Crossrefs

Antidiagonal sums give A082395.
Row sums give A383527.
Diagonals include: A006416, A034856, A086615, A140662.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k=0, 1,
          `if`(k>n, 0, T(n-1, k-1)+T(n-1, k)+T(n-1, k+1)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Apr 20 2018
  • Mathematica
    T[, 0] = T[n, n_] = 1;
    T[n_, k_] /; 0, ] = 0;
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2019 *)

Formula

T(n,0)=1, T(0,k)=0 for k>0, T(n,k)=0 if k>n, T(n,k)=T(n-1,k-1)+T(n-1,k)+T(n-1,k+1).
Sum_{k=0..n} k * T(n,k) = A003462(n). - Alois P. Heinz, Apr 20 2018
Sum_{k=0..n} (-1)^(k+1) * T(n,k) = A082397(n-2) for n>=2. - Alois P. Heinz, May 02 2025

A116387 Expansion of 1/(sqrt(1-2*x-3*x^2)*(2-M(x))), where M(x) is the g.f. of the Motzkin numbers A001006.

Original entry on oeis.org

1, 2, 7, 22, 72, 234, 763, 2486, 8099, 26372, 85833, 279226, 907946, 2951066, 9587981, 31140034, 101104048, 328162170, 1064856217, 3454513274, 11204337056, 36332719182, 117795920249, 381848062066, 1237615088203, 4010710218384
Offset: 0

Views

Author

Paul Barry, Feb 12 2006

Keywords

Comments

Binomial transform of A116383.
The substitution x-> x/(1+x+x^2) in the g.f. (this might be called an inverse Motzkin transform) yields the g.f. of A074331. - R. J. Mathar, Nov 10 2008

Programs

  • GAP
    List([0..30], n-> Sum([0..n], k-> Sum([0..n], j-> Binomial(n, j-k)*Binomial(j, n-j) ))); # G. C. Greubel, May 23 2019
  • Magma
    [(&+[ (&+[Binomial(n, j-k)*Binomial(j, n-j): j in [0..n]]) : k in [0..n]]): n in [0..30]]; // G. C. Greubel, May 23 2019
    
  • Mathematica
    Table[Sum[Binomial[n,j-k]Binomial[j,n-j],{k,0,n},{j,0,n}],{n,0,30}] (* Harvey P. Dale, Feb 08 2012 *)
  • PARI
    {a(n) = sum(k=0,n, sum(j=0,n, binomial(n, j-k)*binomial(j,n-j)))}; \\ G. C. Greubel, May 23 2019
    
  • Sage
    [sum( sum(binomial(n, j-k)*binomial(j,n-j) for j in (0..n)) for k in (0..n)) for n in (0..30)] # G. C. Greubel, May 23 2019
    

Formula

a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n,j-k)*C(j,n-j).
Conjecture: n*(17*n-142)*a(n) + (17*n^2 + 95*n + 138)*a(n-1) + (-391*n^2 + 2488*n - 2908)*a(n-2) + (-17*n^2 - 603*n + 1892)*a(n-3) + 2*(697*n-2021)*(n-4)*a(n-4) + 60*(17*n-47)*(n-4)*a(n-5) = 0. - R. J. Mathar, Nov 15 2011
a(n) ~ (1+sqrt(5))^n * (5+sqrt(5)) / 10. - Vaclav Kotesovec, Feb 08 2014

A152981 Sum of divisors of Motzkin number A001006(n).

Original entry on oeis.org

1, 1, 3, 7, 13, 32, 72, 128, 360, 1008, 3836, 9408, 15512, 66960, 252720, 785148, 1137960, 3340800, 13072776, 42465024, 69530400, 238761600, 678562560, 2412043920, 5270534880, 10943277120, 44922182340, 117229255200, 209990825568, 623486730240, 1698651339840, 7019676332760, 18578092462280
Offset: 0

Views

Author

Omar E. Pol, Dec 20 2008

Keywords

Crossrefs

Programs

  • Maple
    A152981 := proc(n) numtheory[sigma](A001006(n)) ; end proc:
    seq(A152981(n),n=0..40) ; # R. J. Mathar, Jul 08 2011
  • Mathematica
    mot[0] = 1; mot[n_] := mot[n] = mot[n - 1] + Sum[mot[k] * mot[n - 2 - k], {k, 0, n - 2}]; Table[DivisorSigma[1, mot[n]], {n, 0, 32}] (* Amiram Eldar, Nov 26 2019 *)

Formula

a(n) = sigma(A001006(n)) = A000203(A001006(n)).

A152982 Sum of proper divisors of Motzkin number A001006(n).

Original entry on oeis.org

0, 0, 1, 3, 4, 11, 21, 1, 37, 173, 1648, 3610, 1, 25125, 139086, 474576, 284493, 984021, 6536394, 24265740, 18678381, 96214041, 277799337, 1282283505, 2077807083, 1899874619, 19252363864, 44221482398, 1967547359, 29743945411, 1265868629
Offset: 0

Views

Author

Omar E. Pol, Dec 20 2008

Keywords

Examples

			a(6)=21 because A001006(6)=51, having as proper divisors 1, 3 and 17. - _Emeric Deutsch_, Dec 31 2008
		

Crossrefs

Programs

  • Maple
    with(numtheory): M := proc (n) options operator, arrow: sum(binomial(n, 2*k)*binomial(2*k, k)/(k+1), k = 0 .. n) end proc: seq(sigma(M(n))-M(n), n = 0 .. 30); # Emeric Deutsch, Dec 31 2008
  • Mathematica
    mot[0] = 1; mot[n_] := mot[n] = mot[n - 1] + Sum[mot[k] * mot[n - 2 - k], {k, 0, n - 2}]; propDivSum[n_] := DivisorSigma[1, n] - n; Table[propDivSum[mot[n]], {n, 0, 30}] (* Amiram Eldar, Nov 26 2019 *)

Formula

a(n) = A001065(A001006(n)).

Extensions

Extended by Emeric Deutsch, Dec 31 2008

A152983 Number of divisors of Motzkin number A001006(n).

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 4, 2, 4, 4, 6, 8, 2, 8, 24, 18, 4, 16, 8, 12, 16, 24, 48, 72, 12, 8, 6, 16, 8, 16, 8, 12, 4, 16, 64, 12, 2, 8, 8, 8, 8, 24, 96, 96, 6, 24, 72, 48, 24, 32, 128, 96, 16, 8, 8, 8, 16, 128, 60, 192, 6, 32, 32, 96, 8, 96, 512, 36, 24, 16, 24, 384, 24, 96, 144, 48, 64, 64, 32
Offset: 0

Views

Author

Omar E. Pol, Dec 20 2008

Keywords

Examples

			a(5)=4 because the Motzkin number M(5)=21 has 4 divisors: 1,3,7 and 21. - _Emeric Deutsch_, Jan 14 2009
		

Crossrefs

Programs

  • Maple
    with(numtheory): M := proc (n) options operator, arrow: (sum((-1)^j*binomial(n+1, j)*binomial(2*n-3*j, n), j = 0 .. floor((1/3)*n)))/(n+1) end proc: seq(tau(M(n)), n = 0 .. 82); # Emeric Deutsch, Jan 14 2009
  • Mathematica
    mot[0] = 1; mot[n_] := mot[n] = mot[n - 1] + Sum[mot[k] * mot[n - 2 - k], {k, 0, n - 2}]; Table[DivisorSigma[0, mot[n]], {n, 0, 50}] (* Amiram Eldar, Nov 26 2019 *)

Formula

a(n) = A000005(A001006(n)).

Extensions

Extended by Emeric Deutsch, Jan 14 2009
Previous Showing 11-20 of 590 results. Next