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-7 of 7 results.

A102369 Intervals between successive arrivals of Langton's Ant at the origin.

Original entry on oeis.org

4, 4, 8, 36, 8, 36, 44, 44, 92, 92, 8, 8, 8, 8, 36, 8, 36, 184, 4, 2752, 732, 8, 2016, 596, 1284, 4, 4, 4, 8
Offset: 0

Views

Author

Robert H Barbour, Feb 22 2005, corrected Feb 27 2005

Keywords

Comments

Ant Farm algorithm available from Robert H Barbour.
First differences of A102358. - Felix Fröhlich, Jul 26 2016

References

  • Christopher G. Langton et al., (1990) Artificial Life II. Addison-Wesley, Reading, MA., USA

Crossrefs

A126978 a(n) = 104*n + 9977.

Original entry on oeis.org

9977, 10081, 10185, 10289, 10393, 10497, 10601, 10705, 10809, 10913, 11017, 11121, 11225, 11329, 11433, 11537, 11641, 11745, 11849, 11953, 12057, 12161, 12265, 12369, 12473, 12577, 12681, 12785, 12889, 12993, 13097, 13201, 13305, 13409, 13513, 13617, 13721, 13825
Offset: 0

Views

Author

Robert H Barbour, Mar 20 2007, Jun 12 2007

Keywords

Comments

Langton's Ant Superhighway, the start point (9977th iteration, J. Propp) and the period length for the Superhighway (104).

Crossrefs

Programs

Formula

a(0)=9977, a(1)=10081, a(n) = 2*a(n-1) - a(n-2). - Harvey P. Dale, Dec 16 2011
G.f.: (9977 - 9873*x)/(1-x)^2. - Vincenzo Librandi, Sep 10 2015
E.g.f.: exp(x)*(9977 + 104*x). - Elmo R. Oliveira, Dec 08 2024

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

A308563 Langton's ant on a three-dimensional grid: iterations where the ant passes through the origin.

Original entry on oeis.org

0, 4, 8, 18, 130, 2206, 4326, 4650, 16344, 16814, 47942, 48000, 49928
Offset: 1

Views

Author

Felix Fröhlich and Charlie Neder, Jun 07 2019

Keywords

Comments

For the rules applying to this ant, see A325953.
The sequence is finite, with 49928 being the last term. The ant never reaches the origin again after that, since it starts building a highway pattern at iteration 93475.

Crossrefs

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-7 of 7 results.