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

A094059 Analog of A054474 for walks on a 3-dimensional grid.

Original entry on oeis.org

1, 8, 152, 5056, 205720, 9305152, 449404224, 22695553536, 1183891745688, 63293536425280, 3449750940624064, 190972642327080448, 10708174630547469632, 606900724292865506816, 34711902088494315507200, 2000990161185766676951040, 116137589109102380308573080
Offset: 0

Views

Author

Matthijs Coster, Apr 29 2004

Keywords

Comments

a(n) is the number of lattice paths on the 3 dimensional grid (using steps(1,1,1),(1,1,-1),(1,-1,1),(1,-1,-1),(-1,1,1),(-1,1,-1),(-1,-1,1)(-1,-1,-1)) that start and end at the origin after 2n steps, not touching the origin at intermediate stages. - Geoffrey Critzer, Feb 05 2012

Crossrefs

Cf. A049037.

Programs

  • Maple
    series(2-1/hypergeom([1/4, 1/4],[1],64*x)^2, x=0, 20);  # Mark van Hoeij, Apr 16 2013
  • Mathematica
    nn=40; a=Sum[Binomial[2n,n]^3 z^(2n), {n,0,nn}]; Select[CoefficientList[Series[2-1/a, {z,0,nn}], z], #>0&] (* Geoffrey Critzer, Feb 05 2012 *)

Formula

G.f.: 2-1/G(x) where G(x) = Sum_{n>=0} C(2n,n)^3 x^(2n). - Geoffrey Critzer, Feb 05 2012
a(n) ~ c * 64^n / n^(3/2), where c = 16*Pi^(9/2) / Gamma(1/4)^8 = 0.09252216985965964001991419323555310924034459466... . - Vaclav Kotesovec, Sep 05 2014, updated Mar 17 2024

Extensions

a(6)-a(15) added by Geoffrey Critzer, Feb 05 2012

A002894 a(n) = binomial(2n, n)^2.

Original entry on oeis.org

1, 4, 36, 400, 4900, 63504, 853776, 11778624, 165636900, 2363904400, 34134779536, 497634306624, 7312459672336, 108172480360000, 1609341595560000, 24061445010950400, 361297635242552100, 5445717990022688400, 82358080713306090000, 1249287673091590440000
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of monotonic paths (only moving N and E) in the lattice [0..2n] X [0..2n] that contain the points (0,0), (n,n) and (2n,2n). - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
This is the Taylor expansion of a special point on a curve described by Beauville. - Matthijs Coster, Apr 28 2004
Expansion of K(k) / (Pi/2) in powers of m/16 = (k/4)^2, where K(k) is the complete elliptic integral of the first kind evaluated at k. - Michael Somos, Mar 04 2003
Square lattice walks that start and end at origin after 2n steps. - Gareth McCaughan and Michael Somos, Jun 12 2004
If A is a random matrix in USp(4) (4 X 4 complex matrices that are unitary and symplectic) then a(n)=E[(tr(A^k))^{2n}] for any k > 4. - Andrew V. Sutherland, Apr 01 2008
From R. H. Hardin, Feb 03 2016 and R. J. Mathar, Feb 18 2016: (Start)
Also, number of 2 X (2n) arrays of permutations of 2n copies of 0 or 1 with row sums equal.
For example, some solutions for n=3:
0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 1 0 0 0
1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1
There is a simple combinatorial argument to show that this is a(n): We have 2n copies of 0's and 1's and need equal row sums. Therefore there must be n 1's in each of the two rows. Otherwise there are no constraints, so there are C(2n,n) ways of placing the 1's in the first row and independently C(2n,n) ways of placing the 1's in the second. The product is clearly C(2n,n)^2. (End)
Also the even part of the bisection of A241530. One half of the odd part is given in A000894. - Wolfdieter Lang, Sep 06 2016
From Peter Bala, Jan 26 2018: (Start)
Let S = {[1,0,0], [0,1,0], [1,0,1], [0,1,1]} be a set of four column vectors. Then a(n) equals the number of 3 X k arrays whose columns belong to the set S and whose row sums are all equal to n (apply Eger, Theorem 3). An example is given below. Equivalently, a(n) equals the number of lattice paths from (0,0,0) to (n,n,n) using steps (1,0,0), (0,1,0), (1,0,1) and (0,1,1).
The o.g.f. for the sequence equals the diagonal of the rational function 1/(1 - (x + y + x*z + y*z)).
Row sums of A069466. (End)
Also, the constant term in the expansion of (x + 1/x + y + 1/y)^(2n). - Christopher J. Smyth, Sep 26 2018
Number of ways to place 2n^2 nonattacking pawns on a 2n x 2n board. - Tricia Muldoon Brown, Dec 12 2018
For n>0, a(n) is the number of Littlewood polynomials of degree 4n-1 that have a closed Lill path. A polynomial p(x) has a closed Lill path if and only if p(x) is divisible by x^(2)+1. - Raul Prisacariu, Aug 28 2024

Examples

			G.f. = 1 + 4*x + 36*x^2 + 400*x^3 + 4900*x^4 + 63504*x^5 + 853776*x^6 + ... - _Michael Somos_, Aug 06 2014
From _Peter Bala_, Jan 26 2018: (Start)
a(2) = 36: The thirty six 3 x k arrays with columns belonging to the set of column vectors S = {[1,0,0], [0,1,0], [1,0,1], [0,1,1]} and having all row sums equal to 2 are the 6 distinct arrays obtained by permuting the columns of
  /1 1 0 0\
  |0 0 1 1|,
  \0 0 1 1/
the 6 distinct arrays obtained by permuting the columns of
  /0 0 1 1\
  |1 1 0 0|
  \0 0 1 1/
and the 24 arrays obtained by permuting the columns of
  /1 0 1 0\
  |0 1 0 1|. (End)
  \0 0 1 1/
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 591,828.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 8.
  • Matthijs Coster, Over 6 families van krommen [On 6 families of curves], Master's Thesis (unpublished), Aug 26 1983.
  • Leonard Lipshitz and A. van der Poorten. "Rational functions, diagonals, automata and arithmetic." In Number Theory, Richard A. Mollin, ed., Walter de Gruyter, Berlin (1990): 339-358.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A069466.
Row 2 of A268367 (even terms).
Equals 4*A060150.
Cf. A000984, A000515, A010370, A054474 (INVERTi transform), A172390, A000897, A002897, A006480, A008977, A186420, A188662, A000894, A241530, A002898 (walks hex lattice).

Programs

  • Magma
    [Binomial(2*n, n)^2: n in [0..20]]; // Vincenzo Librandi, Aug 07 2014
  • Maple
    A002894 := n-> binomial(2*n,n)^2.
  • Mathematica
    CoefficientList[Series[Hypergeometric2F1[1/2, 1/2, 1, 16x], {x, 0, 20}], x]
    Table[Binomial[2n,n]^2,{n,0,20}] (* Harvey P. Dale, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ EllipticK[16 x] / (Pi/2), {x, 0, n}]; (* Michael Somos, Aug 06 2014 *)
    a[n_] := 16^n HypergeometricPFQ[{1/2, -2 n, 2 n + 1}, {1, 1}, 1];
    Table[a[n], {n, 0, 19}] (* Peter Luschny, Mar 14 2018 *)
  • PARI
    {a(n) = binomial(2*n, n)^2};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( polcoeff( polcoeff( 1 / (1 - x * (y + z + 1/y + 1/z)) + x * O(x^(2*n)), 2*n), 0), 0))}; /* Michael Somos, Jun 12 2004 */
    
  • Sage
    [binomial(2*n, n)**2 for n in range(17)]  # Zerinvary Lajos, Apr 21 2009
    

Formula

D-finite with recurrence: (n+1)^2*a(n+1) = 4*(2*n + 1)^2*a(n). - Matthijs Coster, Apr 28 2004
a(n) ~ Pi^(-1)*n^(-1)*2^(4*n). - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
G.f.: F(1/2, 1/2; 1; 16*x) = 1 / AGM(1, (1 - 16*x)^(1/2)) = K(4*sqrt(x)) / (Pi/2), where AGM(x, y) is the arithmetic-geometric mean of Gauss and Legendre. - Michael Somos, Mar 04 2003
G.f.: 2*EllipticK(4*sqrt(x))/Pi, using Maple's convention for elliptic integrals.
E.g.f.: Sum_{n>=0} a(n)*x^(2*n)/(2*n)! = BesselI(0, 2x)^2.
a(n) = A000984(n)^2. - Jonathan Vos Post, Jun 17 2007
E.g.f.: (BesselI(0, 2*x))^2 = 1+2*x^2/(U(0)-2*x^2); U(k) = 2*x^2*(2*k+1)+(k+1)^3-2*x^2*(2*k+3)*(k+1)^3/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 23 2011
In generally, for (BesselI(b, 2x))^2=((x^(2*b))/(GAMMA(b+1))^2)*(1+(2*x^2)*(2*b+1)/(Q(0)-(2*x^2)*(2*b+1)); Q(k)=(2*x^2)*(2*k+2*b+1)+(k+1)*(k+b+1)*(k+2*b+1)-(2*x^2)*(k+1)*(k+b+1)*(k+2*b+1)*(2*k+2*b+3)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Nov 23 2011
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - 4*(2*k+1)^2*x*(1+4*x)^2/(4*(2*k+1)^2*x*(1+4*x)^2 + (k+1)^2*(1+4*x)^2/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 01 2013
0 = +a(n)*(+393216*a(n+2) -119040*a(n+3) +6860*a(n+4)) +a(n+1)*(-16128*a(n+2) +6928*a(n+3) -465*a(n+4)) +a(n+2)*(+36*a(n+2) -63*a(n+3) +6*a(n+4)) for all n in Z. - Michael Somos, Aug 06 2014
Integral representation as the n-th moment of a positive function W(x) on (0,16), in Maple notation, W(x) = EllipticK(sqrt(1-x/16))/(2*Pi^2*sqrt(x)); a(n) = Integral_{x=0..16} x^n*W(x) dx, n>=0. The function W(x) is singular at x=0 and W(16) = 1/(16*Pi). This representation is unique since W(x) is the solution of the Hausdorff moment problem. - Stanley Smith and Karol A. Penson, Jun 19 2015
a(n) ~ 16^n*(2-2/(8*n+2)^2+21/(8*n+2)^4-671/(8*n+2)^6+45081/(8*n+2)^8)^2/((4*n+1)* Pi). - Peter Luschny, Oct 14 2015
a(n) = binomial(2*n,n)*binomial(2*n,n) = ( [x^n](1 + x)^(2*n) ) *( [x^n](1 + x)^(2*n) ) = [x^n](F(x)^(4*n)), where F(x) = 1 + x + x^2 + 4*x^3 + 20*x^4 + 120*x^5 + 798*x^6 + 5697*x^7 + ... appears to have integer coefficients. For similar results see A000897, A002897, A006480, A008977, A186420 and A188662. - Peter Bala, Jul 14 2016
a(n) = Sum_{k = 0..n} binomial(2*n + k,k)*binomial(n,k)^2. Cf. A005258(n) = Sum_{k = 0..n} binomial(n + k,k)*binomial(n,k)^2. - Peter Bala, Jul 27 2016
a(n) = A241530(2*n), n >= 0. - Wolfdieter Lang, Sep 06 2016
E.g.f.: 2F2(1/2,1/2; 1,1; 16*x). - Ilya Gutkovskiy, Jan 23 2018
a(n) = 16^n*hypergeom([1/2, -2*n, 2*n + 1], [1, 1], 1). - Peter Luschny, Mar 14 2018
The right-hand side of the binomial coefficient identity Sum_{k = 0..n} C(n,k)*C(n+k,k)*C(2*n+2*k,n+k)*(-4)^(n-k) = a(n). - Peter Bala, Mar 16 2018
a(n) = [x^n] (1 - x)^(2*n) * P(2*n,(1 + x)/(1 - x)), where P(n,x) denotes the n-th Legendre polynomial. Compare with A245086(n) = [x^n] (1 - x)^(2*n) * P(n,(1 + x)/(1 - x)). - Peter Bala, Mar 23 2022
a(n) = Sum_{k=0..n} multinomial(2n [k k (n-k) (n-k)]), which is another way to count random walks on Z^2, with steps of (0,+-1) or (+-1,0), that return to the point of origin after 2n steps (not necessarily for the first time), as is C(2n,n)^2. - Shel Kaphan, Jan 12 2023
0 = a(n)*(+393216*a(n+2) -119040*a(n+3) +6860*a(n+4)) +a(n+1)*(-16128*a(n+2) +6928*a(n+3) -465*a(n+4)) +a(n+2)*(+36*a(n+2) -63*a(n+3) +6*a(n+4)) for n>=0. - Michael Somos, May 30 2023
From Peter Bala, Sep 12 2023: (Start)
Right-hand side of the binomial coefficient identities
1) Sum_{k = 0..n} (-1)^(n+k) * C(n,k)*C(n+k,n)*C(2*n+k,n) = a(n).
2) 2*Sum_{k = 0..n} (-1)^(n+k) * C(n,k)*C(n+k-1,n)*C(2*n+k-1,n) = a(n) for n >= 1.
3) (4/3)*Sum_{k = 0..n} (-1)^(n+k) * C(n,k)*C(n+k,n)*C(2*n+k-1,n) = a(n) for n >= 1. (End)

Extensions

Edited by N. J. A. Sloane, Feb 18 2016

A094061 Number of n-moves paths of a king starting and ending at the origin of an infinite chessboard.

Original entry on oeis.org

1, 0, 8, 24, 216, 1200, 8840, 58800, 423640, 3000480, 21824208, 158964960, 1171230984, 8668531872, 64574844048, 483114856224, 3630440899800, 27379154692032, 207172490054816, 1572194644061184, 11962847247681616, 91242602561647680, 697438669619791008
Offset: 0

Views

Author

Matthijs Coster, Apr 29 2004

Keywords

Comments

The chessboard here is the full four-quadrant board Z X Z.
This is an analog of A054474 for walks on a square grid where the steps can be made diagonally as well.
a(n) is the constant term in the expansion of ((x + 1/x) * (y + 1/y) + x^2 + 1/x^2 + y^2 + 1/y^2)^n. - Seiichi Manyama, Nov 03 2019

References

  • D. Joyner, "Adventures in Group Theory: Rubik's Cube, Merlin's Machine and Other Mathematical Toys", Johns Hopkins University Press, 2002, pp. 79

Crossrefs

Programs

  • Maple
    a:=array(0..30):a[0]:=1:a[1]:=0:a[2]:=8:a[3]:=24:for n from 3 to 29 do a[n+1]:= (n*(5*n+1)*a[n]+2*(15*n^2+6*n-5)*a[n-1]-8*(5*n^2-23*n+21)*a[n-2]-64*(n-2)^2*a[n-3])/(n+1)^2: print(n+1,a[n+1]) od:
    # second Maple program
    a:= proc(n) option remember; `if`(n<3, (n-1)*(9*n-2)/2,
          ((n-1)*(3*n-1)*(3*n-4) *a(n-1)
          +(108*n^3-396*n^2+452*n-152) *a(n-2)
          +32*(3*n-2)*(n-2)^2 *a(n-3))/ (n^2*(3*n-5)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 02 2012
  • Mathematica
    a[n_]:=Module[{f=(x+x^-1+y+y^-1+x y+x^-1y+x^-1y^-1+x y^-1)^n,s}, s=Series[f,{x,0,0},{y,0,0}]; SeriesCoefficient[s,{0,0}]]; Table[a[n], {n,1,22}] (* Armin Vollmer (Armin.Vollmer(AT)kabelleipzig.de), May 01 2006 *)
    CoefficientList[Series[1/(1+4*x)*LegendreP[-1/2,1-32*x*(1+x)/(1+4*x)^2], {x, 0, 20}], x] (* Vaclav Kotesovec, Aug 16 2013 *)
  • Maxima
    a[0]:1$
    a[1]:0$
    a[2]:8$
    a[3]:24$
    a[n]:=((n-1)*(3*n-1)*(3*n-4) *a[n-1]
          +(108*n^3-396*n^2+452*n-152) *a[n-2]
          +32*(3*n-2)*(n-2)^2 *a[n-3])/ (n^2*(3*n-5))$
    A094061(n):=a[n]$
    makelist(A094061(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    {a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*polcoef((1+x+1/x)^k, 0)^2)} \\ Seiichi Manyama, Oct 29 2019
    
  • PARI
    {a(n) = polcoef(polcoef(((x+1/x)*(y+1/y)+x^2+1/x^2+y^2+1/y^2)^n, 0), 0)} \\ Seiichi Manyama, Nov 03 2019

Formula

D-finite with recurrence (n+1)^2*a(n+1) = n*(5*n+1)*a(n) + 2*(15*n^2+6*n-5)*a(n-1) - 8*(5*n^2-23*n+21) *a(n-2) - 64*(n-2)^2*a(n-3).
G.f.: (2/(Pi*(1+4*x))) * EllipticK(4*sqrt(x*(1+x))/(1+4*x)) = 1/(1+4*x) * hypergeom([1/2,1/2], [1], 16*(x*(1+x))/(1+4*x)^2). - Sergey Perepechko, Jan 15 2011
a(n) ~ 2^(3*n+1)/(3*Pi*n). - Vaclav Kotesovec, Aug 16 2013
a(n) = (1/Pi^2) * Integral_{y = 0..Pi} Integral_{x = 0..Pi} (2*cos(x) + 2*cos(y) + 4*cos(x)*cos(y))^n dx dy. - Peter Bala, Feb 14 2017
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A002426(k)^2. - Seiichi Manyama, Oct 29 2019
From Peter Bala, Feb 08 2022: (Start)
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k.
Conjecture: the stronger congruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all primes p >= 5 and positive integers n and k. (End)
a(n) = Sum_{j = 0..n} Sum_{k = 0..j} binomial(2*j,j)^2*binomial(j,k)* binomial(n+j-k,2*j)*(-4)^(n-j-k). - Peter Bala, Mar 19 2022

Extensions

More terms from and entry improved by Sergey Perepechko, Sep 06 2004

A039699 Number of 4-dimensional cubic lattice walks that start and end at the origin after 2n steps, free to pass through origin at intermediate stages.

Original entry on oeis.org

1, 8, 168, 5120, 190120, 7939008, 357713664, 16993726464, 839358285480, 42714450658880, 2225741588095168, 118227198981126144, 6380762273973278464, 349019710593278412800, 19310744204362333900800, 1079054103459778710405120, 60818479243449308702049960
Offset: 0

Views

Author

Alessandro Zinani (alzinani(AT)tin.it)

Keywords

Comments

Generating function G(x) is D-finite with a singular point at x = 1/64 (cf. Graph Link). After summing 300000 terms, G(1/64) = 1.239466... and 1 - 1/G(1/64) = 0.193201... Convergence to A086232 is very slow. - Bradley Klee, Aug 20 2018
a(n) is also the constant term in the expansion of (w + 1/w + x + 1/x + y + 1/y + z + 1/z)^(2n). This follows directly from the sequence name, each variable corresponding to a single step in one of the four axis directions. - Christopher J. Smyth, Sep 28 2018

Examples

			a(5)=7939008, i.e., there are 7939008 different walks that start and end at origin of a 4-dimensional integer lattice after 2*5=10 steps, free to pass through origin at intermediate steps.
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 322-331.

Crossrefs

1-dimensional, 2-dimensional, 3-dimensional analogs are A000984, A002894, A002896. Pólya Constant: A086232.
Row k=4 of A287318.

Programs

  • Maple
    A039699 := n -> binomial(2*n,n)^2*hypergeom([1/2, -n, -n, -n],[1, 1, 1/2 - n], 1):
    seq(simplify(A039699(n)), n=0..14); # Peter Luschny, May 23 2017
  • Mathematica
    max = 30 (* must be even *); Partition[ CoefficientList[ Series[ BesselI[0, 2 x]^4, {x, 0, max}], x]*Range[0, max]!, 2][[All, 1]] (* Jean-François Alcover, Oct 05 2011 *)
    With[{nn=30},Take[CoefficientList[Series[BesselI[0,2x]^4,{x,0,nn}],x] Range[0,nn]!,{1,-1,2}]] (* Harvey P. Dale, Aug 09 2013 *)
    RecurrenceTable[{256*(n-1)^2*(2*n-3)*(2*n-1)*a[n-2] - 4*(2*n-1)^2*(5*n^2-5*n+2)*a[n-1] + n^4*a[n]==0, a[0]==1, a[1]==8}, a, {n,0,100}] (* Bradley Klee, Aug 20 2018 *)
  • PARI
    C=binomial;
    A002895(n) = sum(k=0,n, C(n,k)^2 * C(2*n-2*k,n-k) * C(2*k,k) );
    a(n)= C(2*n,n) * A002895(n);
    /* Joerg Arndt, Apr 19 2013 */
    
  • Python
    from math import comb
    def A039699(n): return comb(n<<1,n)*((sum(comb(n,k)**2*comb(n-k<<1,n-k)*comb(m:=k<<1,k) for k in range(n+1>>1))<<1) + (0 if n&1 else comb(n,n>>1)**4)) # Chai Wah Wu, Jun 17 2025

Formula

E.g.f.: Sum_{n>=0} a(2*n) * x^(2*n)/(2*n)! = I_0(2*x)^4. (I = Modified Bessel function of the first kind).
a(n) = binomial(2*n,n)*A002895(n). - Mark van Hoeij, Apr 19 2013
a(n) = binomial(2*n,n)^2*hypergeom([1/2,-n,-n,-n],[1,1,1/2-n],1). - Peter Luschny, May 23 2017
a(n) ~ 2^(6*n+1) / (Pi*n)^2. - Vaclav Kotesovec, Nov 13 2017
From Bradley Klee, Aug 20 2018: (Start)
G.f.: Define G(x) = Sum_{n>=0} a(n)*x^n and G^(j) = (d/dx)^j G(x), then Sum_{j=0..4,k=0..5} M_{j,k}*G^(j)*x^k = 0, with
M={{-8, 768, 0, 0, 0, 0}, {1, -424, 14592, 0, 0, 0}, {0, 7, -1172, 25344, 0, 0}, {0, 0, 6, -640, 10240, 0}, {0, 0, 0, 1, -80, 1024}}.
Sum_{j=0..2,k=0..4} M_{j,k}*a(n-j)*n^k = 0, with
M={{0, 0, 0, 0, 1}, {-8, 52, -132, 160, -80}, {768, -3584, 5888, -4096, 1024}}.
(End)
a(n) = Sum_{i+j+k+l=n, 0<=i,j,k,l<=n} multinomial(2n [i,i,j,j,k,k,l,l]). - Shel Kaphan, Jan 16 2023

A049037 Number of cubic lattice walks that start and end at origin after 2n steps, not touching origin at intermediate stages.

Original entry on oeis.org

1, 6, 54, 996, 22734, 577692, 15680628, 445162392, 13055851998, 392475442092, 12029082873372, 374482032292008, 11808861461931492, 376406128925067528, 12108063535794336312, 392560994063887113744, 12814685828476778001726, 420836267423433182275404
Offset: 0

Views

Author

Alessandro Zinani (alzinani(AT)tin.it)

Keywords

Examples

			a(5) = 577692 because there are 577692 different walks that start and end at the origin after 2*5=10 steps, avoiding origin at intermediate steps.
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 322-331.

Crossrefs

Invert A002896, A094059.
Column k=3 of A361397.

Programs

  • Maple
    read transforms; t1 := [ seq(A002896(i),i=1..25) ]; INVERTi(t1);
    # second Maple program:
    b:= proc(n) option remember; `if`(n<2, 5*n+1,
          (2*(2*n-1)*(10*n^2-10*n+3) *b(n-1)
           -36*(n-1)*(2*n-1)*(2*n-3) *b(n-2)) /n^3)
        end:
    g:= proc(n) g(n):= `if` (n<1, -1, -add(g(n-i) *b(i), i=1..n)) end:
    a:= n-> abs(g(n)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 02 2012
  • Mathematica
    (* A002896 : *) b[n_] := b[n] = Binomial[2*n, n]*HypergeometricPFQ[{1/2, -n, -n}, {1, 1}, 4]; max = 32; a[0] = 1; se = Series[ Sum[ a[n] x^(2 n), {n, 1, max}] - 1 + 1/Sum[ b[n]*x^(2 n), {n, 0, max}], {x, 0, max}]; coes = CoefficientList[se, x]; sol = First[ Solve[ Thread[ coes == 0]]]; Table[ a[n], {n, 0, 16}] /. sol (* Jean-François Alcover, Dec 20 2011 *)
    b[n_] := b[n] = If[n < 2, 5*n + 1, (2*(2*n - 1)*(10*n^2 - 10*n + 3)*b[n-1] - 36*(n - 1)*(2*n - 1)*(2*n - 3)*b[n-2]) / n^3];
    g[n_] := g[n] = If[n < 1, -1, -Sum [g[n - i]*b[i], {i, 1, n}]];
    a[n_] := Abs[g[n]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 12 2018, after Alois P. Heinz *)

Formula

Define a_0, a_1, ... = [ 1, 6, 54, ... ] by 1+Sum b_i x^i = 1/(1-Sum a_i x^i) where b_0, b_1, ... = [ 1, 6, 90, ... ] = A002896.
Or, Sum[ a(n) x^(2n), n=1, 2, ...infinity ] = 1-1/Sum[ A002896(n)*x^(2n), n=0, 1, ...infinity ].
G.f.: 2-sqrt(1+12*z) /hypergeom([1/8, 3/8], [1], 64/81*z *(1+sqrt(1-36*z))^2 *(2+sqrt(1-36*z))^4 /(1+12*z)^4)/ hypergeom([1/8, 3/8], [1], 64/81*z *(1-sqrt(1-36*z))^2 *(2-sqrt(1-36*z))^4 /(1+12*z)^4). - Sergey Perepechko, Jan 30 2011
a(n) ~ c * 36^n / n^(3/2), where c = 0.1014559485279103938501072426734... . - Vaclav Kotesovec, Sep 13 2014
c = 384 * (3 + 2*sqrt(3)) * Pi^(9/2) / (Gamma(1/24)^4 * Gamma(11/24)^4). - Vaclav Kotesovec, Apr 23 2023

A361397 Number A(n,k) of k-dimensional cubic lattice walks with 2n steps from origin to origin and avoiding early returns to the origin; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 4, 2, 0, 1, 6, 20, 4, 0, 1, 8, 54, 176, 10, 0, 1, 10, 104, 996, 1876, 28, 0, 1, 12, 170, 2944, 22734, 22064, 84, 0, 1, 14, 252, 6500, 108136, 577692, 275568, 264, 0, 1, 16, 350, 12144, 332050, 4525888, 15680628, 3584064, 858, 0
Offset: 0

Views

Author

Alois P. Heinz, Mar 10 2023

Keywords

Comments

Column k is INVERTi transform of k-th row of A287318.

Examples

			Square array A(n,k) begins:
  1,  1,     1,      1,       1,        1,        1, ...
  0,  2,     4,      6,       8,       10,       12, ...
  0,  2,    20,     54,     104,      170,      252, ...
  0,  4,   176,    996,    2944,     6500,    12144, ...
  0, 10,  1876,  22734,  108136,   332050,   796860, ...
  0, 28, 22064, 577692, 4525888, 19784060, 62039088, ...
		

Crossrefs

Columns k=0-5 give: A000007, |A002420|, A054474, A049037, A359801, A361364.
Rows n=0-2 give: A000012, A005843, A139271.
Main diagonal gives A361297.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
          add(b(n-j, i-1)*binomial(n, j)^2, j=0..n))
        end:
    g:= proc(n, k) option remember; `if` (n<1, -1,
          -add(g(n-i, k)*(2*i)!*b(i, k)/i!^2, i=1..n))
        end:
    A:= (n,k)-> `if`(n=0, 1, `if`(k=0, 0, g(n, k))):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[n_, 0] = 0; b[n_, 1] = 1; b[0, k_] = 1;
    b[n_, k_] := b[n, k] = Sum[Binomial[n, i]^2*b[i, k - 1], {i, 0, n}]; (* A287316 *)
    g[n_, k_] := g[n, k] = b[n, k]*Binomial[2 n, n]; (* A287318 *)
    a[n_, k_] := a[n, k] = g[n, k] - Sum[a[i, k]*g[n - i, k], {i, 1, n - 1}];
    TableForm[Table[a[n, k], {k, 0, 10}, {n, 0, 10}]] (* Shel Kaphan, Mar 14 2023 *)

Formula

A(n,1)/2 = A000108(n-1) for n >= 1.
G.f. of column k: 2 - 1/Integral_{t=0..oo} exp(-t)*BesselI(0,2*t*sqrt(x))^k dt. - Shel Kaphan, Mar 19 2023

A063887 Number of n-step walks on a square lattice starting from the origin but not returning to it at any stage.

Original entry on oeis.org

1, 4, 12, 48, 172, 688, 2576, 10304, 39340, 157360, 607376, 2429504, 9442448, 37769792, 147495104, 589980416, 2311926188, 9247704752, 36333781776, 145335127104, 572189853200, 2288759412800, 9025822792896, 36103291171584, 142567754881168, 570271019524672, 2254477964009664, 9017911856038656
Offset: 0

Views

Author

Henry Bottomley, Aug 28 2001

Keywords

Comments

a(n)/4^n tends to zero as n increases.

Examples

			a(2)=12 since there are 16 2-step walks but 4 of them involve a return to the origin at some stage; similarly a(3)=48 since there are 64 3-step walks but 16 of them involve a return to the origin at some stage.
		

Programs

  • Mathematica
    CoefficientList[ Pi/(2 (1 - 4 x) EllipticK[16 x^2]) + O[x]^25, x] (* Jean-François Alcover, Jun 02 2019 *)
  • PARI
    my(x='x+O('x^33)); Vec( agm(1, (1+4*x)/(1-4*x)) ) \\ Joerg Arndt, May 17 2019

Formula

a(2n) = 4*a(2n-1) - A054474(n); a(2n+1) = 4*a(2n).
G.f.: agm(1, (1+4*x)/(1-4*x)), where agm(x,y) = agm((x+y)/2,sqrt(x*y)) is the arithmetic-geometric mean. - Paul D. Hanna, Oct 03 2014
a(n) ~ Pi * 4^n / log(n) * (1 - (gamma + 3*log(2)) / log(n) + (gamma^2 + 6*gamma*log(2) + 9*log(2)^2 - Pi^2/6) / log(n)^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Sep 29 2019

Extensions

a(23) corrected by Jean-François Alcover, Jun 02 2019

A359801 Number of 4-dimensional cubic lattice walks that start and end at origin after 2n steps, not touching origin at intermediate stages.

Original entry on oeis.org

1, 8, 104, 2944, 108136, 4525888, 204981888, 9792786432, 486323201640, 24874892400064, 1302278744460352, 69474942954714112, 3764568243058030208, 206675027529594291200, 11473858525271117889536, 643154944963894079717376, 36355546411928157876528744, 2070313613815122857027563200
Offset: 0

Views

Author

Shel Kaphan, Mar 08 2023

Keywords

Comments

In Novak's note it is mentioned that if P(z) and Q(z) are the g.f.s for the probabilities of indecomposable and decomposable loops, respectively, that P(z) = 1 - 1/Q(z). This works equally well using loop counts rather than probabilities. The g.f.s may be expressed by the series constructed from the sequences of counts of loops of length 2*n. Q(z) for the 4-d case is the series corresponding to A039699.
To obtain the probability of returning to the point of origin for the first time after 2*n steps, divide a(n) by the total number of walks of length 2*n in d dimensions: (2*d)^(2*n) = 64^n.

Crossrefs

Cf. A039699, A287317 (number of walks that return to the origin in 2n steps).
Number of walks that return to the origin for the first time in 2n steps, in 1..3 dimensions: |A002420|, A054474, A049037.
Column k=4 of A361397.

Programs

  • Mathematica
    walk4d[n_] :=
     Sum[(2 n)!/(i! j! k! (n - i - j - k)!)^2, {i, 0, n}, {j, 0,
       n - i}, {k, 0, n - i - j}]; invertSeq[seq_] :=
      CoefficientList[1 - 1/SeriesData[x, 0, seq, 0, Length[seq], 1], x]; invertSeq[Table[walk4d[n], {n, 0, 17}]]
  • PARI
    seq(n) = {my(v=Vec(2 - 1/serlaplace(besseli(0, 2*x + O(x^(2*n+1)))^4))); vector(n+1, i, v[2*i-1])} \\ Andrew Howroyd, Mar 08 2023

Formula

G.f.: 2 - 1/Q(x) where Q(x) is the g.f. of A039699.
G.f.: 2 - 1/Integral_{t=0..oo} exp(-t)*BesselI(0,2*t*sqrt(x))^4 dt.
INVERTi transform of A039699.

A043546 Coefficients of asymptotic expansion of return probability for random walk in d-dimensional cubic lattice as a function of d.

Original entry on oeis.org

0, 1, 2, 7, 35, 215, 1501, 11354, 88978, 675569, 4175664, 1725333, -687775083, -19848956619, -438027976068, -8715988203509, -161989586455204, -2784493824166078, -41530410660307610, -406672888265416456, 4420077014249902362, 456572861717941696791
Offset: 0

Views

Author

Joe Keane (jgk(AT)jgk.org)

Keywords

Examples

			Flajolet's code gives the following asymptotic expansion: p(d) = 1/(2*d) + 2/(2*d)^2 + 7/(2*d)^3 + 35/(2*d)^4 + 215/(2*d)^5 + 1501/(2*d)^6 + 11354/(2*d)^7 + 88978/(2*d)^8 + 675569/(2*d)^9 + 4175664/(2*d)^10 + 1725333/(2*d)^11 - 687775083/(2*d)^12 - 19848956619/(2*d)^13 - 438027976068/(2*d)^14 - 8715988203509/(2*d)^15 - 161989586455204/(2*d)^16 - 2784493824166078/(2*d)^17 - 41530410660307610/(2*d)^18 - 406672888265416456/(2*d)^19 + 4420077014249902362/(2*d)^20 + ...
G.f. = x + 2*x^2 + 7*x^3 + 35*x^4 + 215*x^5 + 1501*x^6 + 11354*x^7 + ...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 322-331.

Programs

  • Maple
    walk:=proc(order) local n,j:
    j:=sum(t^(2*n)/(2*d)^(2*n)/n!^2,n=0..order): eval(subs(O=0, asympt(exp(d*log(j)),d,order+2)))*exp(-t): 1-1/int(%,t=0..infinity):
    RETURN(asympt(asympt(%,d,2*order+5),d,order+1)):
    end:
    seq(coeff(convert(walk(20),polynom),d,-n)*2^n,n=0..20); (Ronaldo)
  • Mathematica
    nn = 20; I1 = Sum[x^n/n!^2, {n, 0, nn}]; Iw = (I1 /. x -> w^2*x)^(1/(2*w)); g = Sum[(2*n)!*SeriesCoefficient[Iw, {x, 0, n}], {n, 0, nn}]; p = 1 - 1/g; Table[SeriesCoefficient[p, {w, 0, n}], {n, 0, nn}] (* Jean-François Alcover, Jan 08 2014, after the PARI code by Noam D. Elkies *)
    a[ n_] := If[n < 0, 0, With[{A = Series[ BesselI[ 0, 2 Sqrt[y y x]]^(1/(2 y)), {x, 0, n}]}, SeriesCoefficient[ 1 - 1 / (Sum[(2 k)! SeriesCoefficient[ A, {x, 0, k}], {k, 0, n}]), {y, 0, n}]]]; (* Michael Somos, May 25 2014 *)
  • PARI
    N = 20
    I1 = sum(n=0,N,x^n/n!^2,O(x^(N+1)));
    Iw = subst(I1,x,w^2*x)^(1/(2*w));
    g = sum(n=0,N,(2*n)!*polcoeff(Iw,n,x)) + O(w^(N+1));
    p = 1 - 1/g
    vector(N,n,polcoeff(p,n))
    \\ Noam D. Elkies, Dec 13 2011 (see link)

Extensions

Edited by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 27 2004

A094060 Number of walks of length n on hexagonal grid that start and end at the origin. Intermediate returns to the origin are not permitted.

Original entry on oeis.org

1, 0, 6, 12, 54, 216, 1032, 4896, 24606, 125040, 651348, 3432168, 18331992, 98814816, 537343632, 2942475552, 16214888286, 89835783264, 500116783740, 2795958732024, 15690597591636, 88354191756816, 499060719941616, 2826794871554112, 16052536475622792
Offset: 0

Views

Author

Gareth McCaughan, Jun 10 2004

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<3, [1,0,6][n+1], ((n-1)*
          n*b(n-1) +24*(n-1)^2*b(n-2) +36*(n-1)*(n-2)*b(n-3))/n^2)
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          b(n)-add(a(n-i)*b(i), i=1..n-1))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Dec 07 2020
  • Mathematica
    b[n_] := b[n] = If[n<3, {1, 0, 6}[[n+1]], ((n-1)n b[n-1] + 24(n-1)^2* b[n-2] + 36(n-1)(n-2) b[n-3])/n^2];
    a[n_] := a[n] = If[n==0, 1, b[n] - Sum[a[n-i] b[i], {i, 1, n-1}]];
    a /@ Range[0, 23] (* Jean-François Alcover, Jan 14 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(g=sum(m=0, n, (3*m)!/m!^3*x^(2*m)*(1+2*x)^m, O(x*x^n))); Vec(2-1/g)} \\ Andrew Howroyd, Aug 09 2025

Formula

INVERTi transform of A002898. - R. J. Mathar, Sep 29 2020
Showing 1-10 of 17 results. Next