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.

This page as a plain text file.
%I A166698 #25 Dec 31 2022 01:47:34
%S A166698 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,
%T A166698 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,
%U A166698 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
%N A166698 Totally multiplicative sequence with a(p) = a(p-1) - 1 for prime p.
%C A166698 From _Antti Karttunen_, Dec 30 2022: (Start)
%C A166698 Note the correspondences between four sequences:
%C A166698   A087003 --- abs ---> A323239
%C A166698      ^                    ^
%C A166698      |                    |
%C A166698     inv                  inv
%C A166698      |                    |
%C A166698      v                    v
%C A166698   A000035 <--- abs --- A166698 (this sequence)
%C A166698 Here inv means that the sequences are Dirichlet Inverses of each other, and abs means taking absolute values.
%C A166698 (End)
%H A166698 Antti Karttunen, <a href="/A166698/b166698.txt">Table of n, a(n) for n = 1..65537</a>
%F A166698 Multiplicative with a(p^e) = (a(p-1)-1)^e.
%F A166698 If n = Product p(k)^e(k) then a(n) = Product (a(p(k)-1)-1)^e(k).
%F A166698 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.
%F A166698 a(p) = -1 for prime p > 2.
%F A166698 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).
%F A166698 Sum_{d|n} a(d) * A000012(d) = Sum_{d|n} a(d) * A000012(d/n) = A053866(n) = A093709(n) for n>= 1.
%F A166698 a(n) = A000035(n) * A008836(n). - _Antti Karttunen_, Sep 14 2017
%F A166698 From Antti Karttunen_, Dec 19 & Dec 30 2022: (Start)
%F A166698 a(A003961(n)) = A008836(n).
%F A166698 a(n) = A353557(n) - A353558(n).
%F A166698 (End)
%o A166698 (Scheme, with memoization-macro) (definec (A166698 n) (if (= 1 n) n (* (+ -1 (A166698 (+ -1 (A020639 n)))) (A166698 (A032742 n))))) ;; _Antti Karttunen_, Sep 14 2017
%o A166698 (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
%Y A166698 Cf. A000035 (absolute values), A001222, A003961, A008836, A323239 (Dirichlet inverse).
%Y A166698 Cf. A046337 (positions of positive terms), A067019 (of negative terms), A353557, A353558.
%Y A166698 Cf. also A358839, A359378.
%K A166698 sign,mult
%O A166698 1,1
%A A166698 _Jaroslav Krizek_, Oct 18 2009
%E A166698 More terms from _Antti Karttunen_, Sep 14 2017