Compute |U(4)|, |U(10)|, |U(40)|
I know that I have to compute the order of the group for each. Am I looking for |U(4)|=2, |U(10)|=4 and |U(40)|=10? as the answer?
Thanks in advance
When ever you find the order of $\displaystyle U\!\left(n\right)$ (same as $\displaystyle \mathbb{Z}_n^{\times}$), we are always guaranteed to have 1 and n-1 in $\displaystyle U\!\left(n\right)$, so $\displaystyle \left|U\!\left(n\right)\right|\geq2$ when $\displaystyle n>2$.
In your case,
$\displaystyle U\!\left(4\right)=\{1,3\}$, so $\displaystyle \left|U\!\left(4\right)\right|=2$.
$\displaystyle U\!\left(10\right)=\{1,3,7,9\}$, so $\displaystyle \left|U\!\left(10\right)\right|=4$.
$\displaystyle U\!\left(40\right)=\{1,3,7,9,11,13,17,19,21,23,27, 29,31,33,37,39\}$, so $\displaystyle \left|U\!\left(4\right)\right|=16$.
So two of your answers were correct.
--------------------------------------------------------
As an aside (if you see something like this in the future): If $\displaystyle p$ is a prime, then $\displaystyle \left|U\!\left(p\right)\right|=p-1$