Let $U(n)$ be group under multiplication modulo $n$. For $n=248$, find number of elements in $U (n)$.
As I tried to do this problem. The number of required elements are $\phi(n) $. So to calculate $\phi(248) $ I first write $248$ as product of powers of primes. So we have $248= 2^3\cdot 31$.
Since $\phi (n) = n (1- \frac{1}{p})(1-\frac{1}{q})$ , where $n= p^iq^j$,
So $\phi (248) =248 (1-\frac{1}{2})(1-\frac{1}{31}) =120$.
But book says answer is $180$. What's going wrong?