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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A268038 List of y-coordinates of point moving in clockwise square spiral. 14
 0, 0, -1, -1, -1, 0, 1, 1, 1, 1, 0, -1, -2, -2, -2, -2, -2, -1, 0, 1, 2, 2, 2, 2, 2, 2, 1, 0, -1, -2, -3, -3, -3, -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,13 COMMENTS This spiral, in either direction, is sometimes called the "Ulam spiral", but "square spiral" is a better name. (Ulam looked at the positions of the primes, but of course the spiral itself must be much older.) - N. J. A. Sloane, Jul 17 2018 LINKS Peter Kagey, Table of n, a(n) for n = 1..10000 Visualization of spiral using Plot 2. - Hugo Pfoertner, May 29 2018 EXAMPLE Sequence gives y-coordinate of the n-th point of the following spiral: . 20--21--22--23--24--25 | | 19 6---7---8---9 26 | | | | 18 5 0---1 10 27 | | | | | 17 4---3---2 11 28 | | | 16--15--14--13--12 29 | 35--34--33--32--31--30 MATHEMATICA a[n_] := a[n] = If[n==0, 0, a[n-1] + Cos[Mod[Floor[Sqrt[4*(n-1) + 1]], 4]* Pi/2]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 11 2018, after Seppo Mustonen *) PROG (PARI) L=1; d=-1; for(r=1, 9, d=-d; k=floor(r/2)*d; for(j=1, L++, print1(k, ", ")); forstep(j=k-d, -floor((r+1)/2)*d+d, -d, print1(j, ", "))) \\ Hugo Pfoertner, Jul 28 2018 CROSSREFS A174344 gives sequence of x-coordinates. This is the negative of A274923. The (x,y) coordinates for a point sweeping a quadrant by antidiagonals are (A025581, A002262). - N. J. A. Sloane, Jul 17 2018 Sequence in context: A125088 A226456 A343642 * A274923 A249071 A231713 Adjacent sequences: A268035 A268036 A268037 * A268039 A268040 A268041 KEYWORD sign,easy AUTHOR Peter Kagey, Jan 24 2016 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 February 21 12:33 EST 2024. Contains 370235 sequences. (Running on oeis4.)