cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A309384 Number of black squares after n moves of a variant of Langton's ant with turns of 45 degrees.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 27 2019

Keywords

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.

Examples

			The first positions of the ant are:
  .  .  4  3  .  .  .  .
  .  5  .  .  2  .  .  .
  .  6  .  .  1  .  .  .
  .  .  7 0,8 .  . 11  .
  .  .  .  .  9 10  .  .
		

Crossrefs

Cf. A255938.

Programs

  • PARI
    See Links section.

Formula

a(n + 196) = a(n) + 72 for n >= 1021254426.