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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A255938 Langton's ant walk: number of black cells on the infinite grid after the ant moves n times. 22
 0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 6, 7, 8, 9, 10, 9, 8, 7, 6, 7, 6, 7, 8, 9, 10, 9, 10, 11, 12, 13, 12, 11, 10, 9, 10, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 15, 14, 13, 12, 13, 12, 11, 12, 13, 12, 13, 14, 15, 16, 15, 14, 13, 12, 13, 12, 13, 14, 15, 16, 15, 16, 17 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS The ant starts from a completely white grid. From Albert Lau, Jun 19 2016: (Start) After n steps, the direction in which the ant is facing is 90 degree * a(n). For each 360 degrees, the ant makes a full turn. The ant's position after n steps is Sum_{k=1..n} e^(a(n)*i*Pi/2) when expressed as a complex number. (End) REFERENCES D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998; see p. 63. LINKS Alois P. Heinz, Table of n, a(n) for n = 0..20000 A. Gajardo, A. Moreira, and E. Goles, Complexity of Langton's ant, Discrete Applied Mathematics, 117 (2002), 41-50. Chris G. Langton, Studying artificial life with cellular automata, Physica D: Nonlinear Phenomena, 22 (1-3) (1986), 120-149. Wikipedia, Langton's ant. FORMULA a(n+104) = a(n) + 12 for n > 9976. - Andrey Zabolotskiy, Jul 05 2016 MATHEMATICA size = 10; grid = SparseArray[{}, {size, size}, 1]; {X, Y, n} = {size, size, 0}/2 // Round; While[1 <= X <= size && 1 <= Y <= size, n += grid[[X, Y]] // Sow; grid[[X, Y]] *= -1; {X, Y} += {Cos[\[Pi]/2 n], Sin[\[Pi]/2 n]}; ] // Reap // Last // Last // Prepend[#, 0] & (* Albert Lau, Jun 19 2016 *) CROSSREFS Cf. A126978. Sequence in context: A245343 A341019 A360535 * A081748 A322290 A030323 Adjacent sequences: A255935 A255936 A255937 * A255939 A255940 A255941 KEYWORD nonn,easy AUTHOR Arkadiusz Wesolowski, Mar 11 2015 STATUS approved

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.

Last modified June 3 03:21 EDT 2023. Contains 363103 sequences. (Running on oeis4.)