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 21-30 of 590 results. Next

A059347 Difference array of Motzkin numbers A001006 read by antidiagonals.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 0, 1, 2, 4, 2, 2, 3, 5, 9, 0, 2, 4, 7, 12, 21, 5, 5, 7, 11, 18, 30, 51, 0, 5, 10, 17, 28, 46, 76, 127, 14, 14, 19, 29, 46, 74, 120, 196, 323, 0, 14, 28, 47, 76, 122, 196, 316, 512, 835, 42, 42, 56, 84, 131, 207, 329, 525, 841, 1353, 2188, 0, 42, 84, 140, 224
Offset: 0

Views

Author

N. J. A. Sloane, Jan 27 2001

Keywords

Comments

Row sums of odd rows (e.g., 4 = 1+1+2 for 3rd row) equal the Motzkin number of next row. Row sums of even rows equal the Motzkin number of the next row - n!/((n/2)!((n/2)+1)!) (i.e., A001006(n) - A000108(n/2) where A000108 are the Catalan numbers). - Gerald McGarvey, Dec 05 2004

Examples

			Triangle begins:
1;
0,1;
1,1,2;
0,1,2,4;
2,2,3,5,9;
0,2,4,7,12,21;
5,5,7,11,18,30,51;
...
		

Crossrefs

Top row is A001006, leading diagonals give A000108 (interspersed with 0's), A000108 doubled up, A059348.

Programs

  • Mathematica
    max = 12; A001006 = CoefficientList[ Series[ (1-x-(1-2x-3x^2)^(1/2))/(2x^2), {x, 0, max}], x] ; row[0] = A001006; row[n_] := Differences[A001006, n]; Flatten[ Table[ row[n-k][[k]], {n, 1, max}, {k, 1, n}]] (* Jean-François Alcover, Nov 12 2012, from formula *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 16 2001

A116388 Expansion of 1/((1+x*(1-M(x)))*sqrt(1-2*x-3*x^2)), M(x) the g.f. of A001006.

Original entry on oeis.org

1, 1, 4, 10, 29, 82, 236, 681, 1975, 5745, 16757, 48982, 143442, 420721, 1235663, 3633453, 10695292, 31511524, 92919758, 274203662, 809719718, 2392579638, 7073684393, 20924387460, 61925598216, 183350728661, 543095661673
Offset: 0

Views

Author

Paul Barry, Feb 12 2006

Keywords

Programs

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

Formula

G.f.: 2*x/(sqrt(1-2*x-3*x^2)*(sqrt(1-2*x-3*x^2) -1 +2*x +3*x^2)).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} C(n-k,j-k)*C(j,n-k-j).
Conjecture: n*a(n) + 7*(-n+1)*a(n-1) + 2*(4*n-9)*a(n-2) + (25*n-58)*a(n-3) + (-18*n+65)*a(n-4) + (-52*n+199)*a(n-5) + (-31*n+135)*a(n-6) + 6*(-n+5)*a(n-7) = 0. - R. J. Mathar, Jun 22 2016

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

Original entry on oeis.org

1, 1, 3, 6, 17, 42, 114, 302, 827, 2263, 6275, 17468, 48967, 137834, 389738, 1105861, 3148240, 8987989, 25726635, 73808069, 212196040, 611219900, 1763659860, 5097131364, 14752847173, 42757853357, 124080269331, 360493591232
Offset: 0

Views

Author

Paul D. Hanna, Jul 27 2006

Keywords

Comments

Equals column 0 of triangle A121400.

Examples

			A(x) = 1 + x + 3*x^2 + 6*x^3 + 17*x^4 + 42*x^5 + 114*x^6 +...
The g.f. of the Motzkin numbers begins:
G(x) = 1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 21*x^5 + 51*x^6 + 127*x^7 +...
		

Crossrefs

Cf. A121400 (triangle), A121398 (main diagonal), A001006 (Motzkin).

Programs

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

A162482 Expansion of (1/(1-x)^3)*M(x/(1-x)^3), M(x) the g.f. of Motzkin numbers A001006.

Original entry on oeis.org

1, 4, 14, 53, 218, 945, 4235, 19441, 90947, 432030, 2078416, 10105435, 49578341, 245131321, 1220218293, 6110131376, 30756858405, 155547919269, 789965192900, 4027121386190, 20600180351659, 105707046807196, 543973305719611
Offset: 0

Views

Author

Paul Barry, Jul 04 2009

Keywords

Crossrefs

Programs

  • Maple
    A162482 := proc(n)
        add(binomial(n+2*k+2,n-k)*A001006(k),k=0..n) ;
    end proc:
    seq(A162482(n),n=0..40) ; # R. J. Mathar, Feb 10 2015
  • 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_] := Sum[Binomial[n+2k+2, n-k]*m[k], {k, 0, n}];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Apr 04 2024 *)

Formula

G.f.: 1/((1-x)^3-x-x^2/((1-x)^3-x-x^2/((1-x)^3-x-x^2/((1-x)^3-x-x^2/(1-... (continued fraction);
a(n) = Sum{k=0..n} C(n+2k+2,n-k)*A001006(k).
Conjecture: (n+2)*a(n) +4*(-2*n-1)*a(n-1) +18*(n-1)*a(n-2) +13*(-2*n+5)*a(n-3) +17*(n-4)*a(n-4) +3*(-2*n+11)*a(n-5) +(n-7)*a(n-6)=0. - R. J. Mathar, Feb 10 2015

A200538 Product of Jacobsthal and Motzkin numbers: a(n) = A001045(n+1)*A001006(n).

Original entry on oeis.org

1, 1, 6, 20, 99, 441, 2193, 10795, 55233, 284735, 1494404, 7914270, 42360541, 228460935, 1241224182, 6784445340, 37288826697, 205937705799, 1142317727466, 6361104740100, 35548154733969, 199295884785459, 1120615326442269, 6318077793648075, 35710056983891367, 202297486497822121
Offset: 0

Views

Author

Paul D. Hanna, Nov 18 2011

Keywords

Comments

The g.f. for the Jacobsthal numbers is 1/(1-x-2*x^2) and the g.f. M(x) for the Motzkin numbers satisfy: M(x) = 1 + x*M(x) + x^2*M(x)^2.

Examples

			G.f.: A(x) = 1 + x + 6*x^2 + 20*x^3 + 99*x^4 + 441*x^5 + 2193*x^6 +...
where A(x) = 1*1 + 1*1*x + 3*2*x^2 + 5*4*x^3 + 11*9*x^4 + 21*21*x^5 + 43*51*x^6 + 85*127*x^7 + 171*323*x^8 +...+ A001045(n+1)*A001006(n)*x^n +...
		

Crossrefs

Programs

  • PARI
    {A001006(n)=polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2),n)}
    {A001045(n)=polcoeff( x/(1-x-2*x^2+x*O(x^n)),n)}
    {a(n)=A001045(n+1)*A001006(n)}

A200539 Product of Fibonacci and Motzkin numbers: a(n) = A000045(n+1)*A001006(n).

Original entry on oeis.org

1, 1, 4, 12, 45, 168, 663, 2667, 10982, 45925, 194732, 834912, 3614063, 15771795, 69316740, 306534564, 1362986799, 6089916936, 27328613142, 123118156260, 556626199974, 2524659817449, 11484671681511, 52384730922720, 239534402969925, 1097805759803893, 5042014405418968
Offset: 0

Views

Author

Paul D. Hanna, Nov 18 2011

Keywords

Comments

The g.f. for the Fibonacci numbers is 1/(1-x-x^2) and the g.f. M(x) for the Motzkin numbers satisfies: M(x) = 1 + x*M(x) + x^2*M(x)^2.

Examples

			G.f.: A(x) = 1 + x + 4*x^2 + 12*x^3 + 45*x^4 + 168*x^5 + 663*x^6 +...
where A(x) = 1*1 + 1*1*x + 2*2*x^2 + 3*4*x^3 + 5*9*x^4 + 8*21*x^5 + 13*51*x^6 + 21*127*x^7 + 34*323*x^8 +...+ A000045(n+1)*A001006(n)*x^n +...
		

Crossrefs

Programs

  • PARI
    {A001006(n)=polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2),n)}
    {a(n)=fibonacci(n+1)*A001006(n)}

A200540 Product of Pell and Motzkin numbers: a(n) = A000129(n+1)*A001006(n).

Original entry on oeis.org

1, 2, 10, 48, 261, 1470, 8619, 51816, 318155, 1985630, 12561308, 80360280, 519013571, 3379514970, 22161470850, 146227235904, 970126550763, 6467496499590, 43304243215638, 291087137589552, 1963598081845335, 13288619577124122, 90195242361688863, 613843707553183800
Offset: 0

Views

Author

Paul D. Hanna, Nov 18 2011

Keywords

Comments

The g.f. for the Pell numbers is 1/(1-2*x-x^2) and the g.f. M(x) for the Motzkin numbers satisfy: M(x) = 1 + x*M(x) + x^2*M(x)^2.

Examples

			G.f.: A(x) = 1 + 2*x + 10*x^2 + 48*x^3 + 261*x^4 + 1470*x^5 + 8619*x^6 +...
where A(x) = 1*1 + 2*1*x + 5*2*x^2 + 12*4*x^3 + 29*9*x^4 + 70*21*x^5 + 169*51*x^6 + 408*127*x^7 + 985*323*x^8 +...+ A000129(n+1)*A001006(n)*x^n +...
		

Crossrefs

Programs

  • PARI
    {A001006(n)=polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2),n)}
    {A000129(n)=polcoeff( x/(1-2*x-x^2+x*O(x^n)),n)}
    {a(n)=A000129(n+1)*A001006(n)}

A251570 G.f. A(x) satisfies the condition that M(A(x)) is a power series in x consisting entirely of positive integer coefficients such that M(A(x) - x^k) has negative coefficients for k>0, where M(x) = 1 + x*M(x) + x*M(x)^2 is the g.f. of the Motzkin numbers A001006.

Original entry on oeis.org

1, 0, -1, -1, 1, 0, -1, -1, 0, 1, -1, 0, -1, -1, 0, -1, -1, -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1, -1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1, -1, 0, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, -1, -2, 0, 0, 0, 0, 0, 0, -1
Offset: 1

Views

Author

Paul D. Hanna, Jan 06 2015

Keywords

Comments

Compare to the similar series F(x) for the Catalan function C(x) = 1 + x*C(x)^2, where C(F(x)) consists entirely of positive integer coefficients such that C(F(x) - x^k) has negative coefficients for k>0; in which case F(x) = (x+x^2) - (x+x^2)^2, and C(F(x)) = 1/(1-x-x^2).

Examples

			G.f.: A(x) = x - x^3 - x^4 + x^5 - x^7 - x^8 + x^10 - x^11 - x^13 - x^14 - x^16 - x^17 - x^18 - x^20 - x^22 - x^26 - x^27 - x^28 - x^29 - x^32 - x^33 - x^35 - x^36 - x^39 - x^41 - x^43 - x^44 - x^45 - x^46 - x^47 - x^48 - x^50 +...
Given the g.f. M(x) of the Motzkin numbers:
M(x) = 1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 21*x^5 + 51*x^6 + 127*x^7 + 323*x^8 + 835*x^9 + 2188*x^10 + 5798*x^11 + 15511*x^12 +...
then
M(A(x)) = 1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 9*x^6 + 13*x^7 + 19*x^8 + 27*x^9 + 39*x^10 + 55*x^11 + 79*x^12 + 113*x^13 + 160*x^14 +...+ A251571(n)*x^n +...
consists entirely of positive integer coefficients such that M(A(x) - x^k) has negative coefficients for k>0.
Note that a(n) = -2 seems somewhat sparse and occurs at positions:
[58, 123, 181, 187, 203, 213, 230, 236, 245, 253, ...].
		

Crossrefs

Programs

  • PARI
    /* Prints initial N terms: */
    N=100;
    /* M(x) = 1 + x*M(x) + x^2*M(x)^2 is the g.f. of Motzkin numbers: */
    {M=1/x*serreverse(x/(1+x+x^2 +x*O(x^(2*N+10))));M +O(x^21) }
    /* Print terms as you build vector A, then print A at the end: */
    {A=[1, 0]; print1("1, 0, ");
    for(l=1, N, A=concat(A, -3);
    for(i=1, 4, A[#A]=A[#A]+1;
    V=Vec(subst(M, x, x*truncate(Ser(A)) +O(x^floor(2*#A+1)) ));
    if((sign(V[2*#A])+1)/2==1, print1(A[#A], ", "); break)); ); A}

A275207 Expansion of (A(x)^2+A(x^2))/2 where A(x) = A001006(x).

Original entry on oeis.org

1, 1, 3, 6, 16, 38, 100, 256, 681, 1805, 4867, 13162, 35925, 98469, 271511, 751656, 2089963, 5831451, 16326785, 45847770, 129108926, 364498596, 1031486590, 2925337352, 8313215743, 23668977163, 67507773621, 192859753310, 551821400008, 1581188102590
Offset: 0

Views

Author

R. J. Mathar, Jul 19 2016

Keywords

Comments

Analog of A275165 with Motzkin numbers replacing connected graph counts.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1,
          ((3*(n-1))*b(n-2)+(1+2*n)*b(n-1))/(n+2))
        end:
    a:= proc(n) option remember; add(b(j)*b(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t-1)/2)(b(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 19 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, 1, ((3*(n-1))*b[n-2] + (1+2*n)*b[n-1])/(n+2)];
    a[n_] := a[n] = Sum[b[j]*b[n-j], {j, 0, n/2}] - If[OddQ[n], 0, Function[t, t*(t-1)/2][b[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 16 2017, after Alois P. Heinz *)

Formula

a(2n+1) = A275208(2n+1).
Conjecture: a(2n+1) = A026940(n+1).
Conjecture D-finite with recurrence -3*(n+4)*(n+3)*(29*n-32)*a(n) +10*(29*n-40)*(n+3)*(n+2)*a(n-1) +2*(n+1)*(149*n^2 +208*n-450)*a(n-2) -2*n*(559*n^2 -381*n-1630)*a(n-3) +4*(-68*n^3 +531*n^2 -904*n+351)*a(n-4) +2*(103*n^3-1701*n^2+5330*n -3600)*a(n-5) +18*(11*n^3 -209*n^2 +834*n -778)*a(n-6) +6*n*(269*n-830)*(n-5)*a(n-7) +9*(n-5)*(n-6)*(95*n-134)*a(n-8)=0. - R. J. Mathar, Mar 07 2023
a(n) ~ 3^(n + 5/2) / (2 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Mar 08 2023

A275208 Expansion of (A(x)^2-A(x^2))/2 where A(x) = A001006(x).

Original entry on oeis.org

0, 1, 2, 6, 14, 38, 96, 256, 672, 1805, 4846, 13162, 35874, 98469, 271384, 751656, 2089640, 5831451, 16325950, 45847770, 129106738, 364498596, 1031480792, 2925337352, 8313200232, 23668977163, 67507731786, 192859753310, 551821286374, 1581188102590
Offset: 0

Views

Author

R. J. Mathar, Jul 19 2016

Keywords

Comments

Analog of A275166 with Motzkin numbers replacing connected graph counts.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1,
          ((3*(n-1))*b(n-2)+(1+2*n)*b(n-1))/(n+2))
        end:
    a:= proc(n) option remember; add(b(j)*b(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t+1)/2)(b(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 19 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, 1, ((3*(n-1))*b[n-2] + (1+2*n)*b[n-1])/(n+2)];
    a[n_] := a[n] = Sum[b[j]*b[n-j], {j, 0, n/2}] - If[OddQ[n], 0, Function[t, t*(t + 1)/2][b[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 16 2017, after Alois P. Heinz *)

Formula

a(2n+1) = A275207(2n+1).
Previous Showing 21-30 of 590 results. Next