OFFSET
1,4
COMMENTS
The unitary analog of A344300.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n, gcd(d, n/d)=1, d square} (-1)^(d+1) * d.
Multiplicative with a(2^e) = 1 - 2^e if e is even and 1 if e is odd, and for p > 2, a(p^e) = p^e + 1 if e is even and 1 if e is odd.
Dirichlet g.f.: (zeta(s)*zeta(2*s-2)/zeta(3*s-2))*(2^(3*s)-2^(s+3)+4)/(2^(3*s)-4).
Sum_{k=1..n} a(k) ~ c * n^(3/2), where c = zeta(3/2)/(3*zeta(5/2)*(4*sqrt(2)-1)) = 0.1393911255... .
MATHEMATICA
f[p_, e_] := If[OddQ[e], 1, p^e + 1]; f[2, e_] := If[OddQ[e], 1, 1 - 2^e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1] == 2, if(f[i, 2]%2, 1, 1 - 2^f[i, 2]), if(f[i, 2]%2, 1, f[i, 1]^f[i, 2] + 1))); }
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Amiram Eldar, Jan 29 2023
STATUS
approved