Given $n\in\mathbb{N}$ we can write for $n>1$: $n=p_1^{a_1}\cdots p_s^{a_s}$ with primes $p_i$. Define $k:=\operatorname{lcm}(\varphi(p_1^{a_1}),\ldots,\varphi(p_s^{a_s}))$ (lowest common multiple)
I have to prove: For all $a\in\mathbb{Z}$ with $\gcd(a,n)=1$ that $a^k\equiv 1\pmod n$.
My idea is to show $k=\varphi(n)$ and use Euler's Totient Theorem: $a^{\varphi(n)}\equiv 1 \pmod n$. We have the equality $\dfrac{ab}{\gcd(a,b)}=\operatorname{lcm}(a,b)$ So we have
$k=\frac{\varphi(n)}{\gcd(\varphi(p_1^{a_1}),\ldots,\varphi(p_s^{a_s}))}$ But we cannot have $\gcd(\varphi(p_1^{a_1}),\ldots,\varphi(p_s^{a_s}))=1$ in general because $p_i=2$ and $p_j=3$ wouldn't work.
Another idea is to use $a^{\varphi(p_i^{a_i})}\equiv 1 \pmod {p_i^{a_i}}$ for $i=1,\ldots, s$. How can I use the Chinese Remainder Theorem? Are there any suggestions?