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.

A337906 The number of walks of n steps on the hexagonal lattice that start at the origin and end at the non-adjacent vertex (2,0).

Original entry on oeis.org

1, 6, 34, 200, 1095, 6230, 34636, 195552, 1099140, 6218520, 35210736, 200099328, 1139401263, 6504768270, 37211008120, 213311576192, 1225053737622, 7047867363108, 40612374024300, 234376628718960, 1354498970905080, 7838134441085520, 45412879702456800, 263417461793120000
Offset: 2

Views

Author

R. J. Mathar, Sep 29 2020

Keywords

Examples

			There is a(2)=1 path with 2 steps: RR, 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)=6 paths with 3 steps: RUD, RDU, DRU, DUR, URD, UDR.
		

Crossrefs

Cf. A002898 (returns to origin), A337905, A337907.

Programs

  • Maple
    # see 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, 2, 0], {n, 2, 25}] (* Jean-François Alcover, Jun 25 2023, after R. J. Mathar in A337905 *)

Formula

D-finite with recurrence (n-2)*(3*n^2-5*n-20)*(n+2)^2*a(n) -n*(3*n^4-2*n^3+n^2-130*n-208)*a(n-1) -24*n*(n-1)*(n-3)*(3*n^2+7*n-2)*a(n-2) -36*n*(n-1)*(n-2)*(3*n^2+n-22)*a(n-3)=0.
a(n) ~ 2^(n-1) * 3^(n + 1/2) / (Pi*n). - Vaclav Kotesovec, Apr 30 2024