A337905 The number of walks of n steps on the hexagonal lattice that start at the origin and end at the adjacent vertex (1,0).
1, 2, 15, 60, 340, 1680, 9135, 48440, 264726, 1446060, 7996296, 44396352, 248133600, 1392623232, 7850732175, 44413669872, 252098234674, 1435074678180, 8190821465970, 46860693370920, 268676908816680, 1543504863288960, 8883248453674920, 51210412534906560
Offset: 1
Examples
There are a(2)=2 paths with 2 steps: UD or DU, where R=(1,0), L=(-1,0), U=(1/2,sqrt(3)/2), u=(-1/2,sqrt(3)/2), D=(1/2,-sqrt(3)/2), d=(-1/2,-sqrt(3)/2). There are a(3)=15 paths with 3 steps: 6 paths permutations of RuD, 6 permutations of RUd, and 3 permutations of RRL.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
- Yen Lee Loh, A general method for calculating lattice Green functions on the branch cut, arXiv:1706.03083 [math-ph], 2017, see W_{xyzn}^{hon}.
Programs
-
Maple
HexLat := proc(n,finx,finy) local a,L,R; a := 0 ; for L from 0 to n do for R from modp(n+finy-L,2) to n-L by 2 do a := a+ binomial(n,L) *binomial(n-L,R) *binomial(n-L-R,n/2+L/2-3*R/2+finx) *binomial(n-L-R,(n-L-R-finy)/2) ; end do: end do: a ; end proc: seq(HexLat(n,0,0),n=0..15) ; # A002898 seq(HexLat(n,1,0),n=0..15) ; # A337905 seq(HexLat(n,2,0),n=0..15) ; # A337906 seq(HexLat(n,1/2,1),n=0..15) ; # A337905
-
Mathematica
HexLat[n_, finx_, finy_] := Module[{a = 0, L, R}, For[L = 0, L <= n, L++, For[R = Mod[n + finy - L, 2], R <= n - L, R += 2, a = a + Binomial[n, L]*Binomial[n - L, R]*Binomial[n - L - R, n/2 + L/2 - 3*R/2 + finx]*Binomial[n - L - R, (n - L - R - finy)/2]]]; a]; Table[HexLat[n, 1, 0], {n, 1, 24}] (* Jean-François Alcover, Jun 25 2023, after R. J. Mathar *)
-
PARI
seq(n)={my(g=sum(m=1, n+1, (3*m)!/m!^3*x^(2*m)*(1+2*x)^m, O(x^(n+2)))); Vec(g/6)} \\ Andrew Howroyd, Aug 09 2025
Formula
D-finite with recurrence (n+1)^2*a(n) -n*(n+1)*a(n-1) -24n^2*a(n-2) -36*n*(n-1)*a(n-3)=0.
a(n) ~ 2^(n-1) * 3^(n + 1/2) / (Pi*n). - Vaclav Kotesovec, Apr 30 2024
a(n) = A002898(n+1) / 6. - Andrew Howroyd, Aug 09 2025