login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A166698
Totally multiplicative sequence with a(p) = a(p-1) - 1 for prime p.
7
1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1
OFFSET
1,1
COMMENTS
From Antti Karttunen, Dec 30 2022: (Start)
Note the correspondences between four sequences:
A087003 --- abs ---> A323239
^ ^
| |
inv inv
| |
v v
A000035 <--- abs --- A166698 (this sequence)
Here inv means that the sequences are Dirichlet Inverses of each other, and abs means taking absolute values.
(End)
LINKS
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).
Sum_{d|n} a(d) * A000012(d) = Sum_{d|n} a(d) * A000012(d/n) = A053866(n) = A093709(n) for n>= 1.
a(n) = A000035(n) * A008836(n). - Antti Karttunen, Sep 14 2017
From Antti Karttunen_, Dec 19 & Dec 30 2022: (Start)
a(A003961(n)) = A008836(n).
a(n) = A353557(n) - A353558(n).
(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
Cf. A000035 (absolute values), A001222, A003961, A008836, A323239 (Dirichlet inverse).
Cf. A046337 (positions of positive terms), A067019 (of negative terms), A353557, A353558.
Cf. also A358839, A359378.
Sequence in context: A056594 A374134 A374136 * A250299 A361122 A193497
KEYWORD
sign,mult
AUTHOR
Jaroslav Krizek, Oct 18 2009
EXTENSIONS
More terms from Antti Karttunen, Sep 14 2017
STATUS
approved