login
A358766
a(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)^A001222(1 + p + p^2 + ... + p^e).
a(n) = A008836(A000203(n)) = (-1)^A001222(A000203(n)) = (-1)^A058063(n).
a(n) = A008836(n) / A359166(n) = A359166(n) / A008836(n).
PROG
(PARI) A358766(n) = ((-1)^bigomega(sigma(n)));
(Python)
from functools import reduce
from operator import ixor
from collections import Counter
from sympy import factorint
def A358766(n): return -1 if reduce(ixor, sum((Counter(factorint((p**(e+1)-1)//(p-1))) for p, e in factorint(n).items()), Counter()).values(), 0)&1 else 1 # Chai Wah Wu, Dec 23 2022
CROSSREFS
Cf. A000203, A001222, A008836, A058063, A358767 (positions of positive terms), A358768 (of negative terms).
Cf. also A359166.
Sequence in context: A158388 A162285 A186035 * A359154 A359166 A359581
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Dec 18 2022
STATUS
approved