A340171 List of X-coordinates of point moving along one of the arms of a counterclockwise double square spiral; A340172 gives Y-coordinates.
0, 1, 1, 0, -1, -2, -2, -2, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -5
Offset: 0
Keywords
Examples
The spiral starts as follows: +-----+-----+-----+-----+-----+ . | . | . +-----+-----+-----+ + . |5 4 3 |2 | . | | | + +-----+-----+ + |6 | 0 1 | . | | | . + +-----+-----+-----+ . |7 . | . +-----+-----+-----+-----+-----+ 8 9 10 11 12 13 - so a(0) = a(3) = a(10) = 0, - a(1) = a(2) = a(11) = 1.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
- Rémy Sigrist, PARI program for A340171
- Index entries for sequences related to coordinates of 2D curves
Programs
-
PARI
See Links section.
Formula
a(n) = 0 iff n belongs to A014105.
Comments