OFFSET
1,4
MATHEMATICA
a[n_] := Mod[EulerPhi[n], DivisorSigma[0, n]]; Array[a, 100] (* Amiram Eldar, Oct 28 2022 *)
PROG
(Python)
from math import prod
from sympy import factorint
def A358061(n):
f = factorint(n).items()
d = prod(e+1 for p, e in f)
return prod(pow(p, e-1, d)*((p-1)%d) for p, e in f) % d # Chai Wah Wu, Oct 29 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Oct 28 2022
STATUS
approved