login
A293540
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) = Y-coordinate of P(n).
2
0, 0, 1, 1, 0, -1, -1, 0, 1, 2, 2, 1, -1, -2, -2, -1, 1, 2, 2, -1, -1, 0, 3, 3, 2, 1, 0, -2, -2, -1, 0, 3, 4, 4, 3, -1, -2, -3, -3, -2, 0, 1, 1, -2, -2, -1, 2, 4, 5, 5, 4, 0, -2, -3, -3, 1, 1, 0, -4, -4, -3, 2, 2, 1, 0, -1, -4, -4, -3, -3, -4, -4, 2, 2, 1, 0
OFFSET
1,10
COMMENTS
See A293539 for the X-coordinate of P(n), and additional comments.
LINKS
FORMULA
a(n + 258) = a(n) - 8 for any n >= 9118.
PROG
(PARI) See Links section.
CROSSREFS
Cf. A293539.
Sequence in context: A026605 A331104 A270646 * A073783 A134430 A130658
KEYWORD
sign,look
AUTHOR
Rémy Sigrist, Oct 11 2017
STATUS
approved