login
A360161
a(n) is the sum of unitary divisors of n that are odd squares minus the sum of unitary divisors of n that are even squares.
1
1, 1, 1, -3, 1, 1, 1, 1, 10, 1, 1, -3, 1, 1, 1, -15, 1, 10, 1, -3, 1, 1, 1, 1, 26, 1, 1, -3, 1, 1, 1, 1, 1, 1, 1, -30, 1, 1, 1, 1, 1, 1, 1, -3, 10, 1, 1, -15, 50, 26, 1, -3, 1, 1, 1, 1, 1, 1, 1, -3, 1, 1, 10, -63, 1, 1, 1, -3, 1, 1, 1, 10, 1, 1, 26, -3, 1, 1, 1
OFFSET
1,4
COMMENTS
The unitary analog of A344300.
LINKS
FORMULA
a(n) = Sum_{d|n, gcd(d, n/d)=1, d square} (-1)^(d+1) * d.
a(n) = A360160(n) - 2 * A358347(n).
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))); }
KEYWORD
sign,easy,mult
AUTHOR
Amiram Eldar, Jan 29 2023
STATUS
approved