EulerPhi
EulerPhi[n] gives the Euler totient function ϕ(n), which counts integers up to n that are coprime to n.
Examples
Count integers coprime to 12:
EulerPhi[12]
(* 4 *)Totient values for first 10 integers:
Table[EulerPhi[n], {n, 1, 10}]
(* {1, 1, 2, 2, 4, 2, 6, 4, 6, 4} *)Please visit the official Wolfram Language Reference for more details.