login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A180714
Sum of the x- and y-coordinates of a point moving in a clockwise spiral.
6
0, 1, 2, 1, 0, -1, -2, -1, 0, 1, 2, 3, 4, 3, 2, 1, 0, -1, -2, -3, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1
OFFSET
0,3
COMMENTS
A spiral on the simple square grid is constructed starting at (0,0) and walking in the closest self-avoiding clockwise loop: up 1 unit, right 1 unit, down 2 units, left 2 units, up 3 units etc. The step widths in the x-coordinate are 0, 1, 0, -2, 0, 3, ... a signed version of A142150; the step widths in the y-coordinate are 1, 0, -2, 0, 3, ... The x-coordinate after n steps (n>=0) is a signed variant of A002265(n+3), namely 0, 0, 1, 1, -1, -1, 2, 2, -2, -2, 3, ...; the y-coordinate after n steps is 0, 1, 1, -1, -1, 2, 2, ... (n >= 0). The sum of the x- and y-coordinates after n steps (at corners of the spiral) is c(n) = 0, 1, 2, 0, -2, 1, 4, 0, -4, 1, 6, 0, -6, 1, 8, 0, ..., with g.f. -x*(1+x)/( (x-1)*(x^2+1)^2). The current sequence is obtained by recording the sum of the two coordinates at all intermediate positions walking with a stride of 1 along the edges of the spiral, equivalent to showing all interpolating integers between two values of c(n). The first differences a(n+1)-a(n) are two 1's, four -1's, six 1's, eight -1's etc., blocks of +1 and -1 with run lengths increasing by 2. - R. J. Mathar, Jan 22 2011
EXAMPLE
Spiral begins at x=0, y=0, then moves up-right-down-left-up-right-...
a(0)=0+0=0, a(1)=1+0=1, a(2)=1+1=2, a(3)=0+1=1, a(4)=-1+1=0, a(5)=-1+0=-1, ...
CROSSREFS
Sequence in context: A010751 A194523 A362721 * A170959 A170960 A170961
KEYWORD
sign
AUTHOR
STATUS
approved