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-10 of 13 results. Next

A171505 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A059738.

Original entry on oeis.org

1, 3, 1, 10, 6, 1, 34, 29, 9, 1, 117, 128, 57, 12, 1, 405, 538, 309, 94, 15, 1, 1407, 2192, 1533, 604, 140, 18, 1, 4899, 8740, 7179, 3453, 1040, 195, 21, 1, 17083, 34296, 32278, 18264, 6730, 1644, 259, 24, 1, 59629, 132929, 140790, 91372, 39668, 11877, 2443
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2009

Keywords

Comments

Equal to B*A096164 = A171488*B, B=A007318.

Examples

			Triangle begins :
1 ;
3, 1 ;
10, 6, 1 ;
34, 29, 9, 1 ;
117, 128, 57, 12, 1 ; ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -3, -2, -1, 0 respectively.
T(n,k) = T(n-1,k-1) + 3*T(n-1,k) + sum_{i, i>=0} T(n-1,k+1+i)*(-2)^i. - Philippe Deléham, Feb 23 2012

A026300 Motzkin triangle, T, read by rows; T(0,0) = T(1,0) = T(1,1) = 1; for n >= 2, T(n,0) = 1, T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) for k = 1,2,...,n-1 and T(n,n) = T(n-1,n-2) + T(n-1,n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 4, 1, 4, 9, 12, 9, 1, 5, 14, 25, 30, 21, 1, 6, 20, 44, 69, 76, 51, 1, 7, 27, 70, 133, 189, 196, 127, 1, 8, 35, 104, 230, 392, 518, 512, 323, 1, 9, 44, 147, 369, 726, 1140, 1422, 1353, 835, 1, 10, 54, 200, 560, 1242, 2235, 3288, 3915, 3610, 2188
Offset: 0

Views

Author

Keywords

Comments

Right-hand columns have g.f. M^k, where M is g.f. of Motzkin numbers.
Consider a semi-infinite chessboard with squares labeled (n,k), ranks or rows n >= 0, files or columns k >= 0; number of king-paths of length n from (0,0) to (n,k), 0 <= k <= n, is T(n,n-k). - Harrie Grondijs, May 27 2005. Cf. A114929, A111808, A114972.

Examples

			Triangle starts:
  [0] 1;
  [1] 1, 1;
  [2] 1, 2,  2;
  [3] 1, 3,  5,   4;
  [4] 1, 4,  9,  12,   9;
  [5] 1, 5, 14,  25,  30,  21;
  [6] 1, 6, 20,  44,  69,  76,   51;
  [7] 1, 7, 27,  70, 133, 189,  196,  127;
  [8] 1, 8, 35, 104, 230, 392,  518,  512,  323;
  [9] 1, 9, 44, 147, 369, 726, 1140, 1422, 1353, 835.
		

References

  • Harrie Grondijs, Neverending Quest of Type C, Volume B - the endgame study-as-struggle.
  • A. Nkwanta, Lattice paths and RNA secondary structures, in African Americans in Mathematics, ed. N. Dean, Amer. Math. Soc., 1997, pp. 137-147.

Crossrefs

Reflected version is in A064189.
Row sums are in A005773.
T(n,n) are Motzkin numbers A001006.
Other columns of T include A002026, A005322, A005323.

Programs

  • Haskell
    a026300 n k = a026300_tabl !! n !! k
    a026300_row n = a026300_tabl !! n
    a026300_tabl = iterate (\row -> zipWith (+) ([0,0] ++ row) $
                                    zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Oct 09 2013
    
  • Maple
    A026300 := proc(n,k)
       add(binomial(n,2*i+n-k)*(binomial(2*i+n-k,i) -binomial(2*i+n-k,i-1)), i=0..floor(k/2));
    end proc: # R. J. Mathar, Jun 30 2013
  • Mathematica
    t[n_, k_] := Sum[ Binomial[n, 2i + n - k] (Binomial[2i + n - k, i] - Binomial[2i + n - k, i - 1]), {i, 0, Floor[k/2]}]; Table[ t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Jan 03 2011 *)
    t[, 0] = 1; t[n, 1] := n; t[n_, k_] /; k>n || k<0 = 0; t[n_, n_] := t[n, n] = t[n-1, n-2]+t[n-1, n-1]; t[n_, k_] := t[n, k] = t[n-1, k-2]+t[n-1, k-1]+t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 18 2014 *)
    T[n_, k_] := Binomial[n, k] Hypergeometric2F1[1/2 - k/2, -k/2, n - k + 2, 4];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Mar 21 2018 *)
  • PARI
    tabl(nn) = {for (n=0, nn, for (k=0, n, print1(sum(i=0, k\2, binomial(n, 2*i+n-k)*(binomial(2*i+n-k, i)-binomial(2*i+n-k, i-1))), ", ");); print(););} \\ Michel Marcus, Jul 25 2015

Formula

T(n,k) = Sum_{i=0..floor(k/2)} binomial(n, 2i+n-k)*(binomial(2i+n-k, i) - binomial(2i+n-k, i-1)). - Herbert Kociemba, May 27 2004
T(n,k) = A027907(n,k) - A027907(n,k-2), k<=n.
Sum_{k=0..n} (-1)^k*T(n,k) = A099323(n+1). - Philippe Deléham, Mar 19 2007
Sum_{k=0..n} (T(n,k) mod 2) = A097357(n+1). - Philippe Deléham, Apr 28 2007
Sum_{k=0..n} T(n,k)*x^(n-k) = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -1, 0, 1, 2 respectively. - Philippe Deléham, Nov 28 2009
T(n,k) = binomial(n, k)*hypergeom([1/2 - k/2, -k/2], [n - k + 2], 4). - Peter Luschny, Mar 21 2018
T(n,k) = [t^(n-k)] [x^n] 2/(1 - (2*t + 1)*x + sqrt((1 + x)*(1 - 3*x))). - Peter Luschny, Oct 24 2018
The n-th row polynomial R(n,x) equals the n-th degree Taylor polynomial of the function (1 - x^2)*(1 + x + x^2)^n expanded about the point x = 0. - Peter Bala, Feb 26 2023

Extensions

Corrected and edited by Johannes W. Meijer, Oct 05 2010

A126954 Triangle T(n,k), 0 <= k <= n, read by rows given by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = 3*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-1,k+1) for k >= 1.

Original entry on oeis.org

1, 3, 1, 10, 4, 1, 34, 15, 5, 1, 117, 54, 21, 6, 1, 405, 192, 81, 28, 7, 1, 1407, 678, 301, 116, 36, 8, 1, 4899, 2386, 1095, 453, 160, 45, 9, 1, 17083, 8380, 3934, 1708, 658, 214, 55, 10, 1, 59629, 29397, 14022, 6300, 2580, 927, 279, 66, 11, 1
Offset: 0

Views

Author

Philippe Deléham, Mar 19 2007

Keywords

Comments

This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = x*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + y*T(n-1,k) + T(n-1,k+1) for k >= 1. Other triangles arise from choosing different values for (x,y): (0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970; (1,0)-> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877; (1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598; (2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954; (3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791; (4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. - Philippe Deléham, Sep 25 2007

Examples

			Triangle begins:
     1;
     3,    1;
    10,    4,    1;
    34,   15,    5,   1;
   117,   54,   21,   6,   1;
   405,  192,   81,  28,   7,  1;
  1407,  678,  301, 116,  36,  8, 1;
  4899, 2386, 1095, 453, 160, 45, 9, 1;
		

Programs

  • Mathematica
    T[0, 0, x_, y_] := 1; T[n_, 0, x_, y_] := x*T[n - 1, 0, x, y] + T[n - 1, 1, x, y]; T[n_, k_, x_, y_] := T[n, k, x, y] = If[k < 0 || k > n, 0, T[n - 1, k - 1, x, y] + y*T[n - 1, k, x, y] + T[n - 1, k + 1, x, y]]; Table[T[n, k, 3, 1], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, May 22 2017 *)

Formula

Sum_{k=0..n} T(n,k) = A126932(n).
Sum_{k>=0} T(m,k)*T(n,k) = T(m+n,0) = A059738(m+n).
Sum_{k=0..n} T(n,k)*(-k+1) = 3^n. - Philippe Deléham, Mar 26 2007

A049027 G.f.: (1-2*x*c(x))/(1-3*x*c(x)) where c(x) = (1 - sqrt(1-4*x))/(2*x) is the g.f. for Catalan numbers A000108.

Original entry on oeis.org

1, 1, 4, 17, 74, 326, 1446, 6441, 28770, 128750, 576944, 2587850, 11615932, 52167688, 234383146, 1053386937, 4735393794, 21291593238, 95747347176, 430624242942, 1936925461644, 8712882517188, 39195738193836, 176335080590442, 793336332850164, 3569368545752076
Offset: 0

Views

Author

Keywords

Comments

Row sums of triangle A035324.
a(n+1) = {1, 4, 17, 74, 326, ...} is the binomial transform of A059738. - Philippe Deléham, Nov 26 2009
(1, 4, 17, 74, 326, ...) is the invert transform of the odd-indexed central binomial coefficients, A001700. - David Callan, Oct 14 2012
The sequence starting with index 1 is the INVERT transform of A001700: (1, 3, 10, 35, 126, ...) and the second INVERT transform of the Catalan numbers starting with index 1: (1, 2, 5, 14, 42, ...). - Gary W. Adamson, Jun 23 2015
From Peter Bala, Jan 27 2020: (Start)
This sequence is the main diagonal of the lower triangular array formed by taking the first column (k = 0) of the array equal to (1,1,3,9,27,...) - powers of 3 with 1 prepended - and then completing the triangle using the relation T(n,k) = T(n-1,k) + T(n,k-1) for k >= 1. See my link in A001517.
1
1 1
3 4 4
9 13 17 17
27 40 57 74 74
81 121 178 252 326 326
...
(End)

Examples

			G.f. = 1 + x + 4*x^2 + 17*x^3 + 74*x^4 + 326*x^5 + 1446*x^6 + 6441*x^7 + ...
		

References

  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

Crossrefs

Programs

  • Magma
    [1] cat [n eq 1 select 1 else (9*Self(n-1)-Catalan(n-1))/2: n in [1..30]]; // Vincenzo Librandi, Jun 25 2015
    
  • Maple
    a:= proc(n) option remember; `if`(n<3, 1+3*n*(n-1)/2,
          (17/2-6/n)*a(n-1)-(18-27/n)*a(n-2))
        end:
    seq(a(n), n=0..28);  # Alois P. Heinz, Jan 28 2020
  • Mathematica
    Table[SeriesCoefficient[2/(3-1/Sqrt[1-4*x]),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 08 2012 *)
    FunctionExpand@Table[3^(2n-1)/2^(n+1) + 2^n (2n-1)!! Hypergeometric2F1[1, n + 1/2, n + 2, 8/9]/(9 (n + 1)!) + 2 KroneckerDelta[n]/3, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 08 2016 *)
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( serreverse( x * (1 + 2*x) / (1 + 3*x)^2 + x * O(x^n) ), n))}; /* Michael Somos, Apr 08 2007 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 2 / (3 - 1 / sqrt(1 - 4*x + x * O(x^n))), n))}; /* Michael Somos, Apr 08 2007 */
    
  • Sage
    (2/(3-1/sqrt(1-4*x))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 02 2019

Formula

G.f.: x*c(x)/(1-3*x*c(x)), c(x)= g.f. of Catalan numbers A000108.
a(n+1) = Sum_{k=0..n} 2^k*comb(2n+1, n-k)*2*(k+1)/(n+k+2) - Paul Barry, Jun 22 2004
a(n) = (9*a(n-1) - Catalan(n-1))/2, n > 1. - Vladeta Jovovic, Aug 08 2004
a(n+1) = Sum_{k=0..n} A039598(n,k)*2^k. - Philippe Deléham, Mar 21 2007
G.f.: 2 / (3 - 1 / sqrt(1 - 4*x)). - Michael Somos, Apr 08 2007
a(n) = Sum_{k=0..n} A039599(n,k)*A001045(k), for n >= 1. - Philippe Deléham, Jun 10 2007
Let A be the Toeplitz matrix of order n defined by: A[i,i-1]=-1, A[i,j]=Catalan(j-i), (i <= j), and A[i,j]=0, otherwise. Then, for n >= 1, a(n+1) = (-1)^n*charpoly(A,-3). - Milan Janjic, Jul 08 2010
From Gary W. Adamson, Jul 25 2011: (Start)
a(n) = upper left term in M^(n-1), M = an infinite square production matrix as follows:
4, 1, 0, 0, 0, ...
1, 1, 1, 0, 0, ...
1, 1, 1, 1, 0, ...
1, 1, 1, 1, 1, ...
... (End)
D-finite with recurrence: 2*n*a(n) + (12-17*n)*a(n-1) + 18*(2*n-3)*a(n-2) = 0. - R. J. Mathar, Nov 14 2011
a(n) ~ 3^(2*n-1)/2^(n+1). - Vaclav Kotesovec, Oct 08 2012
0 = a(n)*(1296*a(n+1) - 1098*a(n+2) + 180*a(n+3)) + a(n+1)*(-126*a(n+1) + 253*a(n+2) - 58*a(n+3)) + a(n+2)*(-10*a(n+2) + 4*a(n+3)) if n > 0. - Michael Somos, Jan 23 2014
O.g.f.: A(x) = 1/(1 - (1/2)*Sum_{n >= 1} binomial(2*n,n)*x^n). - Peter Bala, Sep 01 2016
a(n) = 3^(2*n-1)/2^(n+1) + 2^n * (2*n-1)!! * hypergeom([1,n+1], [n+2], 8/9)/(9*(n+1)!) + 0^n * 2/3. - Vladimir Reshetnikov, Oct 08 2016

A054341 Row sums of triangle A054336 (central binomial convolutions).

Original entry on oeis.org

1, 2, 5, 12, 30, 74, 185, 460, 1150, 2868, 7170, 17904, 44760, 111834, 279585, 698748, 1746870, 4366460, 10916150, 27287944, 68219860, 170541252, 426353130, 1065853432, 2664633580, 6661479944, 16653699860, 41633878200, 104084695500, 260210401530, 650526003825
Offset: 0

Views

Author

Wolfdieter Lang, Mar 13 2000

Keywords

Comments

a(n) = # Dyck (n+1)-paths all of whose components are symmetric. A strict Dyck path is one with exactly one return to ground level (necessarily at the end). Every nonempty Dyck path is expressible uniquely as a concatenation of one or more strict Dyck paths, called its components. - David Callan, Mar 02 2005
a(n) = # 2-Motzkin paths (i.e., Motzkin paths with blue and red level steps) with no level steps at positive height. Example: a(2)=5 because, denoting U=(1,1), D=(1,-1), B=blue (1,0), R=red (1,0), we have BB, BR, RB, RR, and UD. - Emeric Deutsch, Jun 07 2011
Inverse Chebyshev transform of the second kind applied to 2^n. This maps g(x) -> c(x^2)g(xc(x^2)). - Paul Barry, Sep 14 2005
Hankel transform of this sequence gives A000012 = [1,1,1,1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
Inverse binomial transform of A059738. - Philippe Deléham, Nov 24 2009

Examples

			a(4) = 30, the upper left term of M^4.
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, 1,
          b(x-1, 0)+`if`(y>0, b(x-1, y-1), 0)+b(x-1, y+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..31);  # Alois P. Heinz, Jan 23 2024
  • Mathematica
    CoefficientList[Series[2/(1-4*x+Sqrt[1-4*x^2]), {x, 0, 20}], x] (* Vaclav Kotesovec, Feb 13 2014 *)

Formula

a(n) = Sum_{m=0..n} A054336(n, m).
G.f.: 1/(1-2*x-x^2*c(x^2)), where c(x) = g.f. for Catalan numbers A000108.
From_Paul Barry_, Sep 14 2005: (Start)
G.f.: c(x^2)/(1-2*x*c(x^2));
a(n) = Sum_{k=0..n} binomial(n,(n-k)/2)*(1 + (-1)^(n+k))*2^k*(k+1)/(n+k+2). (End)
G.f.: 2/(1-4*x+sqrt(1-4*x^2)). - Ira M. Gessel, Oct 27 2013
a(n) = A127358(n+1) - 2*A127358(n). - Philippe Deléham, Mar 02 2007
a(n) = A126075(n,0). - Philippe Deléham, Nov 24 2009
a(n) = Sum_{k=0..n} A053121(n,k)*2^k. - Philippe Deléham, Nov 28 2009
From Gary W. Adamson, Sep 07 2011: (Start)
a(n) is the upper left term of M^n, M is an infinite square production matrix as follows:
2, 1, 0, 0, 0, ...
1, 0, 2, 0, 0, ...
0, 1, 0, 1, 0, ...
0, 0, 1, 0, 1, ...
0, 0, 0, 1, 0, ...
... (End)
Conjecture: 2*(n+1)*a(n) +5*(-n-1)*a(n-1) +8*(-n+2)*a(n-2) +20*(n-2)*a(n-3)=0. - R. J. Mathar, Nov 30 2012
a(n) ~ 3 * 5^n / 2^(n+2). - Vaclav Kotesovec, Feb 13 2014

A126932 Binomial transform of A127358.

Original entry on oeis.org

1, 4, 15, 55, 199, 714, 2547, 9048, 32043, 113212, 399265, 1406079, 4946137, 17383162, 61048359, 214270215, 751691811, 2636004228, 9240836733, 32386215981, 113478349989, 397544907486, 1392493797765, 4876916883090, 17078574481941, 59802541979964
Offset: 0

Views

Author

Philippe Deléham, Mar 17 2007

Keywords

Comments

Hankel transform is (-1)^n.
Row sums of the Riordan array ((1-2*x)/(1+x+x^2), x/(1+x+x^2))^(-1). - Paul Barry, Nov 06 2008

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( (Sqrt(1-2*x-3*x^2) + 3*(1-3*x))/(2*(2-13*x+21*x^2)) )); // G. C. Greubel, Jan 29 2020
    
  • Maple
    seq(coeff(series( (sqrt(1-2*x-3*x^2) + 3*(1-3*x))/(2*(2-13*x+21*x^2)), x, n+1), x, n), n = 0..30); # G. C. Greubel, Jan 29 2020
  • Mathematica
    CoefficientList[Series[(Sqrt[-3*x^2-2*x+1]-3*(3*x-1))/(2*(21*x^2-13*x+2)), {x, 0, 30}], x] (* Vaclav Kotesovec, Feb 12 2014 *)
  • PARI
    my(x='x+O('x^30)); Vec( (sqrt(1-2*x-3*x^2) + 3*(1-3*x))/(2*(2-13*x+21*x^2)) ) \\ G. C. Greubel, Jan 29 2020
    
  • Sage
    def A126932_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (sqrt(1-2*x-3*x^2) + 3*(1-3*x))/(2*(2-13*x+21*x^2)) ).list()
    A126932_list(30) # G. C. Greubel, Jan 29 2020

Formula

a(n+1) = 3*a(n) + A059738(n) with a(0)=1.
G.f: (sqrt(1-2*x-3*x^2) + 3*(1-3*x))/(2*(2-13*x+21*x^2)). - Paul Barry, Nov 06 2008
Conjecture: +2*n*a(n) -11*n*a(n-1) +4*(2*n+3)*a(n-2) +21*(n-2)*a(n-3)=0. - R. J. Mathar, Nov 24 2012
a(n) ~ 3 * 7^n / 2^(n+1). - Vaclav Kotesovec, Feb 12 2014

Extensions

Corrected and extended by Vincenzo Librandi, Feb 13 2014

A171488 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A005773(n+1)= 1,2,5,13,35,96,267,...

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 13, 14, 6, 1, 35, 46, 27, 8, 1, 96, 147, 107, 44, 10, 1, 267, 462, 396, 204, 65, 12, 1, 750, 1437, 1404, 858, 345, 90, 14, 1, 2123, 4438, 4835, 3388, 1625, 538, 119, 16, 1, 6046, 13637, 16305, 12802, 7072, 2805, 791, 152, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2009

Keywords

Comments

Equal to A064189*B = B*A054336 = B^(-1)*A035324, B = A007318.

Examples

			Triangle T(n,k) (0<=k<=n) begins:
   1;
   2,   1;
   5,   4,   1;
  13,  14,   6,  1;
  35,  46,  27,  8,  1;
  96, 147, 107, 44, 10, 1;
  ...
		

Crossrefs

Programs

  • Maxima
    T(n,k)=((k+1)*sum(binomial(2*j+k,j)*(-1)^j*3^(n-j-k)*binomial(n+1,j+k+1),j,0,n-k))/(n+1); /* Vladimir Kruchinin Sep 30 2020 */

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -2, -1, 0, 1 respectively.
T(n,k) = T(n-1,k-1) + 2*T(n-1,k) + sum_{i, i>=0} T(n-1,k+1+i)*(-1)^i. - Philippe Deléham, Feb 23 2012
T(n,k) = (k+1)*Sum_{j=0..n-k} C(2*j+k,j)*(-1)^j*3^(n-j-k)*C(n+1,j+k+1)/(n+1). - Vladimir Kruchinin Sep 30 2020

A344506 a(n) = [x^n] 2 / (1 - 7*x + sqrt(1 - 2*x - 3*x^2)).

Original entry on oeis.org

1, 4, 17, 73, 315, 1362, 5895, 25528, 110579, 479068, 2075683, 8993897, 38971621, 168871854, 731764089, 3170939841, 13740635787, 59542470588, 258016586955, 1118069698011, 4844962624953, 20994821090790, 90977510544237, 394235745437286, 1708354520308101
Offset: 0

Views

Author

Peter Luschny, May 23 2021

Keywords

Comments

The Motzkin polynomials (coefficients in A064189) evaluated at x = 3.

Crossrefs

The Motzkin polynomials evaluated at: x = 0 (A001006), x = 1 (A005773), x = 2 (A059738), x = 3 (this sequence).

Programs

  • Maple
    gf := 2 / (1 - 7*x + sqrt(1 - 2*x - 3*x^2)):
    ser := series(gf, x, 27): seq(coeff(ser, x, n), n=0..25);
    # Or:
    rgf := (3*x^2 + x)/(13*x^2 + 7*x + 1):
    subsop(1 = NULL, gfun:-seriestolist(series(rgf, x, 28), 'revogf'));
  • Mathematica
    RecurrenceTable[{a[n] == (39 (2 - n) a[n - 3] - (17 n + 5) a[n - 2] + (19 n + 10) a[n - 1])/(3 n + 3), a[0] == 1, a[1] == 4, a[2] == 17}, a, {n, 0, 26}]
  • SageMath
    R. = PowerSeriesRing(QQ, default_prec=25)
    f = (3*x^2 + x) / (13*x^2 + 7*x + 1)
    f.reverse().shift(-1).list()

Formula

a(n) = [x^n] reverse((3*x^2 + x) / (13*x^2 + 7*x + 1)) / x.
a(n) = Sum_{k=0..n} 3^k*binomial(n, k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4).
a(n) = (39*(2 - n)*a(n - 3) - (17*n + 5)*a(n - 2) + (19*n + 10)*a(n - 1))/(3*n + 3) for n >= 3.
a(n) ~ 8 * 13^n / 3^(n+2). - Vaclav Kotesovec, May 24 2021
G.f.: 1/(1 - 4*x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - ...))))), a continued fraction. - Ilya Gutkovskiy, Nov 19 2021

A344507 a(n) = [x^n] 2/(3*x + sqrt((1 - 3*x)*(x + 1)) + 1).

Original entry on oeis.org

1, -1, 2, -2, 5, -3, 15, 3, 59, 73, 308, 632, 1951, 4829, 13674, 36306, 100827, 275493, 765150, 2120466, 5918943, 16547595, 46452387, 130703031, 368825661, 1043125407, 2957013140, 8399389528, 23904802109, 68154435941, 194639738503, 556733127851, 1594781146419
Offset: 0

Views

Author

Peter Luschny, May 23 2021

Keywords

Crossrefs

Programs

  • Maple
    gf := 2/(3*x + sqrt((1 - 3*x)*(x + 1)) + 1):
    ser := series(gf, x, 27): seq(coeff(ser, x, n), n = 0..25);
    # Or:
    rgf := (x - 2*x^2) / (3*x^2 - 3*x + 1):
    subsop(1 = NULL, gfun:-seriestolist(series(rgf, x, 32), 'revogf'));
  • Mathematica
    a[n_] := Sum[(-2)^k Binomial[n, k] Hypergeometric2F1[(k - n)/2, (k - n + 1)/2, k + 2, 4], {k, 0, n}]; Table[a[n], {n, 0, 32}]
    (* Or: *)
    rgf := (x - 2 x^2) / (3 x^2 - 3 x + 1);
    CoefficientList[InverseSeries[Series[rgf, {x, 0, 32}]] / x, x]
  • SageMath
    R. = PowerSeriesRing(QQ, default_prec=32)
    f = (x - 2*x^2) / (3*x^2 - 3*x + 1)
    f.reverse().shift(-1).list()

Formula

a(n) = [x^n] reverse((x - 2*x^2) / (3*x^2 - 3*x + 1)) / x.
a(n) = Sum_{k=0..n}(-2)^k*binomial(n, k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4).
a(n) = (9*(n - 2)*a(n - 3) + (12*n - 15)*a(n - 2) + (n - 5)*a(n - 1))/(2*n + 2) for n >= 3.

A344567 A(n, k) = [x^k] 2 / (1 - (2*n - 1)*x + sqrt(1 - 2*x - 3*x^2)). The number of n-colored Motzkin arcs of length k. Array read by ascending antidiagonals, n >= 0 and k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 1, 3, 5, 4, 3, 1, 4, 10, 13, 9, 6, 1, 5, 17, 34, 35, 21, 15, 1, 6, 26, 73, 117, 96, 51, 36, 1, 7, 37, 136, 315, 405, 267, 127, 91, 1, 8, 50, 229, 713, 1362, 1407, 750, 323, 232, 1, 9, 65, 358, 1419, 3741, 5895, 4899, 2123, 835, 603
Offset: 0

Views

Author

Peter Luschny, May 24 2021

Keywords

Comments

Given a sequence a(n), we call the sequence b(n) Cameron's inverse of a, or, as dubbed by Sloane, INVERTi(a) (see the link 'Transforms' in the footer of the page), if 1 + Sum_{n>=1} a(n)*x^n = 1/(1 - Sum_{n>=1} b(n)*x^n).
Iterating this transform starting from A344506 we get:
a = A344506.
INVERTi(a) = A059738.
INVERTi(INVERTi(a)) = A005773.
INVERTi(INVERTi(INVERTi(a))) = A001006, Motzkin numbers.
INVERTi(INVERTi(INVERTi(INVERTi(a)))) = A005043.
INVERTi(INVERTi(INVERTi(INVERTi(INVERTi(a))))) = A344507.
The sequences generated in this manner correspond to the evaluation of the Motzkin polynomials (coefficients in A064189) at x = 3, 2, 1, 0, -1, -2. In terms of ordinary generating functions we have a ZZ-indexed sequence of sequences which general form is given by the formula in the name.
A "Motzkin path of length n and height k" is an integer lattice path from (0, 0) to (n, k) remaining weakly above the x-axis and consisting of steps in {U, L, D}. These acronyms stand for the steps Up = (1,1), Level = (1,0), and Down = (1, -1). An "n-colored Motzkin arc of length k" is a Motzkin path of length k and height 0 where each Level step of height 0 has one of n colors. A(n, k) is the number of n-colored Motzkin arcs of length k. The Motzkin numbers are M(k) = A(1, k).

Examples

			Array begins at n = 0, row for n = -1 added for illustration:
n\k  0   1    2     3      4       5        6         7  ... [Sequence Triangle]
--------------------------------------------------------------------------------
[-1] 1, -1,   2,   -2,     5,     -3,      15,        3, ...  [A344507]
[ 0] 1,  0,   1,    1,     3,      6,      15,       36, ...  [A005043, A089942]
[ 1] 1,  1,   2,    4,     9,     21,      51,      127, ...  [A001006, A064189]
[ 2] 1,  2,   5,   13,    35,     96,     267,      750, ...  [A005773, A038622]
[ 3] 1,  3,  10,   34,   117,    405,    1407,     4899, ...  [A059738, A126954]
[ 4] 1,  4,  17,   73,   315,   1362,    5895,    25528, ...  [A344506]
[ 5] 1,  5,  26,  136,   713,   3741,   19635,   103071, ...
[ 6] 1,  6,  37,  229,  1419,   8796,   54531,   338082, ...
[ 7] 1,  7,  50,  358,  2565,  18381,  131727,   944035, ...
[ 8] 1,  8,  65,  529,  4307,  35070,  285567,  2325324, ...
.
Triangle starts:
[0] 1;
[1] 1, 0;
[2] 1, 1,  1;
[3] 1, 2,  2,   1;
[4] 1, 3,  5,   4,   3;
[5] 1, 4, 10,  13,   9,    6;
[6] 1, 5, 17,  34,  35,   21,   15;
[7] 1, 6, 26,  73, 117,   96,   51,  36;
[8] 1, 7, 37, 136, 315,  405,  267, 127,  91;
[9] 1, 8, 50, 229, 713, 1362, 1407, 750, 323, 232.
.
Number of colors = 2, length = 4  ->  35.
.
      /\      _ _
     /  \    /   \   /\/\      3 x 1
.    _         _
    / \_     _/ \              2 x 2
.
    /\_ _   _ _/\   _/\_       3 x 4
.
    _ _ _ _                    1 x 16
.
Number of colors = 4, length = 2  ->  17.
.
    /\                         1 x 1
.
    _ _                        1 x 16
		

Crossrefs

Programs

  • Maple
    Arow := proc(n, len) option remember;
    2 / (1 - (2*n - 1)*x + sqrt(1 - 2*x - 3*x^2));
    seq(coeff(series(%, x, len+2), x, k), k = 0..len) end:
    T := (n, k) -> Arow(n-k, k+1)[k+1]:
    for n from 0 to 9 do Arow(n, 7) od; # prints array
    for n from 0 to 9 do seq(T(n, k), k=0..n) od; # prints triangle
    # Alternative via series reversion:
    for n from -1 to 6 do  # print the array starting from n = -1
    rgf := x*((n - 1)*x + 1) / ((n^2 - n + 1)*x^2 + (2*n - 1)*x + 1):
    subsop(1 = NULL, gfun:-seriestolist(series(rgf, x, 18), 'revogf')) od;
    # Via recursively defined polynomials:
    p := proc(n, k) option remember;
    if n = k then 1 elif k < 0 or n < 0 or k > n then 0 elif k = 0 then x*p(n-1, 0) + p(n-1, 1) else p(n-1, k-1) + p(n-1, k) + p(n-1, k+1) fi end:
    A := (n, k) -> subs(x = n, p(k, 0)):
    for n from 0 to 8 do lprint(seq(A(n, k), k = 0..9)) od;
    # Computing the columns:
    Acol := proc(k, len) seq(subs(x = n, p(k, 0)), n = 0..len) end:
    for k from 0 to 6 do Acol(k, 9) od;
  • Mathematica
    Unprotect[Power]; 0^0 := 1;
    A[n_, k_] := Sum[(n-1)^j Binomial[k, j] Hypergeometric2F1[(j - k)/2, (j - k + 1)/2, j + 2, 4], {j, 0, k}]; Table[A[n, k], {n, 0, 6}, {k, 0, 8}]
  • PARI
    F(n) = {x*((n - 1)*x + 1) / ((n^2 - n + 1)*x^2 + (2*n - 1)*x + 1)}
    M(n,m=n) = {Mat(vectorv(n, i, Vec(serreverse(F(i-1) + O(x*x^m)))))}
    { my(A=M(8)); for(n=1, #A, print(A[n, ])) } \\ Andrew Howroyd, May 27 2021
  • SageMath
    def Arow(n, len):
        R. = PowerSeriesRing(QQ, default_prec=len)
        f = x*((n - 1)*x + 1) / ((n^2 - n + 1)*x^2 + (2*n - 1)*x + 1)
        return f.reverse().shift(-1).list()
    for n in (0..8): print(Arow(n,10))
    

Formula

A(n, k) = Sum_{j=0..n} (k - 1)^j*binomial(n, j)*hypergeom([(j - n)/2, (j - n + 1)/2], [j + 2], 4).
Arow(n) = [x^n] reverse(x*((n-1)*x + 1) / ((n^2 - n + 1)*x^2 + (2*n-1)*x + 1)) / x.
Computationally more elementary is the following procedure: Let P_n(x) be polynomials defined recursively by P_n(x) = p(n, 0) where p(n, k) = 0 if k < 0 or n < 0 or k > n, p(n, n) = 1, p(n, 0) = x*p(n-1, 0) + p(n-1, 1), and in all other cases p(n, k) = p(n-1, k-1) + p(n-1, k) + p(n-1, k+1). Then A(n, k) = P_k(n).
The coefficients of these polynomials are in A097609. Thus the columns of the array can be calculated as: Acol(k) = [P_k(n) for n >= 0].
Showing 1-10 of 13 results. Next