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 33 results. Next

A098482 Expansion of 1/sqrt((1-x)^2 - 4*x^4).

Original entry on oeis.org

1, 1, 1, 1, 3, 7, 13, 21, 37, 73, 147, 283, 531, 1007, 1953, 3817, 7423, 14371, 27877, 54333, 106189, 207585, 405743, 793719, 1554889, 3049525, 5984803, 11751067, 23086695, 45388291, 89289765, 175746797, 346077153, 681795925, 1343790319, 2649687079, 5226711507
Offset: 0

Views

Author

Paul Barry, Sep 10 2004

Keywords

Comments

From Joerg Arndt, Jul 01 2011: (Start)
Empirical: Number of lattice paths from (0,0) to (n,n) using steps (4,0), (0,4), (1,1).
It appears that 1/sqrt((1-x)^2-4*x^s) is the g.f. for lattice paths from (0,0) to (n,n) using steps (s,0), (0,s), (1,1).
Empirical: Number of lattice paths from (0,0) to (n,n) using steps (3,1), (1,3), (1,1). (End)
1/sqrt((1-x)^2-4*r*x^4) expands to sum(k=0..floor(n/2), binomial(n-2*k,k)*binomial(n-3*k,k)*r^k ).
Diagonal of the rational function 1 / ((1-x)*(1-y) - x^3*y^4). - Seiichi Manyama, Apr 29 2025
a(n) is the number of ways to tile a strip of length n with 1 X 1 squares and 1 X 2 red dominos and 1 X 2 blue dominos, with an equal number of red and blue dominos. - Greg Dresden and Leo Zhang, Jul 08 2025

Examples

			From _Joerg Arndt_, Jul 01 2011: (Start)
The triangle of lattice paths from (0,0) to (n,k) using steps (3,1), (1,3), (1,1) begins
  1;
  0, 1;
  0, 0, 1;
  0, 1, 0, 1;
  0, 0, 2, 0, 3;
  0, 0, 0, 3, 0, 7;
  0, 0, 1, 0, 4, 0, 13;
  0, 0, 0, 3, 0, 8, 0, 21;
  0, 0, 0, 0, 6, 0, 18, 0, 37;
  0, 0, 0, 1, 0, 10, 0, 37, 0, 73;
The triangle of lattice paths from (0,0) to (n,k) using steps (4,0), (0,4), (1,1) begins
  1;
  0, 1;
  0, 0, 1;
  0, 0, 0, 1;
  1, 0, 0, 0, 3;
  0, 2, 0, 0, 0, 7;
  0, 0, 3, 0, 0, 0, 13;
  0, 0, 0, 4, 0, 0, 0, 21;
  1, 0, 0, 0, 8, 0, 0, 0, 37;
  0, 3, 0, 0, 0, 18, 0, 0, 0, 73;
The diagonals of both appear to be this sequence.  (End)
		

Crossrefs

Programs

  • Maple
    seq(add(binomial(n-3*k,k)*binomial(n-2*k,k),k=0..floor(n/3)),n=0..34); # Zerinvary Lajos, Apr 03 2007
  • Mathematica
    CoefficientList[Series[1/Sqrt[(1-x)^2-4*x^4], {x, 0, 20}], x] (* Vaclav Kotesovec, Jun 23 2014 *)
  • PARI
    /* as lattice paths, assuming the first comment is true */
    /* same as in A092566 but use either of */
    steps=[[4,0], [0,4], [1,1]];
    steps=[[3,1], [1,3], [1,1]];
    /* Joerg Arndt, Jul 01 2011 */

Formula

a(n) = Sum_{k=0..floor(n/4)} binomial(n-2*k, k) * binomial(n-3*k, k).
D-finite with recurrence: n*a(n) = (2*n-1)*a(n-1) - (n-1)*a(n-2) + 4*(n-2)*a(n-4). - Vaclav Kotesovec, Jun 23 2014
a(n) ~ 2^(n+1/2) / sqrt(3*Pi*n). - Vaclav Kotesovec, Jun 23 2014
G.f.: 1/(1 - x - 2*x^4/(1 - x - x^4/(1 - x - x^4/(1 - x - x^4/(1 - ...))))), a continued fraction. - Ilya Gutkovskiy, Nov 19 2021
a(n) = Sum_{k=0..floor(n/4)} binomial(n-2*k, 2*k) * binomial(2*k, k). - Greg Dresden and Leo Zhang, Jul 08 2025

A119309 a(n) = binomial(2*n,n) * 6^n.

Original entry on oeis.org

1, 12, 216, 4320, 90720, 1959552, 43110144, 960740352, 21616657920, 489977579520, 11171488813056, 255928652808192, 5886359014588416, 135839054182809600, 3143703825373593600, 72933928748667371520
Offset: 0

Views

Author

Reinhard Zumkeller, May 14 2006

Keywords

Comments

Number of lattice paths from (0,0) to (n,n) using three kinds of steps (1,0) and two kinds of steps (0,1). - Joerg Arndt, Jul 01 2011
Central terms of the triangles in A013620 and A038220.

Examples

			a(3) = binomial(2*3,3) * (6^3) = 20 * 216 = 4320. - _Indranil Ghosh_, Mar 03 2017
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[2n,n]*(6^n), {n, 0, 15}] (* Indranil Ghosh, Mar 03 2017 *)
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [1,0], [1,0], [0,1], [0,1]]; /* note repeated entries */
    /* Joerg Arndt, Jun 30 2011 */
    
  • PARI
    a(n)=binomial(2*n,n)*6^n \\ Charles R Greathouse IV, Mar 03 2017
    
  • Python
    import math
    f=math.factorial
    def C(n,r): return f(n)//f(r)//f(n-r)
    def A119309(n): return C(2*n,n)*(6**n) # Indranil Ghosh, Mar 03 2017

Formula

a(n) = 6^n * A000984(n).
G.f.: 1/sqrt(1-24*x). - Zerinvary Lajos, Dec 20 2008 [Corrected by Joerg Arndt, Jul 01 2011]
D-finite with recurrence: n*a(n) +12*(-2*n+1)*a(n-1)=0. - R. J. Mathar, Jan 20 2020
a(n) = 2^n*A098658(n) = 3^n*A059304(n). - R. J. Mathar, Jan 20 2020
From Amiram Eldar, Jul 21 2020: (Start)
Sum_{n>=0} 1/a(n) = 24/23 + 24*sqrt(23)*arcsin(1/sqrt(24))/529.
Sum_{n>=0} (-1)^n/a(n) = 24/25 - 24*arcsinh(1/sqrt(24))/125. (End)
E.g.f.: exp(12*x) * BesselI(0,12*x). - Ilya Gutkovskiy, Sep 14 2021

A191354 Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2), and (2,1).

Original entry on oeis.org

1, 1, 3, 9, 25, 75, 227, 693, 2139, 6645, 20757, 65139, 205189, 648427, 2054775, 6526841, 20775357, 66251247, 211617131, 676930325, 2168252571, 6953348149, 22322825865, 71735559255, 230735316795, 742773456825, 2392949225565, 7714727440755, 24888317247705, 80341227688095
Offset: 0

Views

Author

Joerg Arndt, Jun 30 2011

Keywords

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!( 1/Sqrt(1-2*x-3*x^2-4*x^3) )); // G. C. Greubel, Feb 18 2019
    
  • Mathematica
    a[n_]:= Sum[Binomial[2k, k]*Sum[Binomial[j, n-k-j]*Binomial[k, j]*2^(j-k) *3^(-n+k+2j)*4^(n-k-2j), {j, 0, k}], {k, 0, n}];
    Array[a, 30, 0] (* Jean-François Alcover, Jul 21 2018, after Vladimir Kruchinin *)
    CoefficientList[Series[1/Sqrt[1-2*x-3*x^2-4*x^3], {x, 0, 30}], x] (* G. C. Greubel, Feb 18 2019 *)
  • Maxima
    a(n):=sum(binomial(2*k,k) * sum(binomial(j,n-k-j) * 2^(j-k) * binomial(k,j) * 3^(-n+k+2*j) * 4^(n-k-2*j),j,0,k),k,0,n); /* Vladimir Kruchinin, Feb 27 2016 */
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [1,1], [1,2], [2,1]];
    /* Joerg Arndt, Jun 30 2011 */
    
  • PARI
    my(x='x+O('x^30)); Vec(1/sqrt(1-2*x-3*x^2-4*x^3)) \\ G. C. Greubel, Feb 18 2019
    
  • Sage
    (1/sqrt(1-2*x-3*x^2-4*x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 18 2019

Formula

G.f.: 1/sqrt(1-2*x-3*x^2-4*x^3). - Mark van Hoeij, Apr 16 2013
G.f.: Q(0), where Q(k) = 1 + x*(2+3*x+4*x^2)*(4*k+1)/( 4*k+2 - x*(2+3*x+4*x^2)*(4*k+2)*(4*k+3)/(x*(2+3*x+4*x^2)*(4*k+3) + 4*(k+1)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 14 2013
a(n) = Sum_{k=0..n} (binomial(2*k,k) * Sum_{j=0..k} (binomial(j,n-k-j) *binomial(k,j)*2^(j-k)*3^(-n+k+2*j)*4^(n-k-2*j))). - Vladimir Kruchinin, Feb 27 2016
D-finite with recurrence: +(n)*a(n) +(-2*n+1)*a(n-1) +3*(-n+1)*a(n-2) +2*(-2*n+3)*a(n-3)=0. - R. J. Mathar, Jan 14 2020

A036692 T(2n,n) with T as in A036355.

Original entry on oeis.org

1, 2, 14, 84, 556, 3736, 25612, 177688, 1244398, 8777612, 62271384, 443847648, 3175924636, 22799963576, 164142004184, 1184574592592, 8567000931404, 62073936511496, 450518481039956, 3274628801768744, 23833760489660324
Offset: 0

Views

Author

Keywords

Comments

From N. J. A. Sloane, Jul 14 2009: (Start)
The following remarks and formulas are basically copied from the Apagodu-Zeilberger reference, where this sequence appears as an example.
These are the (old-time) basketball numbers, giving the number of ways a basketball game that ended with the score n : n can proceed. Recall that in the old days (before 1961), an atom of basketball-scoring could be only of one or two points.
Equivalently, this number is the number of ways of walking, in the square lattice, from (0; 0) to (n; n) using the atomic steps {(1; 0); (2; 0); (0; 1); (0; 2)}.
It satisfies the third-order linear recurrence:
(16/5)(2n + 3)(11n + 26)(1 + n)/((n + 3)(2 + n)(11n + 15))a(n)
-(4/5)(121n^3 + 649n^2 + 1135n + 646)/((n + 3)(2 + n)(11n + 15))a(1 + n)
-(2/5)(176n^2 + 680n + 605)/((11n + 15)(n + 3))a(2 + n) + a(n + 3) = 0 ;
subject to the initial conditions: a(0) = 1; a(1) = 2; a(2) = 14 :
Asymptotics: (0.37305616)(4 + 2*sqrt(3))^n*n^(-1/2)(1 + (67/1452)*sqrt(3) -(119/484))/n +((6253/117128) -(7163/234256)sqrt(3))/n^2 +(-(32645/ 15460896) sqrt(3) +(129625/10307264))/n^3).
(End)
In closed form, multiplicative constant is sqrt((15+8*sqrt(3))/(66*Pi)) = 0.37305616313160230... - Vaclav Kotesovec, Oct 24 2012
Diagonal of rational function 1/(1 - (x + y + x^2 + y^2)). - Gheorghe Coserea, Aug 06 2018

Crossrefs

Programs

  • Haskell
    a036692 n = a036355 (2 * n) n  -- Reinhard Zumkeller, Apr 24 2013
  • Mathematica
    CoefficientList[Series[((3-4*x+2*(4*x^2-8*x+1)^(1/2))/((8*x+5)*(4*x^2-8*x+1)))^(1/2), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 24 2012 *)
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [2,0], [0,1], [0,2]];
    /* Joerg Arndt, Jun 30 2011 */
    

Formula

G.f.: ((3-4*x+2*(4*x^2-8*x+1)^(1/2))/((8*x+5)*(4*x^2-8*x+1)))^(1/2). - Mark van Hoeij, Oct 30 2011

Extensions

Extended by Christian G. Bower, Nov 18 2003

A106597 Triangle T(n,k) = T(n-1, k-1) + T(n-1, k) + Sum_{i >= 1} T(n-2*i, k-i), with T(n, 0) = T(n, n) = 1, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 14, 7, 1, 1, 9, 27, 27, 9, 1, 1, 11, 44, 72, 44, 11, 1, 1, 13, 65, 149, 149, 65, 13, 1, 1, 15, 90, 266, 388, 266, 90, 15, 1, 1, 17, 119, 431, 836, 836, 431, 119, 17, 1, 1, 19, 152, 652, 1585, 2150, 1585, 652, 152, 19, 1, 1, 21, 189, 937, 2743, 4753, 4753, 2743, 937, 189, 21, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 30 2005

Keywords

Comments

Next term is sum of two terms above you in previous row (as in Pascal's triangle A007318) plus sum of terms directly above you on a vertical line.
T(n,n-k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0), (0,1), and (s,s) for s>=1. - Joerg Arndt, Jul 01 2011
Row sums gives A118649. - Emanuele Munarini, Feb 01 2017

Examples

			Triangle begins:
  1;
  1,  1;
  1,  3,   1;
  1,  5,   5,   1;
  1,  7,  14,   7,   1;
  1,  9,  27,  27,   9,   1;
  1, 11,  44,  72,  44,  11,   1;
  1, 13,  65, 149, 149,  65,  13,   1;
  1, 15,  90, 266, 388, 266,  90,  15,  1;
  1, 17, 119, 431, 836, 836, 431, 119, 17, 1;
		

Crossrefs

T(2n,n) gives A118650.

Programs

  • Mathematica
    CoefficientList[#, y]& /@ CoefficientList[(1 -x^2*y)/(1 -x -x*y -2x^2*y +x^3*y + x^3*y^2) + O[x]^12, x]//Flatten (* Jean-François Alcover, Oct 30 2018, after Emanuele Munarini *)
  • PARI
    /* same as in A092566, but last line (output) replaced by the following */
    /* show as triangle T(n-k,k): */
    { for(n=0,N-1, for(k=0,n, print1(T(n-k,k),", "); ); print(); ); }
    /* Joerg Arndt, Jul 01 2011 */
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0): return 0
        elif (k==0 or k==n): return 1
        else: return + T(n-1, k-1) + T(n-1, k) + sum( T(n-2*j, k-j) for j in (1..min(k, n//2, n-k)))
    flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 08 2021

Formula

G.f.: (1-x^2*y)/(1-x-x*y-2*x^2*y+x^3*y+x^3*y^2). - Emanuele Munarini, Feb 01 2017

Extensions

More terms from Joshua Zucker, May 10 2006
Definition corrected by Emilie Hogan, Oct 15 2009

A192368 Number of lattice paths from (0,0) to (n,n) using steps (1,0), (2,0), (0,2), (1,1).

Original entry on oeis.org

1, 1, 6, 19, 94, 396, 1870, 8541, 40284, 189274, 899260, 4281168, 20487156, 98299384, 473118174, 2282322211, 11034087438, 53443135944, 259283934816, 1259795078566, 6129223177272, 29856164309124, 145592506783224, 710686739172096, 3472285996766556, 16979257639328076
Offset: 0

Views

Author

Joerg Arndt, Jul 01 2011

Keywords

Crossrefs

Programs

  • Maple
    s := RootOf( 16*x*(3*s+1)*s+(s^2-18*s+1)*(s-1), s):
    ogf := -16*(3*s+1)*s^(3/2)/(3*s^4+2*s^3-76*s^2+6*s+1):
    series(ogf, x=0, 20); # Mark van Hoeij, Apr 16 2013
    # second Maple program:
    b:= proc(x, y) option remember;
          `if`(min(x, y)<0, 0, `if`(max(x, y)=0, 1,
           b(x-1, y)+b(x-2, y)+b(x, y-2)+b(x-1, y-1)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);  # Alois P. Heinz, May 16 2017
  • Mathematica
    a[0, 0] = 1; a[n_, k_] /; n >= 0 && k >= 0 := a[n, k] = a[n, k - 1] + a[n, k - 2] + a[n - 1, k - 1] + a[n - 2, k]; a[, ] = 0;
    a[n_] := a[n, n];
    a /@ Range[0, 25] (* Jean-François Alcover, Oct 14 2019 *)
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [2,0], [0,2], [1,1]];
    /* Joerg Arndt, Jun 30 2011 */

Formula

G.f. -16*(3*s+1)*s^(3/2)/(3*s^4+2*s^3-76*s^2+6*s+1) where s satisfies 16*x*(3*s+1)*s+(s^2-18*s+1)*(s-1) = 0. - Mark van Hoeij, Apr 16 2013

A092565 Triangle of coefficients T(n,k) (n>=0, 0<=k<=2*n), read by rows, where the n-th row polynomial equals the numerator of the n-th convergent of the continued fraction [1+x+x^2;1+x+x^2,1+x+x^2,...] for n>0, with the zeroth row defined as T(0,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 2, 1, 3, 5, 8, 7, 6, 3, 1, 5, 10, 19, 22, 22, 16, 10, 4, 1, 8, 20, 42, 58, 69, 63, 49, 30, 15, 5, 1, 13, 38, 89, 142, 191, 206, 191, 146, 95, 50, 21, 6, 1, 21, 71, 182, 327, 491, 602, 637, 573, 447, 296, 167, 77, 28, 7, 1, 34, 130, 363, 722, 1191, 1626
Offset: 0

Views

Author

Paul D. Hanna, Feb 28 2004

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0),(2,0),(1,1),(1,2). - Joerg Arndt, Jul 01 2011
Diagonal forms A092566, row sums form A006190. Column T(n,0) forms Fibonacci numbers A000045, T(n,1) forms A001629.

Examples

			Ratio of row polynomials R(3)/R(2) = (3+5*x+8*x^2+7*x^3+6*x^4+3*x^5+x^6)/(2+2*x+3*x^2+2*x^3+x^4) = [1+x+x^2;1+x+x^2,1+x+x^2].
Rows begin:
  1;
  1, 1, 1;
  2, 2, 3, 2, 1;
  3, 5, 8, 7, 6, 3, 1;
  5, 10, 19, 22, 22, 16, 10, 4, 1;
  8, 20, 42, 58, 69, 63, 49, 30, 15, 5, 1;
  13, 38, 89, 142, 191, 206, 191, 146, 95, 50, 21, 6, 1;
  21, 71, 182, 327, 491, 602, 637, 573, 447, 296, 167, 77, 28, 7, 1;
  34, 130, 363, 722, 1191, 1626, 1921, 1958, 1752, 1366, 931, 546, 273, 112, 36, 8, 1;
  ...
		

Crossrefs

Programs

  • Maple
    T:= proc(x, y) option remember; `if`(y<0 or y>2*x, 0, `if`(x=0, 1,
          add(T(x-l[1], y-l[2]), l=[[1, 0], [2, 0], [1, 1], [1, 2]])))
        end:
    seq(seq(T(n,k), k=0..2*n), n=0..10); # Alois P. Heinz, Apr 16 2013
  • Mathematica
    A037027[n_, k_] := Sum[Binomial[k+j, k]*Binomial[j, n-j-k], {j, 0, n-k}]; A037027[n_, 0] = Fibonacci[n + 1]; row[n_] := CoefficientList[ Sum[A037027[n, k] x^k (1+x)^k, {k, 0, n}], x]; Flatten[Table[row[n], {n, 0, 8}]][[1 ;; 70]] (* Jean-François Alcover, Jul 18 2011 *)
  • PARI
    T(n,k)=if(2*n
    				
  • PARI
    /* same as in A092566, but last line (output) replaced by the following */
    /* show as triangle (0<=k<=2*n): */
    {for (n=1,N, for (k=1,2*n-1, print1(M[n,k],", "); ); print(); );}
    /* Joerg Arndt, Jul 01 2011 */

Formula

n-th row polynomial R(n) = Sum_{k=0..n} A037027(n, k)*x^k*(1+x)^k; R(n+1)/R(n) = [1+x+x^2;1+x+x^2, ...(n+1)times..., 1+x+x^2] for n>=0; R(0)=1.

A191649 Number of lattice paths from (0,0) to (n,n) using steps (0,1), (1,0), (1,1), (2,2).

Original entry on oeis.org

1, 3, 14, 71, 379, 2082, 11651, 66051, 378064, 2180037, 12644861, 73695358, 431209313, 2531556197, 14904832196, 87970766447, 520337606401, 3083584244460, 18304476242735, 108820740004749, 647817646760368, 3861215365595659, 23039691494489015, 137615812845579390
Offset: 0

Views

Author

Joerg Arndt, Jun 30 2011

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( 1/Sqrt(x^4+2*x^3-x^2-6*x+1) )); // G. C. Greubel, Apr 29 2019
    
  • Mathematica
    CoefficientList[Series[1/Sqrt[x^4 + 2 x^3 - x^2 - 6 x + 1], {x, 0, 23}], x] (* Michael De Vlieger, Oct 08 2016 *)
  • PARI
    /* same as in A092566 but use */
    steps=[[0,1], [1,0], [1,1], [2,2]];
    /* Joerg Arndt, Jun 30 2011 */
    
  • PARI
    my(x='x+O('x^30)); Vec(1/sqrt(x^4+2*x^3-x^2-6*x+1)) \\ G. C. Greubel, Apr 29 2019
    
  • Sage
    (1/sqrt(x^4+2*x^3-x^2-6*x+1)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Apr 29 2019

Formula

G.f.: 1/sqrt(x^4 +2*x^3 -x^2 -6*x +1). - Mark van Hoeij, Apr 17 2013
D-finite with recurrence: n*a(n) +3*(-2*n+1)*a(n-1) +(-n+1)*a(n-2) +(2*n-3)*a(n-3) +(n-2)*a(n-4)=0. - R. J. Mathar, Oct 08 2016

A191684 Number of lattice paths from (0,0) to (n,n) using steps (0,1), (0,2), (1,0), (2,2).

Original entry on oeis.org

1, 2, 10, 46, 233, 1196, 6274, 33292, 178378, 962616, 5224965, 28494124, 156000816, 856903772, 4720235840, 26064910068, 144236627991, 799671246842, 4440913771641, 24699098156578, 137553727513369, 766990846033320, 4281404671954689, 23923170440346544
Offset: 0

Views

Author

Joerg Arndt, Jun 30 2011

Keywords

Programs

  • Maple
    P := (4*x^6-13*x^4-18*x^3+41*x^2+22*x-5)*A^3+(4-3*x^2)*A+1;
    series(RootOf(P,A),x=0,30); # Mark van Hoeij, Apr 17 2013
    # second Maple program:
    b:= proc(p) b(p):= `if`(p=[0$2], 1, `if`(min(p[])<0, 0,
          add(b(p-l), l=[[0, 1], [0, 2], [1, 0], [2, 2]])))
        end:
    a:= n-> b([n$2]):
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 18 2014
  • Mathematica
    b[p_List] := b[p] = If[p == {0, 0}, 1, If[Min[p] < 0, 0, Sum[b[p-l], {l, {{0, 1}, {0, 2}, {1, 0}, {2, 2}}}]]]; a[n_] := b[{n, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)
  • PARI
    /* same as in A092566 but use */
    steps=[[0,1], [0,2], [1,0], [2,2]];
    /* Joerg Arndt, Jun 30 2011 */

Formula

G.f.: A(x) where (4*x^6-13*x^4-18*x^3+41*x^2+22*x-5)*A(x)^3+(4-3*x^2)*A(x)+1=0. - Mark van Hoeij, Apr 17 2013

A192371 Number of lattice paths from (0,0) to (n,n) using steps (1,1), (0,2), (2,0), (0,3), (3,0).

Original entry on oeis.org

1, 1, 3, 9, 25, 87, 307, 1113, 4149, 15605, 59201, 225999, 866449, 3333847, 12865335, 49769689, 192945411, 749396493, 2915432049, 11358771965, 44313108627, 173081422997, 676766482917, 2648843996031, 10376891445525, 40685535827325, 159641884780749, 626849029013919, 2463010645910537, 9683604464279235
Offset: 0

Views

Author

Joerg Arndt, Jul 01 2011

Keywords

Crossrefs

Programs

  • Maple
    s := RootOf( (s^3-s-1)*(s-1)+x*s*(4-3*s), s);
    ogf := sqrt(4*s-3*s^2)*(s^3-4*s^2+2*s+2)/((2*s^2-s-2)*(3*s^3-6*s^2+4*s-2)*(1-x)):
    series(ogf, x=0, 30);  # Mark van Hoeij, Apr 17 2013
    # second Maple program:
    b:= proc(p) b(p):= `if`(p=[0$2], 1, `if`(min(p[])<0, 0,
          add(b(p-l), l=[[1, 1], [0, 2], [2, 0], [0, 3], [3, 0]])))
        end:
    a:= n-> b([n$2]):
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 18 2014
  • Mathematica
    b[p_List] := b[p] = If[p == {0, 0}, 1, If[Min[p] < 0, 0, Sum[b[p - l], {l, {{1, 1}, {0, 2}, {2, 0}, {3, 0}, {0, 3}}}]]]; a[n_] := b[{n, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)
  • PARI
    /* same as in A092566 but use */
    steps=[[1,1], [2,0], [0,2], [3,0], [0,3]];
    /* Joerg Arndt, Jun 30 2011 */

Formula

G.f.: sqrt(4*s-3*s^2)*(s^3-4*s^2+2*s+2)/((2*s^2-s-2)*(3*s^3-6*s^2+4*s-2)*(1-x)) where the function s satisfies (s^3-s-1)*(s-1)+x*s*(4-3*s) = 0. - Mark van Hoeij, Apr 17 2013
Previous Showing 21-30 of 33 results. Next