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”).

A359166
a(n) = lambda(n) * lambda(sigma(n)), where lambda is Liouville's lambda, and sigma is the sum of divisors function.
4
1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1
OFFSET
1
FORMULA
Multiplicative with a(p^e) = (-1)^(e + A001222(1 + p + p^2 + ... + p^e)).
a(n) = A008836(n) * A358766(n) = A008836(n) * A008836(A000203(n)).
PROG
(PARI) A359166(n) = ((-1)^(bigomega(n)+bigomega(sigma(n))));
(Python)
from functools import reduce
from operator import ixor
from collections import Counter
from sympy import factorint
def A359166(n): return (-1 if reduce(ixor, (f:=factorint(n)).values(), 0)&1 else 1)*(-1 if reduce(ixor, sum((Counter(factorint((p**(e+1)-1)//(p-1))) for p, e in f.items()), Counter()).values(), 0)&1 else 1) # Chai Wah Wu, Dec 23 2022
CROSSREFS
Cf. A000203, A001222, A008836, A058063, A358766, A359167 (positions of positive terms), A359168 (of negative terms).
Sequence in context: A186035 A358766 A359154 * A359581 A359792 A362927
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Dec 19 2022
STATUS
approved