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

A052174 Triangle of numbers arising in enumeration of walks on square lattice.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 6, 8, 3, 1, 20, 20, 15, 4, 1, 50, 75, 45, 24, 5, 1, 175, 210, 189, 84, 35, 6, 1, 490, 784, 588, 392, 140, 48, 7, 1, 1764, 2352, 2352, 1344, 720, 216, 63, 8, 1, 5292, 8820, 7560, 5760, 2700, 1215, 315, 80, 9, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jan 26 2000

Keywords

Examples

			First few rows:
    1;
    1   1;
    3   2   1;
    6   8   3  1;
   20  20  15  4  1;
   50  75  45 24  5 1;
  175 210 189 84 35 6 1;
  ...
		

Crossrefs

Cf. A005558 (first column), A005559, A005560, A005561, A005562.

Programs

  • Mathematica
    c = Binomial; T[n_, m_] /; EvenQ[n-m] := (k = (n-m)/2; c[n+1, k]*c[n, k] - c[n+1, k]*c[n, k-1]); T[n_, m_] /; OddQ[n-m] := (k = (n-m-1)/2; c[n+1, k]*c[n, k+1] - c[n+1, k+1]*c[n, k-1]); Table[T[n, m], {n, 0, 9}, {m, 0, n}] // Flatten (* Jean-François Alcover, Jan 13 2015, after Michel Marcus *)
  • PARI
    tabl(nn) = {alias(C, binomial); for (n=0, nn, for (k=0, n, if (!((n-k) % 2), kk = (n-k)/2; tnk = C(n+1,kk)*C(n,kk) - C(n+1,kk)*C(n,kk-1), kk = (n-k-1)/2; tnk = C(n+1,kk)*C(n,kk+1) - C(n+1,kk+1)*C(n,kk-1)); print1(tnk, ", ");); print(););} \\ Michel Marcus, Oct 12 2014

Formula

T(n, y) equals C(n+1,k)*C(n,k) - C(n+1,k)*C(n,k-1) if n-y = 2k, else if n-y = 2k+1 equals C(n+1,k)*C(n,k+1) - C(n+1,k+1)*C(n,k-1) (using article notation). - Michel Marcus, Oct 12 2014

A093768 Positive first differences of the rows of triangle A088459, which enumerates symmetric Dyck paths.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 8, 6, 1, 4, 15, 20, 20, 1, 5, 24, 45, 75, 50, 1, 6, 35, 84, 189, 210, 175, 1, 7, 48, 140, 392, 588, 784, 490, 1, 8, 63, 216, 720, 1344, 2352, 2352, 1764, 1, 9, 80, 315, 1215, 2700, 5760, 7560, 8820, 5292, 1, 10, 99, 440, 1925, 4950, 12375, 19800
Offset: 0

Views

Author

Paul D. Hanna, Apr 16 2004

Keywords

Comments

Suggested by Bozydar Dubalski (slawb(AT)atr.bydgoszcz.pl). Related to walks on a square lattice: main diagonal forms A005558, secondary diagonals form A005559, A005560, A005561, A005562, A005563.
Apparently row-reversed version of A052174. - R. J. Mathar, Feb 03 2025

Examples

			1;
1, 1;
1, 2, 3;
1, 3, 8, 6;
1, 4, 15, 20, 20;
1, 5, 24, 45, 75, 50;
1, 6, 35, 84, 189, 210, 175;
		

Crossrefs

Cf. A088459, A005558-A005562, A005563 (column 3), A005564 (column 4), A005565 (column 5), A005566 (row sums).

Programs

  • Maple
    A093768 := proc(n,k)
        if k = 0 then
            A088459(n,k);
        else
            A088459(n,k)-A088459(n,k-1);
        end if;
    end proc:
    seq(seq(A093768(n,k),k=0..n-1),n=1..10) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    T[n_, k_] := Binomial[n + 1, Ceiling[k/2]]*Binomial[n, Floor[k/2]] - Binomial[n + 1, Ceiling[(k - 1)/2]]*Binomial[n, Floor[(k - 1)/2]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Oct 25 2017 *)
  • PARI
    {T(n,k) =binomial(n+1,ceil(k/2))*binomial(n,floor(k/2)) -binomial(n+1,ceil((k-1)/2))*binomial(n,floor((k-1)/2))}

Formula

T(n, k) = C(n+1, ceiling(k/2))*C(n, floor(k/2)) - C(n+1, ceiling((k-1)/2))*C(n, floor((k-1)/2)) for n>=k>=0.

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.