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.
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
Keywords
Examples
See illustrations in Fröhlich, 2019.
Links
- Felix Fröhlich, Illustration of iterations 0-50, 2019.
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
Comments