The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328258 a(n) = Sum_{d|n, gcd(d,n/d) = 1} (-1)^(d + 1) * d. 4
1, -1, 4, -3, 6, -4, 8, -7, 10, -6, 12, -12, 14, -8, 24, -15, 18, -10, 20, -18, 32, -12, 24, -28, 26, -14, 28, -24, 30, -24, 32, -31, 48, -18, 48, -30, 38, -20, 56, -42, 42, -32, 44, -36, 60, -24, 48, -60, 50, -26, 72, -42, 54, -28, 72, -56, 80, -30, 60, -72, 62, -32, 80, -63, 84 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Excess of sum of odd unitary divisors of n over sum of even unitary divisors of n.
a(n) = n+1 iff n is in A061345 \ {1}. - Bernard Schott, Mar 05 2023
LINKS
Eric Weisstein's World of Mathematics, Unitary Divisor.
FORMULA
If n = Product (p_j^k_j) then a(n) = Product (1 - (-1)^p_j * p_j^k_j).
If n odd, a(n) = usigma(n), where usigma = A034448.
Sum_{k=1..n} a(k) ~ c * n^2, where c = zeta(2)/(14*zeta(3)) = A306633 / 14 = 0.0977451... . - Amiram Eldar, Nov 17 2022
From Amiram Eldar, Jan 28 2023: (Start)
a(n) = 2 * A192066(n) - A034448(n).
a(n) = A192066(n) - A360156(n/2) if n is even, and A192066(n) otherwise.
Dirichlet g.f.: (zeta(s)*zeta(s-1)/zeta(2*s-1))*(2^(2*s)-2^(s+2)+2)/(2^(2*s)-2). (End)
MAPLE
f:= proc(n) local t;
mul(1 - (-1)^t[1] * t[1]^t[2], t=ifactors(n)[2])
end proc:
map(f, [$1..100]); # Robert Israel, Oct 10 2019
MATHEMATICA
a[n_] := Sum[Boole[GCD[d, n/d] == 1] (-1)^(d + 1) d, {d, Divisors[n]}]; Table[a[n], {n, 1, 65}]
a[1] = 1; a[n_] := Times @@ (1 - (-1)^First[#] First[#]^Last[#] & /@ FactorInteger[n]); Table[a[n], {n, 1, 65}]
PROG
(Magma) [&+[(-1)^(d+1)*d:d in Divisors(n)|Gcd(d, n div d) eq 1]:n in [1..70]]; // Marius A. Burtea, Oct 10 2019
(PARI) a(n) = sumdiv(n, d, if (gcd(d, n/d) == 1, (-1)^(d + 1) * d)); \\ Michel Marcus, Oct 10 2019
CROSSREFS
Sequence in context: A071989 A290278 A300894 * A190415 A024602 A367269
KEYWORD
sign,mult,look
AUTHOR
Ilya Gutkovskiy, Oct 09 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 04:28 EDT 2024. Contains 373115 sequences. (Running on oeis4.)