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.

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).

This page as a plain text file.
%I A337905 #26 Aug 09 2025 19:33:10
%S A337905 1,2,15,60,340,1680,9135,48440,264726,1446060,7996296,44396352,
%T A337905 248133600,1392623232,7850732175,44413669872,252098234674,
%U A337905 1435074678180,8190821465970,46860693370920,268676908816680,1543504863288960,8883248453674920,51210412534906560
%N 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).
%H A337905 Andrew Howroyd, <a href="/A337905/b337905.txt">Table of n, a(n) for n = 1..1000</a>
%H A337905 Yen Lee Loh, <a href="https://arxiv.org/abs/1706.03083">A general method for calculating lattice Green functions on the branch cut</a>, arXiv:1706.03083 [math-ph], 2017, see W_{xyzn}^{hon}.
%F A337905 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.
%F A337905 a(n+1) = A002898(n)+2*a(n)+2*A337907(n)+A337906(n).
%F A337905 a(n) ~ 2^(n-1) * 3^(n + 1/2) / (Pi*n). - _Vaclav Kotesovec_, Apr 30 2024
%F A337905 a(n) = A002898(n+1) / 6. - _Andrew Howroyd_, Aug 09 2025
%e A337905 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).
%e A337905 There are a(3)=15 paths with 3 steps: 6 paths permutations of RuD, 6 permutations of RUd, and 3 permutations of RRL.
%p A337905 HexLat := proc(n,finx,finy)
%p A337905     local a,L,R;
%p A337905     a := 0 ;
%p A337905     for L from 0 to n do
%p A337905     for R from modp(n+finy-L,2) to n-L by 2 do
%p A337905         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) ;
%p A337905     end do:
%p A337905     end do:
%p A337905     a ;
%p A337905 end proc:
%p A337905 seq(HexLat(n,0,0),n=0..15) ; # A002898
%p A337905 seq(HexLat(n,1,0),n=0..15) ; # A337905
%p A337905 seq(HexLat(n,2,0),n=0..15) ; # A337906
%p A337905 seq(HexLat(n,1/2,1),n=0..15) ; # A337905
%t A337905 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];
%t A337905 Table[HexLat[n, 1, 0], {n, 1, 24}] (* _Jean-François Alcover_, Jun 25 2023, after _R. J. Mathar_ *)
%o A337905 (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
%Y A337905 Cf. A002898 (returns to origin), A337906, A337907.
%K A337905 nonn,walk
%O A337905 1,2
%A A337905 _R. J. Mathar_, Sep 29 2020