

A174344


List of xcoordinates of point moving in clockwise spiral.


1



0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 2, 2, 2, 1, 0, 1, 2, 2, 2, 2, 2, 1, 0, 1, 2, 3, 3, 3, 3, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,10


REFERENCES

Aaron Snook, Augmented Integer Linear Recurrences, http://www.cs.cmu.edu/afs/cs/user/mjs/ftp/thesisprogram/2012/theses/snook.pdf, 2012.  From N. J. A. Sloane, Dec 19 2012


LINKS

Table of n, a(n) for n=1..31.
S. Mustonen, Ulam spiral in color [From Seppo Mustonen, Aug 21 2010]


FORMULA

Contribution from Seppo Mustonen, Aug 21 2010: (Start)
a(n)=a(n1)+sin(mod(floor(sqrt(4*(n1)+1)),4)*Pi/2)
For a corresponding formula for the Y coordinate, replace sin by cos. (End)


EXAMPLE

Here is the beginning of the spiral. Sequence gives xcoordinate of the nth point.
....
. 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 32 30
...........


MATHEMATICA

a[n_]:=a[n]=If[n==0, 0, a[n1]+Sin[Mod[Floor[Sqrt[4*(n1)+1]], 4]*Pi/2]]; Table[a[n], {n, 0, 50}] [From Seppo Mustonen, Aug 21 2010]


CROSSREFS

Cf. A180714.
Sequence in context: A159782 A216953 A124752 * A049241 A230415 A101080
Adjacent sequences: A174341 A174342 A174343 * A174345 A174346 A174347


KEYWORD

sign


AUTHOR

Nikolas Garofil (nikolas(AT)garofil.be), Mar 16 2010


EXTENSIONS

Link corrected by Seppo Mustonen, Sep 05 2010
Clarified definition  N. J. A. Sloane, Dec 20 2012


STATUS

approved



