Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A309384
Number of black squares after n moves of a variant of Langton's ant with turns of 45 degrees.
1
0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 14, 15, 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, 24, 23, 24, 25, 26, 25, 24, 25, 26, 27, 28, 29, 28, 29, 30, 29, 30, 31, 30, 31, 32, 33, 34, 35, 34, 35, 36, 37, 36, 37
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.
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
Cf. A255938.
Sequence in context: A017893 A017883 A269364 * A245353 A063278 A355459
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 27 2019
STATUS
approved