OFFSET
1,1
LINKS
FORMULA
a(n) is multiplicative with a(p^e)=(-1)^(e mod 3 + e mod 6) if e mod 3 < 2, otherwise 0, p prime and e >= 0.
Dirichlet inverse b(n) is multiplicative with b(p^e) = (-1)^e if e < 3, otherwise 0, p prime and e >= 0.
Sum_{k=1..n} a(k) ~ 2*n*Pi^4/(315*Zeta(3)). - Vaclav Kotesovec, Feb 08 2019
MATHEMATICA
f[e_] := If[Mod[e, 3] < 2, (-1)^(Mod[e, 3] + Mod[e, 6]), 0];
a[n_] := a[n] = Times @@ (f /@ FactorInteger[n][[All, 2]]);
Array[a, 100] (* Jean-François Alcover, Feb 26 2018 *)
PROG
(PARI) A299406(n) = { my(es = factor(n)[, 2]); factorback(apply(e -> if(2==(e%3), 0, (-1)^((e%3)+(e%6))), es)); }; \\ Antti Karttunen, Jul 29 2018
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Werner Schulte, Feb 20 2018
EXTENSIONS
Name clarified by Andrey Zabolotskiy, Dec 11 2023
STATUS
approved