A384716 The totient of the product of unitary divisors of n.
1, 1, 2, 2, 4, 12, 6, 4, 6, 40, 10, 48, 12, 84, 120, 8, 16, 108, 18, 160, 252, 220, 22, 192, 20, 312, 18, 336, 28, 216000, 30, 16, 660, 544, 840, 432, 36, 684, 936, 640, 40, 889056, 42, 880, 1080, 1012, 46, 768, 42, 1000, 1632, 1248, 52, 972, 2200, 1344, 2052
Offset: 1
Keywords
Programs
-
Mathematica
f[p_, e_, m_] := (p-1)*p^(e*m-1); a[n_] := Module[{fct = FactorInteger[n]}, Times @@ (f[#1, #2, 2^(Length[fct]-1)] & @@@ fct)]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Jun 11 2025 *)
-
Python
from sympy import factorint def a(n): if n == 1: return 1 factors = factorint(n) phi, w = 1, len(factors) for p, e in factors.items(): phi *= (p - 1) * p**(e - 1) return n**((1 << (w-1)) - 1) * phi print([a(n) for n in range(1, 58)])
Comments