Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A086882
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A086882 a(n) is the period of the imaginary continued fraction expansion of sqrt(-n). +0
1
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; listen)
OFFSET

0,3

COMMENT

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 (baruchel(AT)users.sourceforge.net), Jul 03 2007

EXAMPLE

a(7) = 5 because sqrt(-7) = [2i, -2i, {-3i, -2i, -2i, -2i, -3i},...].

PROGRAM

(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: A078029 A078030 A073469 this_sequence A100240 A072690 A108520

Adjacent sequences: A086879 A086880 A086881 this_sequence A086883 A086884 A086885

KEYWORD

easy,nonn

AUTHOR

Thomas Baruchel (baruchel(AT)users.sourceforge.net), Aug 22 2003

EXTENSIONS

Edited by Don Reble (djr(AT)nk.ca), Jul 31 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 5 17:24 EST 2009. Contains 170342 sequences.


AT&T Labs Research