cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A166698 Totally multiplicative sequence with a(p) = a(p-1) - 1 for prime p.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Oct 18 2009

Keywords

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)

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.

Programs

  • 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

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)

Extensions

More terms from Antti Karttunen, Sep 14 2017