login
a(n) is the number of different ways for two particles to reach each other's starting corner on an equilateral triangular grid of side n units starting simultaneously and moving at the same constant speed along the grid lines, such that the distance between each particle and its own starting corner is always increasing, and the two particles never meet.
6

%I #27 May 16 2026 23:44:48

%S 0,4,24,596,8310,172488,3107862,74353264,1701729922,39579430250,

%T 990314090466,25417330852674,655790263533744,17452086712515986,

%U 473447952380880434,12973843492914467128,360984979208407121658,10174357261059518239918,289411408288438469596840

%N a(n) is the number of different ways for two particles to reach each other's starting corner on an equilateral triangular grid of side n units starting simultaneously and moving at the same constant speed along the grid lines, such that the distance between each particle and its own starting corner is always increasing, and the two particles never meet.

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

%C 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.

%C x + y <= n, y <= n/2 and x^2 + y^2 + x*y should increase when moving to the next grid point.

%C Each of P path gives a unique Q path by transforming a grid point (h, k) on P path into (n-h-k, k) on Q path. A P path and a Q path do not meet if r-th coordinate of P is different from r-th coordinate of Q.The r-th and (r+1)-th coordinates of P must not appear swapped in Q at positions r and r+1.

%C Paths do not need to have equal length.

%H Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a394/A394097.java">Java program</a> (github)

%H Janaka Rodrigo, <a href="/A394097/a394097_1.txt">Python code for pairs of strings of coordinates</a>

%e n = 2 has 4 different ways of reaching to other's starting corner:

%e Grid paths from A to B:

%e P1:{(0,0), (1,0), (2,0)},

%e P2:{(0,0), (0,1), (1,1), (2,0)},

%e P3:{(0,0), (1,0), (1,1), (2,0)}.

%e Grid paths from B to A:

%e Q1:{(2,0), (1,0), (0,0)},

%e Q2:{(2,0), (1,1), (0,1), (0,0)},

%e Q3:{(2,0), (1,0), (0,1), (0,0)}.

%e Set of valid pairs of grid paths:

%e {(P1, Q2), (P2, Q1), (P2, Q3), (P3, Q2)}

%e Therefore a(2) = 4.

%Y Cf. A393796, A394098, A357603, A360444.

%K nonn,walk

%O 1,2

%A _Janaka Rodrigo_, Mar 10 2026

%E More terms from _Sean A. Irvine_, Mar 27 2026

%E Data corrected by _Janaka Rodrigo_ and _Sean A. Irvine_, May 13 2026