[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a261990 -id:a261990
Displaying 1-5 of 5 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
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. +10
5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,21
LINKS
Wikipedia, Langton's ant.
FORMULA
a(n+104) = a(n) + 2 for n > 9975. - Andrey Zabolotskiy, Jul 05 2016
PROG
(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
CROSSREFS
Cf. A274370 (y-coordinate).
KEYWORD
sign,look
AUTHOR
Felix Fröhlich, Jun 19 2016
STATUS
approved
A275305 Color of the cell Langton's Ant living on triangular tiling touches on its n-th step before the color is changed by the ant; 0=white, 1=black. +10
5
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
COMMENTS
The ant starts from a completely white tiling.
There are never more than six 0's or 1's in a row because six identical turns will circle back into the same cell, which will have since changed.
LINKS
Andrey Zabolotskiy, Table of n, a(n) for n = 0..100000 (calculated using Oleg Nikulin's program)
Wikipedia, Turmite
CROSSREFS
KEYWORD
nonn
AUTHOR
Oleg Nikulin, Jul 22 2016
STATUS
approved
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. +10
4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,12
LINKS
Wikipedia, Langton's ant.
FORMULA
a(n+104) = a(n) - 2 for n > 9975. - Andrey Zabolotskiy, Jul 05 2016
CROSSREFS
Cf. A274369 (x-coordinate).
KEYWORD
sign,look
AUTHOR
Felix Fröhlich, Jun 19 2016
STATUS
approved
A326695 Langton's ant with three cell colors: color of the cell the ant moves to at the end of iteration n: 0 for white, 1 for black, 2 for gray. +10
2
0, 0, 0, 1, 0, 0, 0, 2, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 0, 0, 2, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 0, 0, 2, 1, 1, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 0, 2, 1, 0, 2, 1, 2, 2, 0, 0, 2, 1, 1, 0, 0, 2, 1, 1, 2, 2, 0, 2, 1, 0, 2, 1, 2, 2, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
On a white square, turn 90 degrees right, change the color to black, then move forward one unit.
On a black square, turn 90 degrees left, change the color to gray, then move forward one unit.
On a gray square, turn 180 degrees, change the color to white, then move forward one unit.
LINKS
Felix Fröhlich, Illustration of iterations 0-50, 2019.
FORMULA
a(n+276) = a(n). - Rémy Sigrist, Jul 20 2019
EXAMPLE
See illustrations in Fröhlich, 2019.
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jul 19 2019
EXTENSIONS
More terms from Rémy Sigrist, Jul 20 2019
STATUS
approved
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. +10
0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
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)
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jul 18 2016
EXTENSIONS
More terms from Andrey Zabolotskiy, Oct 11 2016
STATUS
approved
page 1

Search completed in 0.006 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 09:19 EDT 2024. Contains 375532 sequences. (Running on oeis4.)