login
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.
1
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,3
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.
EXAMPLE
See illustrations in Fröhlich, 2019.
PROG
(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
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jul 17 2019
EXTENSIONS
More terms from Jinyuan Wang, Jul 15 2025
STATUS
approved