A358061 a(n) = phi(n) mod tau(n).
0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0, 4, 0, 2, 0, 3, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 3, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 6, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 0, 2, 0, 4, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 2, 0, 0, 0, 0
Offset: 1
Keywords
Examples
For n = 4; a(4) = A000010(4) mod A000005(4) = 2 mod 3 = 2.
Programs
-
Mathematica
a[n_] := Mod[EulerPhi[n], DivisorSigma[0, n]]; Array[a, 100] (* Amiram Eldar, Oct 28 2022 *)
-
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
Comments