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.

Previous Showing 11-20 of 20 results.

A309166 Langton's ant on a truncated hexagonal tiling: number of black cells after n moves of the ant when starting on a dodecagon and looking towards an edge where the dodecagon meets a triangle.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Jul 15 2019

Keywords

Comments

On a white dodecagon, turn 30 degrees right, flip the color of the tile, then move forward one unit.
On a black dodecagon, turn 30 degrees left, 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 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+15) = a(n) + 9 for n > 2034. - Lars Blomberg, Aug 13 2019

Extensions

More terms from Sean A. Irvine, Jul 22 2019

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

A309241 Langton's ant on a rhombitrihexagonal tiling: number of black cells after n moves of the ant when starting on a hexagon.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Jul 17 2019

Keywords

Comments

On a white hexagon, turn 60 degrees right, flip the color of the cell, then move forward one unit.
On a black hexagon, turn 60 degrees left, flip the color of the cell, then move forward one unit.
On a white square, turn 90 degrees right, flip the color of the cell, then move forward one unit.
On a black square, turn 90 degrees left, flip the color of the cell, then move forward one unit.
On a white triangle, turn 60 degrees right, flip the color of the cell, then move forward one unit.
On a black triangle, turn 60 degrees left, flip the color of the cell, then move forward one unit.

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Formula

a(n+448) = a(n). - Lars Blomberg, Aug 16 2019

Extensions

More terms from Lars Blomberg, Aug 16 2019

A309279 Langton's ant on a truncated trihexagonal tiling: number of black cells after n moves of the ant when starting on a dodecagon.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 10, 9, 10, 11, 12, 13, 14, 13, 14, 15, 16, 17, 18, 17, 18, 19, 20, 21, 22, 21, 22, 21, 22, 23, 24, 25, 24, 25, 26, 25, 26, 27, 28, 29, 30, 31, 32, 31, 32, 33, 34, 35, 36, 35, 36, 37, 38, 39, 40, 39, 40, 41, 42, 43, 44, 43, 44, 45, 46, 47, 48, 47, 46
Offset: 0

Views

Author

Felix Fröhlich, Jul 20 2019

Keywords

Comments

On a white dodecagon, turn 30 degrees right, flip the color of the tile, then move forward one unit.
On a black dodecagon, turn 30 degrees left, flip the color of the tile, then move forward one unit.
On a white hexagon, turn 60 degrees right, flip the color of the tile, then move forward one unit.
On a black hexagon, turn 60 degrees left, flip the color of the tile, then move forward one unit.
On a white square, turn 90 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.

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Extensions

More terms from Sean A. Irvine, Jul 22 2019

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

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Jul 21 2019

Keywords

Comments

On a white tile, turn 60 degrees right, flip the color of the tile, then move forward one unit.
On a black tile, turn 60 degrees left, flip the color of the tile, then move forward one unit.
The sequence has a cycle of length of 28292, that is, a(28292)=0 with the ant in the starting hexagon pointing in the start direction, so another cycle will follow. The maximum term in the cycle is a(8148)=174. - Lars Blomberg, Aug 01 2019

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Extensions

More terms from Lars Blomberg, Aug 01 2019

A282425 The maximum number of steps Langton's ant can make confined to an n X n grid.

Original entry on oeis.org

0, 5, 16, 45, 84, 163, 260
Offset: 1

Views

Author

Rok Cestnik, Feb 14 2017

Keywords

Comments

a(8) >= 338, a(9) >= 397, a(10) >= 502.
From Rok Cestnik, Aug 25 2017: (Start)
We are looking for the combination of grid configuration, ant orientation and ant position that yields the maximal number of steps before the ant leaves the grid. We consider all possible grid configurations and ant positions, but since the ant may move forward and backwards in time (see third considered symmetry below) we deduce that the maximal solution will always have the ant start from the edge of the grid.
For the sake of solution presentation, we consider these rules: at a white cell turn left, at a black cell turn right (vice versa results in the same behavior, just mirrored). Some cells might not get visited in a solution; therefore they are unconstrained, and we color then gray. We also take into consideration some symmetries of the ant to avoid presenting several maximal solutions that are just transformations of a single solution. That said, it is not impossible that two fundamentally different configurations would both have the same maximal number of steps.
Considered symmetries of the ant:
1. rotational symmetry, e.g., we consider that the configuration
+-----+-----+-----+ +-----+-----+-----+
| | |BBBBB| | | |BBBBB| |
| v |BBBBB| | | |BBBBB| <-- |
| |BBBBB| | | |BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| | | is |BBBBB| |BBBBB|
|BBBBB| | | equivalent |BBBBB| |BBBBB|
|BBBBB| | | to |BBBBB| |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB|BBBBB| |BBBBB| | |
| |BBBBB|BBBBB| |BBBBB| | |
| |BBBBB|BBBBB| |BBBBB| | |
+-----+-----+-----+ +-----+-----+-----+
.
2. mirror symmetry combined with color inversion, e.g., we consider that the configuration
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB| | |BBBBB| |BBBBB|
| |BBBBB| <-- | |B-->B| |BBBBB|
| |BBBBB| | |BBBBB| |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| is | |BBBBB| |
|BBBBB| |BBBBB| equivalent | |BBBBB| |
|BBBBB| |BBBBB| to | |BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| | | |BBBBB|BBBBB| |
|BBBBB| | | |BBBBB|BBBBB| |
|BBBBB| | | |BBBBB|BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
.
3. reversing the arrow of time combined with inverting the color of the cell on which the ant is located and turning the ant according to the color of its (now inverted) cell (with the chosen rules, if white turn left, if black turn right), e.g., the configuration
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
|B-->B| |BBBBB| |BBBBB|BBBBB|BBBBB|
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB| | will end |BBBBB|BBBBB|BBBBB|
| |BBBBB| | in state |BBBBB|BBBBB|BBBBB|
| |BBBBB| | |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB| | | | |BBBBB|
|BBBBB|BBBBB| | | <-- | |BBBBB|
|BBBBB|BBBBB| | | | |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
.
and
.
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB|BBBBB| | | |BBBBB|
|BBBBB|BBBBB|BBBBB| | ^ | |BBBBB|
|BBBBB|BBBBB|BBBBB| | | | |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB|BBBBB| will end | |BBBBB| |
|BBBBB|BBBBB|BBBBB| in state | |BBBBB| |
|BBBBB|BBBBB|BBBBB| | |BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| |BBBBB|BBBBB| |
|BB^BB| |BBBBB| |BBBBB|BBBBB| |
|BB|BB| |BBBBB| |BBBBB|BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
.
hence
.
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
|B-->B| |BBBBB| |BBBBB|BBBBB|BBBBB|
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB| | is |BBBBB|BBBBB|BBBBB|
| |BBBBB| | equivalent |BBBBB|BBBBB|BBBBB|
| |BBBBB| | to |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB| | |BBBBB| |BBBBB|
|BBBBB|BBBBB| | |BB^BB| |BBBBB|
|BBBBB|BBBBB| | |BB|BB| |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
(End)
Due to the ant's complex nature, its trajectory is hard to predict; therefore, an exhaustive search through the possible grid configurations must be performed, making this sequence computationally demanding.

Crossrefs

Extensions

a(7) from Rok Cestnik, Aug 12 2017

A309236 Langton's ant on a circular grid with 4-fold rotational symmetry: number of black cells on the grid after n moves of the ant.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Jul 17 2019

Keywords

Comments

On a white circular segment, turn right to the next edge of the segment, flip the color of that segment, then move onto the segment adjacent to that edge.
On a black circular segment, turn left to the next edge of the segment, flip the color of that segment, then move onto the segment adjacent to that edge.

Examples

			See illustrations in Fröhlich, 2019.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(c, d=1, x, y, u=1, v=List([])); print1(c); for(n=1, nn, if(x, if(x>#v, listput(v, [1, 1, 1, 1])); if(v[x][y]<0, d=d%4+1, d=(d+2)%4+1); c-=v[x][y]=-v[x][y]; if(d==3, x--; if(!x, d=(y+1)%4+1), x+=d%2; y=(y-d)%4+1), if(u<0, y=(d+2)%4+1, y=d%4+1); c-=u=-u; x=d=1); print1(", ", c)); \\ Jinyuan Wang, Jul 15 2025

Extensions

More terms from Jinyuan Wang, Jul 15 2025

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.

A325631 Langton's ant on an elongated triangular tiling: number of black cells after n moves of the ant when starting on a square and initially looking towards one of the edges where that square meets one of the neighboring triangles.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Sep 07 2019

Keywords

Comments

First differs from A276073 at n = 22.
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) = a(n-51) + 11 for n >= 1159. - Jinyuan Wang, Jul 15 2025

Extensions

More terms from Jinyuan Wang, Jul 15 2025

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
Previous Showing 11-20 of 20 results.