OFFSET
1,2
COMMENTS
Let ABC be an equilateral triangular grid of side n containing n^2 unit equilateral triangles. The x axis is defined along AB and the y axis is defined along AC such that starting point A has coordinates (0,0), finishing point B has coordinates (n,0) and C is at (0,n).
A grid point (x,y) on a path of the moving point P satisfies the following conditions when generating string of coordinates of grid points on a valid path: x + y <= n, y <= n/2, and x^2 + y^2 + x*y should increase when moving to the next grid point. Any three consecutive grid points of a string should not have same x coordinates or same y coordinates or same value for x + y.
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..500
Janaka Rodrigo, Python code for sets of strings of coordinates
EXAMPLE
n = 3 has 5 distinct sets of strings of coordinates:
{(0,0), (1,0), (1,1), (2,0), (3,0)},
{(0,0), (0,1), (1,1), (2,0), (2,1), (3,0)},
{(0,0), (1,0), (1,1), (2,1), (3,0)},
{(0,0), (1,0), (1,1), (2,0), (2,1), (3,0)},
{(0,0), (0,1), (1,1), (2,0), (3,0)}.
Therefore a(3) = 5.
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Janaka Rodrigo, Mar 29 2026
STATUS
approved
