OFFSET
0,3
COMMENTS
Initially, all squares are white, and the ant is at the origin and oriented towards the east. The ant can travel horizontally or vertically (in any of the four cardinal directions) and diagonally (in any of the four intercardinal directions).
At a white square, the ant turns 45 degrees left, flips the color of the square and moves forward.
At a black square, the ant turns 45 degrees right, flips the color of the square and moves forward.
As in the original variant, the ant eventually builds a recurrent highway pattern, in the present case of 196 steps.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Representation of the squares visited during the first 100000000 moves (the dark squares are the most visited)
Rémy Sigrist, Representation of the grid after 1021259426 steps
Rémy Sigrist, PARI program for A309384
Wikipedia, Langton's ant
FORMULA
a(n + 196) = a(n) + 72 for n >= 1021254426.
EXAMPLE
The first positions of the ant are:
. . 4 3 . . . .
. 5 . . 2 . . .
. 6 . . 1 . . .
. . 7 0,8 . . 11 .
. . . . 9 10 . .
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 27 2019
STATUS
approved