OFFSET
1,2
COMMENTS
Moebius transform of A327668.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..n} (-1)^(bigomega(gcd(n,k)) - omega(gcd(n,k))).
a(n) = Sum_{d|n} mu(n/d) * A327668(d).
From Amiram Eldar, Nov 12 2022: (Start)
Multiplicative with a(p) = p, and a(p^e) = (p^e*(p^2+p-2) - 2*(-1)^e*p)/(p*(p+1)) for e>1.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/5) * Product_{p prime} (1 + 2/p^2) = 0.4381740171... . (End)
MATHEMATICA
Table[Sum[(-1)^(PrimeOmega[d] - PrimeNu[d]) EulerPhi[n/d], {d, Divisors[n]}], {n, 1, 75}]
Table[Sum[(-1)^(PrimeOmega[GCD[n, k]] - PrimeNu[GCD[n, k]]), {k, 1, n}], {n, 1, 75}]
f[p_, e_] := If[e > 1, (p^e*(p^2+p-2) - 2*(-1)^e*p)/(p*(p + 1)), p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 12 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(bigomega(d) - omega(d)) * eulerphi(n/d)); \\ Michel Marcus, Mar 27 2020
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Mar 26 2020
STATUS
approved