OFFSET
1,1
COMMENTS
From Antti Karttunen, Dec 30 2022: (Start)
Note the correspondences between four sequences:
^ ^
| |
inv inv
| |
v v
Here inv means that the sequences are Dirichlet Inverses of each other, and abs means taking absolute values.
(End)
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
Multiplicative with a(p^e) = (a(p-1)-1)^e.
If n = Product p(k)^e(k) then a(n) = Product (a(p(k)-1)-1)^e(k).
Multiplicative with a(p^e) = 0 if p = 2, with a(p^e) = 1 if p > 2 and e is even, with a(p^e) = -1 if p > 2 and e is odd.
a(p) = -1 for prime p > 2.
a(1) = 1, for k >= 1: a(2k) = 0, a(2k - 1) = 1 if A001222(2k - 1) is even, a(2k - 1) = -1 if A001222(2k - 1) is odd, where A001222(n) = bigomega(n).
From Antti Karttunen_, Dec 19 & Dec 30 2022: (Start)
(End)
PROG
(Scheme, with memoization-macro) (definec (A166698 n) (if (= 1 n) n (* (+ -1 (A166698 (+ -1 (A020639 n)))) (A166698 (A032742 n))))) ;; Antti Karttunen, Sep 14 2017
(PARI) A166698(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], 0, (-1)^f[k, 2])); }; \\ Antti Karttunen, Dec 19 2022
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Jaroslav Krizek, Oct 18 2009
EXTENSIONS
More terms from Antti Karttunen, Sep 14 2017
STATUS
approved