login
Number of paths across a regular hexagonal grid with side length n.
0

%I #17 Jul 27 2023 12:15:49

%S 1,11,291,8547,259123,7997355,250062515,7900153283,251686581987,

%T 8073549437643,260453164773827,8441983967058723,274715571055249171,

%U 8969873019615172459,293727992832116083539,9642550297656399476611,317240324217012764748739

%N Number of paths across a regular hexagonal grid with side length n.

%C Each side of the hexagonal grid is tiled with n hexagons. A path starts at one vertex and ends at the diametrically opposite vertex. Each step comprises moving one cell down, one cell down-right or one cell up-right (no moving up or left).

%H Matthew Blair, Rigoberto Flórez, and Antara Mukherjee, <a href="https://arxiv.org/abs/2203.13205">Honeycombs in the Hosoya Triangle</a>, arXiv:2203.13205 [math.HO], 2022.

%e For n=2 there are 11 paths that cross diametrically opposite tiles in a honeycomb with 2 hexagons on each side. For n=3 there are 291 such paths.

%o (Python)

%o def paths(x, y, n):

%o if (x, y) in [(0, 0), (0, 1), (1, 0)]:

%o return 1

%o elif x == 0:

%o return paths(x, y - 1, n)

%o elif y == 0:

%o return paths(x - 1, y, n)

%o elif y == x + n - 1:

%o return paths(x, y - 1, n) + paths(x - 1, y - 1, n)

%o elif x == y + n - 1:

%o return paths(x - 1, y, n) + paths(x - 1, y - 1, n)

%o else:

%o return paths(x, y - 1, n) + paths(x - 1, y, n) + paths(x - 1, y - 1, n)

%o def honeycomb_paths(n):

%o return paths(2 * n - 2, 2 * n - 2, n)

%K nonn,walk

%O 1,2

%A _Alexandra S. Kim_, Apr 21 2023