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

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174344 List of x-coordinates of point moving in clockwise spiral. 5
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

COMMENTS

Also, list of x-coordinates of point moving in counter-clockwise spiral.

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

...........

MAPLE

fx:=proc(n) option remember; local k; if n=1 then 0 else

k:=floor(sqrt(4*(n-2)+1)) mod 4;

fx(n-1) + sin(k*Pi/2); fi; end;

[seq(fx(n), n=1..120)]; # Based on Seppo Mustonen's formula. - N. J. A. Sloane, Jul 11 2016

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 (or A274923) gives sequence of y-coordinates.

Sequence in context: A216953 A276206 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 | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 5 07:11 EST 2016. Contains 278761 sequences.