Obtaining modulus of $\phi(pqr)$ without calculator Given $p, q, r$ are prime numbers, and $n = pqr = 398585546147$, how do I obtain $\phi(pqr) \bmod 32$?
I tried equating it to $(p - 1)(q - 1)(r - 1) \bmod 32$ but I do not know how to proceed from there. Calculators are not allowed for this question as well. 
 A: Partial answer . . .

Although it was not explicitly specified, I suspect it was intended that the primes $p,q,r$ are distinct. Thus, in what follows, I'll assume $p,q,r$ are distinct.

As you noted, $n = pqr \implies \phi(n) = (p-1)(q-1)(r-1)$.

\begin{align*}
n \text{ odd}&\implies p,q,r \text{ are odd }\\[6pt]
&\implies p-1,q-1,r-1 \text{ are even}\\[6pt]
&\implies 8\,|\,(p-1)(q-1)(r-1)\\[6pt]
&\implies \phi(n) \equiv 0 \pmod 8\\[6pt]
\end{align*}
Since $n \equiv 3 \pmod 4$, either 


*

*Case $(1)\;\;$Exactly one of $p,q,r$ is congruent to $3$ mod $4$, and the remaining two are congruent to $1$ mod $4$.

*Case $(2)\;\;p,q,r$ are all congruent to $3$ mod $4$.


For case $(1)$, two of $p-1,q-1,r-1$ are multiples of $4$, and the remaining one is even, hence $\phi(n)=0 \pmod{32}$.

For case $(2)$, each of $p-1,q-1,r-1$ is even, but not a multiple of $4$. It follows that $\phi(n)$ is a multiple of $8$, but not a multiple of $16$, hence $\phi(n) = 8 \text{ or }24 \pmod{32}$.

Thus, $\phi(n)\text{ mod }32$ is one of $0,8,24$.
