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.

Showing 1-5 of 5 results.

A274369 Let the starting square of Langton's ant have coordinates (0, 0), with the ant looking in negative x-direction. a(n) is the x-coordinate of the ant after n moves.

Original entry on oeis.org

0, 0, 1, 1, 0, 0, -1, -1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, 0, 0, -1, -1, 0, 0, -1, -1, -2, -2, -1, -1, -2, -2, -3, -3, -2, -2, -1, -1, -2, -2, -3
Offset: 0

Views

Author

Felix Fröhlich, Jun 19 2016

Keywords

Crossrefs

Cf. A274370 (y-coordinate).

Programs

  • Python
    # A274369: Langton's ant by Andrey Zabolotskiy, Jul 05 2016
    def ant(n):
        steps = [(1, 0), (0, 1), (-1, 0), (0, -1)]
        black = set()
        x = y = 0
        position = [(x, y)]
        direction = 2
        for _ in range(n):
            if (x, y) in black:
                black.remove((x, y))
                direction += 1
            else:
                black.add((x, y))
                direction -= 1
            (dx, dy) = steps[direction%4]
            x += dx
            y += dy
            position.append((x, y))
        return position
    print([p[0] for p in ant(100)])
    # change p[0] to p[1] to get y-coordinates

Formula

a(n+104) = a(n) + 2 for n > 9975. - Andrey Zabolotskiy, Jul 05 2016

A275302 Iterations at which Langton's Ant living on triangular tiling passes through the origin.

Original entry on oeis.org

0, 6, 24, 30, 72, 78, 96, 102, 108, 174, 180, 198, 212, 222, 252, 282, 292, 306, 324, 330, 408, 414, 420, 438, 444, 522, 544, 554, 576, 594, 648, 666, 672, 798, 804, 810, 852, 858, 920, 926, 972, 978, 984, 1018, 1024, 1154, 1160, 1178, 1184, 1190, 1208, 1214
Offset: 1

Views

Author

Oleg Nikulin, Jul 22 2016

Keywords

Comments

Langton's Ant living on triangular tiling (or, equivalently, hexagonal grid) follows the rules similar to those of the ordinary Langton's ant. On a white cell, turn 60 degrees right, flip the color of the cell, then move forward one unit. On a black cell, turn 60 degrees left, flip the color of the cell, then move forward one unit.
On these iterations pattern becomes symmetric. Orientation of the ant on these iterations is always the same.
Empirically, a(n) ~ c*n^1.207.

Crossrefs

A274370 Let the starting square of Langton's ant have coordinates (0, 0), with the ant looking in negative x-direction. a(n) is the y-coordinate of the ant after n moves.

Original entry on oeis.org

0, 1, 1, 0, 0, -1, -1, 0, 0, -1, -1, -2, -2, -1, -1, 0, 0, -1, -1, -2, -2, -3, -3, -2, -2, -1, -1, -2, -2, -1, -1, -2, -2, -1, -1, 0, 0, -1, -1, 0, 0, 1, 1, 0, 0, -1, -1, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 1, 1, 2
Offset: 0

Views

Author

Felix Fröhlich, Jun 19 2016

Keywords

Crossrefs

Cf. A274369 (x-coordinate).

Formula

a(n+104) = a(n) - 2 for n > 9975. - Andrey Zabolotskiy, Jul 05 2016

A094867 Number of iterations of the LQTL cellular automaton required to generate a square of cells in identical states.

Original entry on oeis.org

4, 8, 32, 64, 416, 832
Offset: 0

Views

Author

Robert H Barbour and J. Chapman, Jun 15 2004

Keywords

Comments

For the definition of the LQTL CA, see A102127. The square of size 1 on iteration 1 is not included.

Examples

			After step a(5) = 832 of the cellular automaton, the nonempty cells form a 8x8 square, all cells in state 2.
		

Crossrefs

Extensions

Edited by Andrey Zabolotskiy, Nov 05 2023

A275117 Direction where Langton's ant is looking after n moves: 1 if looking in starting direction, 2 if looking 90 degrees clockwise from starting direction, 3 if looking 90 degrees counterclockwise from starting direction, or 4 if looking in direction opposite to starting direction.

Original entry on oeis.org

1, 2, 4, 3, 1, 3, 1, 2, 4, 3, 4, 3, 1, 2, 4, 2, 1, 3, 4, 3, 4, 3, 1, 2, 4, 2, 4, 3, 1, 2, 1, 3, 4, 2, 4, 2, 4, 3, 1, 2, 1, 2, 4, 3, 1, 3, 4, 2, 1, 2, 1, 3, 1, 2, 1, 2, 4, 3, 1, 3, 4, 2, 1, 2, 1, 2, 4, 3, 1, 3, 1, 2, 4, 3, 4, 2, 1, 3, 1, 3, 1, 2, 4, 3, 4, 3, 1
Offset: 0

Views

Author

Felix Fröhlich, Jul 18 2016

Keywords

Crossrefs

Formula

From Andrey Zabolotskiy, Oct 11 2016: (Start)
Let d(n) = (A255938(n) mod 4). Then:
a(n)=1 if d(n)=0,
a(n)=2 if d(n)=1,
a(n)=4 if d(n)=2,
a(n)=3 if d(n)=3.
(End)

Extensions

More terms from Andrey Zabolotskiy, Oct 11 2016
Showing 1-5 of 5 results.