OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
a(2n) = 0, a(2n+1) = A349341(2n+1) for all n >= 1.
Multiplicative with a(p^e) = 0 if p=2 or e>1, otherwise a(p) = -p. - (After Sebastian Karlsson's similar formula for A349341).
MATHEMATICA
a[1]=1; a[n_]:=-DivisorSum[n, If[OddQ[n/#], n/#, 0]*a@#&, #<n&]; Array[a, 89] (* Giorgos Kalogeropoulos, Nov 15 2021 *)
f[p_, e_] := If[e == 1, -p, 0]; f[2, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
PROG
(PARI) A349343(n) = { my(f = factor(n)); prod(i=1, #f~, if((2==f[i, 1])||(f[i, 2]>1), 0, -f[i, 1])); };
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Antti Karttunen, Nov 15 2021
STATUS
approved