Solution (source code)

= Solution

For a positive <integer> $n$, <Euler's totient function> counts the integers in a complete residue system that are <coprime> to $n$:
$$
\boxed{\varphi(n)=\#\{k:1\leq k\leq n,\ \gcd(k,n)=1\}.}
$$
For $n>1$ this is equally the count with $0<k<n$. The convention gives $\varphi(1)=1$.