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

A005558 a(n) is the number of n-step walks on square lattice such that 0 <= y <= x at each step.

Original entry on oeis.org

1, 1, 3, 6, 20, 50, 175, 490, 1764, 5292, 19404, 60984, 226512, 736164, 2760615, 9202050, 34763300, 118195220, 449141836, 1551580888, 5924217936, 20734762776, 79483257308, 281248448936, 1081724803600, 3863302870000, 14901311070000, 53644719852000
Offset: 0

Views

Author

Keywords

Comments

Number of n-step walks that start at the origin, constrained to stay in the first octant (0 <= y <= x). (Conjectured) - Benjamin Phillabaum, Mar 11 2011, corrected by Robert Israel, Oct 07 2015
For n >= 1, a(n-1) is the number of Dyck Paths with semilength n having floor((n+2)/2) U's in odd numbered positions. Example: (U is in odd numbered position and u is in even numbered position) Dyck path with n=5, floor ((5+2)/2)=3: UuddUuUddd. - Roger Ford, May 27 2017
The ratio of the number of n-step walks on the octant with an equal number of North steps and South steps to the total number of n-step walks on the octant is A005817(n)/a(n). For the reduced ratio, if n is divisible by 4 or n-1 is divisible by 4 the ratio is 1:floor(n/4)+1 and for all other values of n the ratio is 2:floor(n/2)+2. Example n = 4: A005817(4) = 10; EEEE, EEEW, EEWE, EWEE, EWEW, EEWW, ENSE, ENES, ENSW, EENS; a(4) = 20; 10:20 reduces to 1:2. - Roger Ford, Nov 04 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A138350 for a signed version.
Bisections are A000891 and A000888/2.
Cf. A000108, A005817. Column y=0 of A052174.

Programs

  • Magma
    [Binomial(n+1, Ceiling(n/2))*Binomial(n, Floor(n/2)) - Binomial(n+1, Ceiling((n-1)/2))*Binomial(n, Floor((n-1)/2)): n in [0..30]]; // Vincenzo Librandi, Sep 30 2015
    
  • Maple
    A:= proc(n,x,y) option remember;
        local j, xpyp, xp,yp, res;
        xpyp:= [[x-1,y],[x+1,y],[x,y-1],[x,y+1]];
        res:= 0;
        for j from 1 to 4 do
          xp:= xpyp[j,1];
          yp:= xpyp[j,2];
          if xp < 0 or xp > yp or xp + yp > n then next fi;
          res:= res + procname(n-1,xp,yp)
        od;
    return res
    end proc:
    A(0,0,0) := 1:
    seq(add(add(A(n,x,y), y = x .. n - x), x = 0 .. floor(n/2)), n = 0 .. 50); # Robert Israel, Oct 07 2015
  • Mathematica
    a[n_] := 1/2*Binomial[2*Floor[n/2]+1, Floor[n/2]+1]*CatalanNumber[1/2*(n+Mod[n, 2])]*(Mod[n, 2]+2); Table[a[n]//Abs, {n, 0, 27}] (* Jean-François Alcover, Mar 13 2014 *)
  • PARI
    a(n)=binomial(n+1,ceil(n/2))*binomial(n,floor(n/2)) - binomial(n+1,ceil((n-1)/2))*binomial(n,floor((n-1)/2))
    
  • Python
    from sympy import ceiling as c, binomial
    def a(n):
        return binomial(n + 1, c(n/2))*binomial(n, n//2) - binomial(n + 1, c((n - 1)/2))*binomial(n, (n - 1)//2)
    print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 02 2017

Formula

a(n) = C(n+1, ceiling(n/2))*C(n, floor(n/2)) - C(n+1, ceiling((n-1)/2))*C(n, floor((n-1)/2)). - Paul D. Hanna, Apr 16 2004
G.f.: (1/(4x^2))*((16*x^2-1)*(hypergeom([1/2, 1/2],[1],16*x^2)+2*x*(4*x-1)*hypergeom([3/2, 3/2],[2],16*x^2))-2*x+1). - Mark van Hoeij, Oct 13 2009
E.g.f (conjectured): BesselI(1,2*x)*(BesselI(0,2*x)+BesselI(1,2*x))/x. - Benjamin Phillabaum, Feb 25 2011
Conjecture: (2*n+1)*(n+3)*(n+2)*a(n) - 4*(2*n^2+4*n+3)*a(n-1) - 16*n*(2*n+3)*(n-1)*a(n-2) = 0. - R. J. Mathar, Apr 02 2017
Conjecture: (n+3)*(n+2)*a(n) - 4*(n^2+3*n+1)*a(n-1) + 16*(-n^2+n+1)*a(n-2) + 64*(n-1)*(n-2)*a(n-3) = 0. - R. J. Mathar, Apr 02 2017
a(n) = Sum_{k=0..floor(n/2)} n!/(k!*k!*(floor(n/2)-k)!*(floor((n+1)/2)-k)!*(k+1)) (conjectured). - Roger Ford, Aug 04 2017
a(n) = A000108(floor((n+1)/2))*A000108(floor(n/2))*(2*(floor(n/2))+1). - Roger Ford, Nov 15 2019
a(n) = Product_{k=3..n} (4*floor((k-1)/2) + 2) / (floor((k+2)/2)). - Roger Ford, Apr 29 2024

A005564 Number of n-step walks on square lattice in the first quadrant which finish at distance n-3 from the x-axis.

Original entry on oeis.org

6, 20, 45, 84, 140, 216, 315, 440, 594, 780, 1001, 1260, 1560, 1904, 2295, 2736, 3230, 3780, 4389, 5060, 5796, 6600, 7475, 8424, 9450, 10556, 11745, 13020, 14384, 15840, 17391, 19040, 20790, 22644, 24605, 26676, 28860, 31160, 33579, 36120, 38786, 41580, 44505
Offset: 3

Views

Author

Keywords

Comments

The steps are N, S, E or W.
For n>=4, a(n-1)/2 is the coefficient c(n-2) of the m^(n-2) term of P(m,n) = (c(m-1)* m^(n-1) + c(m-2)* m^(n-2) +...+ c(0)* m^0)/((a!)* (a-1)!), the polynomial for the number of partitions of m with exactly n parts. - Gregory L. Simay, Jun 28 2016
2a(n) is the denominator of formula 207 in Jolleys' "Summation of Series." 2/(1*3*4)+3/(2*4*5)+...n terms. Sum_{k = 1..n} (k+1)/(k*(k+2)*(k+3)). This summation has a closed form of 17/36-(6*n^2+21*n+17)/(6*(n+1)*(n+2)*(n+3)). - Gary Detlefs, Mar 15 2018
a(n) is the number of degrees of freedom in a tetrahedral cell for a Nédélec first kind finite element space of order n-2. - Matthew Scroggs, Jan 02 2021

Examples

			The n=4 diagram in Fig. 4 of Guy's paper is:
1
0 4
9 0 6
0 16 0 4
10 0 9 0 1
Adding 16+4 we get a(4)=20.
The a(3) = 6 walks are EEN, ENE, ENW, NEW, NSN, NNS. - _Michael Somos_, Jun 09 2014
G.f. = 6*x^3 + 20*x^4 + 45*x^5 + 84*x^6 + 140*x^7 + 216*x^8 + 315*x^9 + ...
From _Gregory L. Simay_ Jun 28 2016: (Start)
P(m,4) = (m^3 + 3*m^2 + ...)/(3!*4!) with 3 = a(3)/2 = 6/2.
P(m,5) = (m^4 + 10*m^3 + ...)/(4!*5!) with 10 = a(4)/2 = 20/2.
P(m,6) = (m^5 + (45/2)*m^4 +...)/(5!*6!) with 45/2 = a(5)/2.
P(m,7) = (m^6 + 42*m^5 +...)/(6!*7!) with 42 = a(6)/2 = 84/2. (End)
		

References

  • L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 38.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000217.
First differences of A001701.
Fourth column of A093768.

Programs

  • GAP
    a:=List([0..45],n->(n+1)*Binomial(n+4,2)); # Muniru A Asiru, Feb 15 2018
  • Magma
    I:=[6, 20, 45, 84]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..45]]; // Vincenzo Librandi, Jun 18 2012
    
  • Maple
    A005564 := proc(n)
            (n-2)*(n)*(n+1)/2 ;
    end proc: seq(A005564(n),n=0..10) ; # R. J. Mathar, Dec 09 2011
  • Mathematica
    Table[(n-2)*Binomial[n+1, 2], {n, 3, 40}]
    LinearRecurrence[{4,-6,4,-1},{6,20,45,84},50] (* Vincenzo Librandi, Jun 18 2012 *)
  • PARI
    a(n)=(n-2)*(n)*(n+1)/2 \\ Charles R Greathouse IV, Dec 12 2011
    

Formula

G.f.: x^3 * ( 6 - 4*x + x^2 ) / ( 1 - x )^4. [Simon Plouffe in his 1992 dissertation]
a(n) = (n-2)*n*(n+1)/2 = (n-2)*A000217(n).
a(n) = Sum_{j = 0..n} ((n+j-1)^2-(n-j+1)^2)/4. - Zerinvary Lajos, Sep 13 2006
a(n) = Sum_{k = 2..n-1} k*n. - Zerinvary Lajos, Jan 29 2008
a(n) = 4*binomial(n+1,2)*binomial(n+1,4)/binomial(n+1,3) = (n-2)*binomial(n+1,2). - Gary Detlefs, Dec 08 2011
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 18 2012
E.g.f.: x - x*(2 - 2*x - x^2)*exp(x)/2. - Ilya Gutkovskiy, Jun 29 2016
a(n) = 6*Sum_{i = 1..n-1} A000217(i) - n*A000217(n). - Bruno Berselli, Jul 03 2018
Sum_{n>=3} 1/a(n) = 5/18. - Amiram Eldar, Oct 07 2020

Extensions

Entry revised by N. J. A. Sloane, Jul 06 2012

A005560 Number of walks on square lattice. Column y=2 of A052174.

Original entry on oeis.org

1, 3, 15, 45, 189, 588, 2352, 7560, 29700, 98010, 382239, 1288287, 5010005, 17177160, 66745536, 232092432, 901995588, 3173688180, 12342120700, 43861998180, 170724392916, 611947174608, 2384209771200, 8609646396000, 33577620944400, 122041737663300, 476432168185575
Offset: 2

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Binomial(n+3, Ceiling(n/2))*Binomial(n+2, Floor(n/2)) - Binomial(n+3, Ceiling((n-1)/2))*Binomial(n+2, Floor((n-1)/2)): n in [0..30]]; // Vincenzo Librandi, Apr 03 2017
  • Maple
    wnprime := proc(n,y)
        local k;
        if type(n-y,'even') then
            k := (n-y)/2 ;
            binomial(n+1,k)*(binomial(n,k)-binomial(n,k-1)) ;
        else
            k := (n-y-1)/2 ;
            binomial(n+1,k)*binomial(n,k+1)-binomial(n+1,k+1)*binomial(n,k-1) ;
        end if;
    end proc:
    A005560 := proc(n)
        wnprime(n,2) ;
    end proc:
    seq(A005560(n),n=2..20) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    Table[Binomial[n+3, Ceiling[n/2]] Binomial[n+2, Floor[n/2]]-Binomial[n+3, Ceiling[(n-1)/2]] Binomial[n+2, Floor[(n-1)/2]], {n, 0, 30}] (* Vincenzo Librandi, Apr 03 2017 *)
  • PARI
    {a(n)=binomial(n+3,ceil(n/2))*binomial(n+2,floor(n/2)) - binomial(n+3,ceil((n-1)/2))*binomial(n+2,floor((n-1)/2))}
    

Formula

a(n) = C(n+3, ceiling(n/2))*C(n+2, floor(n/2)) - C(n+3, ceiling((n-1)/2))*C(n+2, floor((n-1)/2)). - Paul D. Hanna, Apr 16 2004
Conjecture: (n-1)*(n-2)*(2*n+1)*(n+5)*(n+4)*a(n) -4*n*(n+1)*(2*n^2+4*n+19)*a(n-1) -16*n^2*(n-1)*(2*n+3)*(n+1)*a(n-2)=0. - R. J. Mathar, Apr 02 2017

A005559 Number of walks on square lattice. Column y=1 of A052174.

Original entry on oeis.org

1, 2, 8, 20, 75, 210, 784, 2352, 8820, 27720, 104544, 339768, 1288287, 4294290, 16359200, 55621280, 212751396, 734959368, 2821056160, 9873696560, 38013731756, 134510127752, 519227905728, 1854385377600, 7174705330000, 25828939188000, 100136810390400
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Binomial(n+2, Ceiling(n/2))*Binomial(n+1, Floor(n/2)) - Binomial(n+2, Ceiling((n-1)/2))*Binomial(n+1, Floor((n-1)/2)): n in [0..30]]; // Vincenzo Librandi, Oct 16 2014
  • Maple
    seq(binomial(n+1, ceil((n-1)/2))*binomial(n, floor((n-1)/2)) -binomial(n+1, ceil((n-2)/2))*binomial(n, floor((n-2)/2)), n=1..30); # Robert Israel, Oct 19 2014
  • Mathematica
    Table[Binomial[n+2, Ceiling[n/2]] Binomial[n+1, Floor[n/2]] - Binomial[n+2, Ceiling[(n-1)/2]] Binomial[n+1, Floor[(n-1)/2]], {n, 0, 200}] (* Vincenzo Librandi, Oct 17 2014 *)
  • PARI
    {a(n)=binomial(n+2,ceil(n/2))*binomial(n+1,floor(n/2)) - binomial(n+2,ceil((n-1)/2))*binomial(n+1,floor((n-1)/2))}
    

Formula

a(n) = C(n+1,ceiling((n-1)/2)) *C(n,floor((n-1)/2)) -C(n+1,ceiling((n-2)/2)) *C(n,floor((n-2)/2)). - Paul D. Hanna, Apr 16 2004
G.f.: -(48*x^3-16*x^2-3*x+1)*EllipticK(4*x)/(12*Pi*x^4)+(4*x^2-9*x+1)*EllipticE(4*x)/(12*Pi*x^4)+1/(4*x^3)-1/(2*x^2) (using Maple's convention for elliptic integrals: EllipticE(t) = Integral_{s=0..1} sqrt(1 - s^2*t^2)/sqrt(1-s^2) ds, EllipticK(t) = Integral_{s=0..1} ((1-s^2*t^2)*(1-s^2))^(-1/2) ds). - Robert Israel, Oct 19 2014
Conjecture: -(n-1)*(2*n+1)*(n+4)*(n+3)*a(n) +4*(n+1)*(2*n^2+4*n+9)*a(n-1) +16*n*(n-1)*(2*n+3)*(n+1)*a(n-2)=0. - R. J. Mathar, Apr 02 2017

A005561 Number of walks on square lattice. Column y=3 of A052174.

Original entry on oeis.org

1, 4, 24, 84, 392, 1344, 5760, 19800, 81675, 283140, 1145144, 4008004, 16032016, 56632576, 225059328, 801773856, 3173688180, 11392726800, 44986664800, 162594659920, 641087516256, 2331227331840, 9183622822400, 33577620944400, 132211882468575, 485773975404900
Offset: 3

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Binomial(n+4, Ceiling(n/2))*Binomial(n+3, Floor(n/2)) - Binomial(n+4, Ceiling((n-1)/2))*Binomial(n+3, Floor((n-1)/2)): n in [0..30]]; // Vincenzo Librandi, Apr 03 2017
  • Maple
    wnprime := proc(n,y)
        local k;
        if type(n-y,'even') then
            k := (n-y)/2 ;
            binomial(n+1,k)*(binomial(n,k)-binomial(n,k-1)) ;
        else
            k := (n-y-1)/2 ;
            binomial(n+1,k)*binomial(n,k+1)-binomial(n+1,k+1)*binomial(n,k-1) ;
        end if;
    end proc:
    A005561 := proc(n)
        wnprime(n,3) ;
    end proc:
    seq(A005561(n),n=3..30) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    Table[Binomial[n+4, Ceiling[n/2]] Binomial[n+3, Floor[n/2]]-Binomial[n+4, Ceiling[(n-1)/2]] Binomial[n+3, Floor[(n-1)/2]], {n, 0, 30}] (* Vincenzo Librandi, Apr 03 2017 *)
  • PARI
    {a(n)=binomial(n+4,ceil(n/2))*binomial(n+3,floor(n/2)) - binomial(n+4,ceil((n-1)/2))*binomial(n+3,floor((n-1)/2))}
    

Formula

a(n) = C(n+4, ceiling(n/2))*C(n+3, floor(n/2)) - C(n+4, ceiling((n-1)/2))*C(n+3, floor((n-1)/2)). - Paul D. Hanna, Apr 16 2004
Conjecture: (n-2)*(n-3)*(2*n+1)*(n+6)*(n+5)*a(n) - 4*n*(n+1)*(2*n^2+4*n+33)*a(n-1) - 16*n^2*(n-1)*(2*n+3)*(n+1)*a(n-2) = 0. - R. J. Mathar, Apr 02 2017

A005562 Number of walks on square lattice. Column y=4 of A052174.

Original entry on oeis.org

1, 5, 35, 140, 720, 2700, 12375, 45375, 196625, 715715, 3006003, 10930920, 45048640, 164105760, 668144880, 2441298600, 9859090500, 36149998500, 145173803500, 534239596880, 2136958387520, 7892175863000, 31479019635375, 116657543354625, 464342770607625, 1726402608669375
Offset: 4

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Binomial(n+5, Ceiling(n/2))*Binomial(n+4, Floor(n/2)) - Binomial(n+5, Ceiling((n-1)/2))*Binomial(n+4, Floor((n-1)/2)): n in [0..30]]; // Vincenzo Librandi, Apr 03 2017
  • Maple
    wnprime := proc(n,y)
        local k;
        if type(n-y,'even') then
            k := (n-y)/2 ;
            binomial(n+1,k)*(binomial(n,k)-binomial(n,k-1)) ;
        else
            k := (n-y-1)/2 ;
            binomial(n+1,k)*binomial(n,k+1)-binomial(n+1,k+1)*binomial(n,k-1) ;
        end if;
    end proc:
    A005562 := proc(n)
        wnprime(n,4) ;
    end proc:
    seq(A005562(n),n=4..30) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    Table[Binomial[n+5, Ceiling[n/2]] Binomial[n+4, Floor[n/2]]-Binomial[n+5, Ceiling[(n-1)/2]] Binomial[n+4, Floor[(n-1)/2]], {n, 0, 30}] (* Vincenzo Librandi, Apr 03 2017 *)
  • PARI
    {a(n)=binomial(n+5,ceil(n/2))*binomial(n+4,floor(n/2)) - binomial(n+5,ceil((n-1)/2))*binomial(n+4,floor((n-1)/2))}
    

Formula

a(n) = C(n+5, ceiling(n/2))*C(n+4, floor(n/2)) - C(n+5, ceiling((n-1)/2))*C(n+4, floor((n-1)/2)). - Paul D. Hanna, Apr 16 2004
Conjecture: (n-3)*(n-4)*(2*n+1)*(n+7)*(n+6)*a(n) - 4*n*(n+1)*(2*n^2+4*n+51)*a(n-1) - 16*n^2*(n-1)*(2*n+3)*(n+1)*a(n-2) = 0. - R. J. Mathar, Apr 02 2017
Showing 1-6 of 6 results.