login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174344 List of x-coordinates of point moving in clockwise spiral. 3
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, 2, 1, 0, -1, -2, -3, -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, -4, -4, -4, -4, -4, -4, -4, -4, -3, -2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,10

LINKS

Peter Kagey, Table of n, a(n) for n = 1..10000

S. Mustonen, Ulam spiral in color [From Seppo Mustonen, Aug 21 2010]

Aaron Snook, Augmented Integer Linear Recurrences, Thesis, 2012.

FORMULA

From Seppo Mustonen, Aug 21 2010 with correction by Peter Kagey, Jan 24 2016: (Start)

a(1) = 0, a(n) = a(n-1) + sin(mod(floor(sqrt(4*(n-2)+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 x-coordinate of the n-th 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[n-1]+Sin[Mod[Floor[Sqrt[4*(n-1)+1]], 4]*Pi/2]]; Table[a[n], {n, 0, 50}] (* Seppo Mustonen, Aug 21 2010 *)

CROSSREFS

Cf. A180714. A268038 gives sequence of y-coordinates.

Sequence in context: A268242 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 28 23:43 EDT 2016. Contains 274271 sequences.