A354099 The 3-adic valuation of Euler totient function phi.
0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 1, 2, 1, 0, 0, 1, 0, 0, 0, 1, 1, 2, 2, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 1, 2, 0, 0, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 2, 0, 2, 1, 1, 1, 0, 3, 0, 0, 1, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
Mathematica
a[n_] := IntegerExponent[EulerPhi[n], 3]; Array[a, 100] (* Amiram Eldar, May 17 2022 *)
-
PARI
A354099(n) = valuation(eulerphi(n),3);
-
PARI
A354099(n) = { my(f=factor(n)); sum(k=1,#f~,valuation((f[k,1]-1)*(f[k,1]^(f[k,2]-1)), 3)); }; \\ Demonstrates the additivity.