A293539 Let P be the sequence of distinct lattice points defined by the following rules: P(1) = (0,0), P(2) = (1,0), and for any n > 2, P(n) is the closest lattice point to P(n-1) such that the angle of the vectors (P(n-2), P(n-1)) and (P(n-1), P(n)), say t, satisfies 0 < t <= Pi/2, and in case of a tie, minimize the angle t; a(n) = X-coordinate of P(n).
0, 1, 1, 0, -1, -1, 0, 2, 2, 1, 0, -1, -2, -2, -1, 1, 3, 3, 2, 2, 3, 3, 2, 1, -1, -2, -2, 0, 1, 4, 4, 3, 2, 1, 0, -3, -3, -2, -1, 2, 5, 5, 4, 4, 5, 5, 4, 3, 2, 1, 0, -3, -4, -4, -3, -3, -4, -4, -3, -2, 0, -2, -3, -5, -5, -4, 0, 1, 1, -5, -5, -4, -4, -5, -6, -6
Offset: 1
Examples
See representation of first points in Links section.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..12000
- Wikipedia, Langton's ant
- Rémy Sigrist, Representation of P(n) for n=1..42, with lines joining consecutive points
- Rémy Sigrist, Representation of P(n) for n=1..500, with lines joining consecutive points
- Rémy Sigrist, Representation of the repetitive pattern emerging at n=9118
- Rémy Sigrist, Colorized representation of the points P(n) for n=1..12000
- Rémy Sigrist, Colorized representation of the points P'(n) of the variant where we maximize the angle t in case of a tie for n=1..1000000
- Rémy Sigrist, PARI program for A293539
Programs
-
PARI
See Links section.
Formula
a(n + 258) = a(n) + 14 for any n >= 9118.
Comments