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
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
KEYWORD
easy,nonn
AUTHOR
Thomas Baruchel, Aug 22 2003
EXTENSIONS
Edited by Don Reble, Jul 31 2006
STATUS
approved