OFFSET
1,1
COMMENTS
The imaginary part of g(n) is A353354(n)*(sqrt(3)/2)*i.
f(n), g(n), and so also a(n), are determined by the cubefree part of n, A050985(n). If the cubefree part is not squarefree, g(n) is 0; otherwise g(n) = x^(A195017(A050985(n)), where x = (1 + sqrt(3)*i)/2, the primitive 6th root of unity with positive imaginary part.
The above formula arises from g being multiplicative (because f is multiplicative). g(prime(m)^k) is 1 for k == 0 (mod 3), 0 for k == 2 (mod 3), and for k == 1 (mod 3) the result depends on the parity of m. g(prime(m)^(3k+1)) is 1+w for odd m, -w for even m, where w is the cube root of unity with positive imaginary part. 1+w and -w are the primitive 6th roots of unity.
So the range of g is the 6 sixth roots of unity and 0 itself: these are the 7 Eisenstein integers closest to 0, and they are clearly closed under multiplication. The range of (a(n)) is [-2..2]. g(n) and a(n) are 0 if and only if the cubefree part of n is not squarefree. (Compare with the Moebius function being 0 when its argument is not squarefree.) Otherwise a(n) is even if and only if n is in A332820.
LINKS
Peter Munn, Table of n, a(n) for n = 1..10000
Peter Munn, Figure showing relationship of the Eisenstein integer g(n) to the presence of n in other sequences.
Eric Weisstein's World of Mathematics, Eisenstein Integer
FORMULA
PROG
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen and Peter Munn, Apr 19 2022
STATUS
approved