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!)
A086882 a(n) is the period of the imaginary continued fraction expansion of sqrt(-n). 0
0, 0, 2, 2, 0, 4, 4, 5, 4, 0, 6, 6, 6, 10, 8, 6, 0, 8, 8, 10, 8, 10, 12, 11, 8, 0, 10, 10, 12, 16, 10, 17, 11, 12, 14, 10, 0, 12, 12, 12, 12, 16, 12, 16, 16, 16, 26, 17, 12, 0, 14, 14, 16, 22, 16, 16, 14, 16, 20, 18, 16, 36, 20, 14, 0, 16, 16, 22, 16, 26, 18, 27, 16, 30, 20, 17, 26, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Numbers n for which a(n) is odd seem to be a subset of numbers n for which A003285(n) is a multiple of 4. - Thomas Baruchel, Jul 03 2007
LINKS
EXAMPLE
a(7) = 5 because sqrt(-7) = [2i, -2i, {-3i, -2i, -2i, -2i, -3i},...].
PROG
(PARI) complex_period(n)= { local(a, b, c, d, k, oa, oc, i, s); s=sqrtint(n); if(issquare(c=n), 0, until(c==oc, oc=c; oa=a; if((a = (n-b^2)/c) == oa, return(2*i)); i += (k = (s-b)\a); d = a*k+b; c = (n-d^2)/a; b = (s+d)%c-s); 2*i-k); }
CROSSREFS
Cf. A003285.
Sequence in context: A307076 A342472 A308720 * A341415 A328141 A168587
KEYWORD
easy,nonn
AUTHOR
Thomas Baruchel, Aug 22 2003
EXTENSIONS
Edited by Don Reble, Jul 31 2006
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 02:00 EDT 2024. Contains 372298 sequences. (Running on oeis4.)