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.

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.

This page as a plain text file.
%I A309236 #11 Jul 20 2025 22:04:27
%S A309236 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,
%T A309236 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,
%U A309236 6,7,6,7,8,7,8,7,8,9,10,9,8,7,6,7,6,5,4
%N 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.
%C A309236 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.
%C A309236 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.
%H A309236 Felix Fröhlich, <a href="/A309236/a309236.pdf">Illustration of iterations 0-50</a>, 2019.
%e A309236 See illustrations in Fröhlich, 2019.
%o A309236 (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
%Y A309236 Cf. A255938, A269757, A308590, A308937, A308973, A309064, A326167, A326352.
%K A309236 nonn
%O A309236 0,3
%A A309236 _Felix Fröhlich_, Jul 17 2019
%E A309236 More terms from _Jinyuan Wang_, Jul 15 2025