OFFSET
1,8
COMMENTS
Multiplicative because A003557 is. - Andrew Howroyd, Jul 27 2018
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
Multiplicative with a(p) = 0 and a(p^e) = (p-1)*p^(e-2) for prime p and e>1. - Werner Schulte, Sep 27 2018
a(n) = Sum_{d|n} mu(d)*phi(d)*phi(n/d). - Ridouane Oudra, Nov 18 2019
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} phi(gcd(n,k))*mu(gcd(n,k)).
a(n) = Sum_{k=1..n} phi(gcd(n,k))*mu(n/gcd(n,k)). (End)
MAPLE
with(numtheory): A003557 := n -> n/ilcm(op(numtheory[factorset](n))):
seq(add(mobius(d)*A003557(n/d), d in divisors(n)), n=1..100); # Ridouane Oudra, Nov 18 2019
MATHEMATICA
Table[DivisorSum[n, MoebiusMu[#] EulerPhi[#] EulerPhi[n/#] &], {n, 108}] (* Michael De Vlieger, Nov 18 2019 *)
f[p_, e_] := If[e == 1, 0, (p - 1)*p^(e - 2)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 06 2022 *)
PROG
(PARI)
A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = max(0, f[i, 2]-1)); factorback(f); }; \\ From A003557
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] == 1, 0, (f[i, 1] - 1)*f[i, 1]^(f[i, 2] - 2))); } \\ Amiram Eldar, Dec 06 2022
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Mar 11 2018
STATUS
approved