OFFSET
1,2
COMMENTS
A Gaussian integer z = x+iy is in the first quadrant if x > 0, y >= 0. Just one of the 4 associates z, -z, i*z, -i*z is in the first quadrant.
The sequence is fully additive.
LINKS
EXAMPLE
5 factors into the product of the primes 1+2*i, 1-2*i, but the first-quadrant associate of 1-2*i is i*(1-2*i) = 2+i, so r+i*s = 1+2*i + 2+i = 3+3*i. Therefore a(5) = 3.
MATHEMATICA
a[n_] := Module[{f = FactorInteger[n, GaussianIntegers->True]}, p = f[[;; , 1]]; e = f[[;; , 2]]; Im[Plus @@ ((If[Abs[#] == 1, 0, #]& /@ p) * e)]]; Array[a, 100] (* Amiram Eldar, Feb 28 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 11 2003
EXTENSIONS
More terms and further information from Vladeta Jovovic, Jan 27 2003
STATUS
approved