The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A340945 List of Y-coordinates of point moving along one of the arms of a counterclockwise square spiral with four arms; A340944 gives X-coordinates. 3

%I #17 May 28 2023 11:25:57

%S 0,0,1,2,2,2,2,2,1,0,-1,-2,-3,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-2,-1,0,1,

%T 2,3,4,5,6,6,6,6,6,6,6,6,6,6,6,6,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,

%U -8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8,-8

%N List of Y-coordinates of point moving along one of the arms of a counterclockwise square spiral with four arms; A340944 gives X-coordinates.

%H Rémy Sigrist, <a href="/A340945/b340945.txt">Table of n, a(n) for n = 0..10101</a>

%H Rémy Sigrist, <a href="/A340945/a340945.gp.txt">PARI program for A340945</a>

%H <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>

%F a(n) = 0 iff n = 4*x^2 + 4*x + 1 for some x.

%F a(n) = Im z where z = (r-s*i)*i^s with s = round(sqrt(n)) = A000194(n) and remainder r = n - s^2. - _Kevin Ryde_, May 28 2023

%e The spiral starts as follows:

%e +-----+-----+-----+-----+

%e |7 6 5 4 |3 .

%e | | .

%e + +-----+-----+ + +

%e |8 | | |2 |

%e | | | | |

%e + + +-----+-----+ +

%e |9 | | |0 1 |

%e | | | | | .

%e + + + +-----+-----+ .

%e |10 | | .

%e | | | .

%e + + +-----+-----+-----+-----+

%e .11 .

%e .

%e - so a(0) = a(1) = a(9) = 0,

%e a(2) = a(8) = 1,

%e a(3) = a(4) = a(5) = a(6) = a(7) = 2,

%e a(10) = -1,

%e a(11) = -2.

%o (PARI) See Links section.

%o (PARI) a(n) = my(r,s=sqrtint(n,&r)); if(r>s, s++;r-=2*s-1); imag((r-s*I)*I^s); \\ _Kevin Ryde_, May 28 2023

%Y Cf. A340172, A340944, A000194.

%K sign,easy,look

%O 0,4

%A _Rémy Sigrist_, Jan 30 2021

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 07:19 EDT 2024. Contains 373423 sequences. (Running on oeis4.)