OFFSET
1,3
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = (phi(n)/2)*Product_{d|n} d^moebius(n/d), n>1.
a(1) = 1; a(p^e) = p * phi(p^e) / 2 for prime p; otherwise, a(n) = phi(n) / 2. - Álvar Ibeas, Jan 15 2023
MATHEMATICA
Table[If[n>1, (EulerPhi[n]/2) * Product[d^MoebiusMu[n/d], {d, Divisors[n]}], 1], {n , 1, 72}] (* Indranil Ghosh, Mar 16 2017 *)
PROG
(PARI) f(n) = {my(r = 1); fordiv(n, d, r*=d^moebius(n/d)); r};
a(n) = if (n==1, 1, f(n)*eulerphi(n)/2); \\ Indranil Ghosh, Mar 16 2017; edited by Michel Marcus, Jan 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Apr 05 2004
STATUS
approved