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-10 of 20 results. Next

A269757 Number of black cells after n moves of Langton's ant on an infinite hexagonal grid, starting with only white cells.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 8, 7, 8, 9, 10, 11, 10, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, 18, 17, 16, 17, 18, 19, 20, 19, 18, 19, 20, 21, 22, 21, 20, 19, 18, 19, 20, 21, 22, 21, 20, 21, 22, 23, 24, 23, 22, 21, 20, 21, 22, 23, 24, 23, 22, 23, 24, 25, 26
Offset: 0

Views

Author

Felix Fröhlich, Mar 04 2016

Keywords

Comments

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.
One may see the ant as (1) living on a hexagonal tiling (as in the illustration), in which case one third of all tiles are never visited, or (2) as living on a triangular tiling, in which case these never-visited hexagonal tiles are divided between six neighboring tiles to form triangular tiles, or (3) as living on a hexagonal grid understood as a graph dual to that triangular tiling, in which case the ant travels from one vertex to another using edges. - Andrey Zabolotskiy, Oct 09 2016

Crossrefs

Extensions

More terms from Oleg Nikulin, Jul 22 2016

A308590 Langton's ant on a Penrose rhomb tiling: number of black cells after n moves of the ant.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 7, 6, 7, 6, 7, 8, 9, 8, 9, 10, 11, 10, 9, 8, 7, 8, 7, 8, 9, 10, 9, 10, 11, 12, 11, 12, 13, 14, 13, 14, 15, 16, 15, 16, 17, 18, 17, 16, 15, 14, 13, 12, 11, 12, 11, 12, 13, 14, 13, 14, 13, 14, 15, 14, 13, 12, 13, 12, 13, 14
Offset: 0

Views

Author

Felix Fröhlich, Jun 09 2019

Keywords

Comments

The ant lives on a centrally symmetric Penrose rhomb tiling with a "Sun" patch (S configuration, cf. A242935) at the center and starts on one of the thick rhombs of that patch, looking towards one of the outward edges of that tile. On a white rhomb, turn to the next edge of that cell in clockwise direction, flip the color of the rhomb, then move forward one unit. On a black rhomb, turn to the next edge of that cell in counterclockwise direction, flip the color of the rhomb, then move forward one unit.
In contrast to the corresponding sequences for Langton's ant on periodic tilings, like the square tiling (A255938) or a hexagonal tiling (A269757), this sequence is most likely not unique. A Penrose tiling lacks translational symmetry, meaning any two finite regions in the tiling that are identical are surrounded by different patches of tiles when examining a large enough region of the surrounding tiles. Therefore I suspect that, unless the trajectory of the ant is bounded to stay inside a finite region of the tiling, the trajectories of any two ants placed at different starting points on the tiling will diverge at some point.

Examples

			See illustration in links.
		

Crossrefs

A326352 Total number of black cells after n iterations of Langton's ant with two ants on the grid placed side-by-side with one empty square between them and initially looking in the same direction.

Original entry on oeis.org

0, 2, 4, 6, 8, 6, 6, 6, 6, 8, 6, 8, 10, 12, 14, 12, 12, 12, 12, 14, 12, 12, 12, 12, 14, 12, 14, 16, 18, 20, 18, 18, 16, 16, 18, 16, 18, 20, 22, 24, 22, 22, 22, 22, 24, 22, 22, 22, 22, 24, 22, 24, 26, 28, 30, 28, 28, 26, 26, 28, 28, 30, 30, 32, 34, 34, 36, 34
Offset: 0

Views

Author

Felix Fröhlich, Jun 30 2019

Keywords

Comments

The two ants meet seven times; in that case, the color of the current square is flipped only once. Eventually, both ants build a recurrent highway pattern. - Rémy Sigrist, Jul 28 2019

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n + 104) = a(n) + 24 for any n >= 14373. - Rémy Sigrist, Jul 28 2019

Extensions

More terms from Rémy Sigrist, Jul 28 2019

A308937 Langton's ant on a chair tiling: number of black cells after n moves of the ant.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 5, 6, 5, 4, 5, 6, 7, 8, 7, 8, 9, 10, 9, 10, 9, 10, 11, 12, 11, 10, 9, 10, 9, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15, 14, 15, 16, 17, 16, 15, 14, 15, 14, 15, 16, 17, 18, 17, 18, 19, 20, 21, 20, 19, 20, 19, 20, 19, 18, 17, 18, 19, 20, 21, 20
Offset: 0

Views

Author

Felix Fröhlich, Jul 01 2019

Keywords

Comments

The ant begins on the inner corner of a subtile.
On a white tile, turn 90 degrees right, flip the color of the tile, then move forward until reaching a new tile, moving as far as possible within the tile.
On a black tile, turn 90 degrees left, then continue as above.
The chair tiling used for this automaton is, like all aperiodic hierarchical tilings, not unique (see for example Goodman-Strauss, p. 490). See "Remarks, 2019" in links for clarification which tiling the ant lives on.

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Formula

a(n) = a(n-42) for n >= 178. - Jinyuan Wang, Jul 13 2025

Extensions

More terms from Jinyuan Wang, Jul 13 2025

A325953 Langton's ant on a three-dimensional grid: number of black cells on the grid after n moves of the ant.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 5, 6, 6, 7, 8, 7, 8, 9, 10, 10, 9, 8, 8, 7, 6, 6, 6, 7, 8, 9, 9, 10, 11, 10, 11, 12, 11, 12, 13, 14, 14, 15, 16, 15, 16, 17, 18, 18, 17, 16, 16, 15, 14, 14, 14, 15, 16, 17, 17, 18, 19, 18, 19, 20, 19, 20, 21, 22, 22, 21, 20, 20, 21, 20, 21
Offset: 0

Views

Author

Felix Fröhlich, May 28 2019

Keywords

Comments

The ant starts on a completely white grid.
Order of operations: turn 90 degrees, change cell color, move forward one unit.
The rules governing the movement of the ant and the change of cell colors are shown in the following table:
Cell color at | Direction of | Color to which the
start of iteration | 90-degree turn | cell is changed
-------------------+----------------+-------------------
white | right | black
black | left | blue
blue | up | yellow
yellow | down | white
The first differences of this sequence are ultimately periodic with period 28 beginning at generation 93475, see A308563. - Charlie Neder, Jun 10 2019

Examples

			See illustration in links.
		

Crossrefs

Formula

a(n) = a(n-28) + 4 for n >= 93504. - Jinyuan Wang, Jul 13 2025

Extensions

a(51)-a(68) from Charlie Neder, Jun 06 2019

A325954 Langton's ant on a three-dimensional grid: number of blue cells on the grid after n moves of the ant.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 2, 2, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 5, 5, 5, 5, 4, 5, 6, 6, 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 8, 9, 10, 9, 9, 10, 10, 10, 10, 9, 8, 8, 8, 7, 8, 8, 8, 8, 7, 8, 9
Offset: 0

Views

Author

Felix Fröhlich, May 28 2019

Keywords

Comments

The ant starts on a completely white grid.
Order of operations: turn 90 degrees, change cell color, move forward one unit.
The rules governing the movement of the ant and the change of cell colors are shown in the following table:
Cell color at | Direction of | Color the cell is
start of iteration | 90-degree turn | changed to
--------------------------------------------------------
white | right | black
black | left | blue
blue | up | yellow
yellow | down | white

Examples

			See illustration in links.
		

Crossrefs

Formula

a(n) = a(n-28) + 2 for n >= 93504. - Jinyuan Wang, Jul 13 2025

Extensions

a(51)-a(80) from Charlie Neder, Jun 06 2019

A325955 Langton's ant on a three-dimensional grid: number of yellow cells on the grid after n moves of the ant.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, May 28 2019

Keywords

Comments

The ant starts on a completely white grid.
Order of operations: turn 90 degrees, change cell color, move forward one unit.
The rules governing the movement of the ant and the change of cell colors are shown in the following table:
Cell color at | Direction of | Color the cell is
start of iteration | 90-degree turn | changed to
--------------------------------------------------------
white | right | black
black | left | blue
blue | up | yellow
yellow | down | white

Examples

			See illustration in links.
		

Crossrefs

Formula

a(n) = a(n-28) + 4 for n >= 93504. - Jinyuan Wang, Jul 13 2025

Extensions

a(51)-a(81) from Charlie Neder, Jun 06 2019

A308973 Langton's ant on a truncated square tiling: number of black cells after n moves of the ant when starting on an octagon and looking towards an edge where the tile meets another octagon.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 8, 7, 8, 9, 10, 11, 10, 11, 10, 9, 10, 11, 12, 13, 14, 15, 14, 15, 16, 17, 18, 17, 16, 17, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 22, 23, 24, 23, 22, 23, 24, 25, 26, 27, 28, 27, 28, 29, 30, 29, 28, 29, 30, 31, 32, 33, 34
Offset: 0

Views

Author

Felix Fröhlich, Jul 04 2019

Keywords

Comments

First differs from A269757 at n = 19.
On a white square, turn 90 degrees right, flip the color of the tile, then move forward one unit.
On a white octagon, turn 45 degrees right, flip the color of the tile, then move forward one unit.
On a black square, turn 90 degrees left, flip the color of the tile, then move forward one unit.
On a black octagon, turn 45 degrees left, flip the color of the tile, then move forward one unit.
As in the original variant, order emerges after a transition phase and the ant starts building a recurrent "highway" pattern of 12 steps that repeats indefinitely. - Rémy Sigrist, Jul 21 2019

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n + 12) = a(n) + 6 for any n >= 34. - Rémy Sigrist, Jul 21 2019

Extensions

More terms from Rémy Sigrist, Jul 21 2019

A309064 Langton's ant on a snub square tiling: number of black cells after n moves of the ant when starting on a square.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 10, 9, 10, 11, 12, 13, 14, 13, 14, 15, 16, 15, 16, 17, 18, 17, 16, 17, 18, 17, 16, 15, 16, 17, 18, 17, 16, 17, 18, 19, 20, 21, 20, 21, 22
Offset: 0

Views

Author

Felix Fröhlich, Jul 10 2019

Keywords

Comments

First differs from A276073 at n = 16.
On a white square, turn 90 degrees right, flip the color of the tile, then move forward one unit.
On a white triangle, turn 60 degrees right, flip the color of the tile, then move forward one unit.
On a black square, turn 90 degrees left, flip the color of the tile, then move forward one unit.
On a black triangle, turn 60 degrees left, flip the color of the tile, then move forward one unit.

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Formula

a(n+1025) = a(n) + 25 for n > 96420. Lars Blomberg, Aug 15 2019

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
Showing 1-10 of 20 results. Next