Calculate possible values of $a^4$ mod $120$.
I don't know how to solve this, what I did so far:
$120=2^3\cdot3\cdot5$
$a^4 \equiv 0,1 \pmod {\!8}$
$a^4 \equiv 0,1 \pmod {\!3}$
$a^4 \equiv 0,1 \pmod {\!5}$
I could use the CRT to get there's a unique solution mod $30$, but that gets me nowhere, right?
E: I just realized I can calculate $a^4 \bmod 8$ instead of $\!\bmod 2$ and the factors are still $\perp$.
After some heuristics with Excel I saw this:
$$(30b+a)^4 \equiv a^4 \text{ mod 120}$$
This can be verified by expanding the polynomial and noting that $30^4, 4\cdot 30^3, 6\cdot 30^2,$ and $4\cdot 30 \equiv 0 \text{ mod 120}$.
Any integer can be represented as $30b + a$ where $0 \le a \le 29$.
Hence, you can calculate $0^4 \text{ mod 120}$ up to $29^4 \text{ mod 120}$ and catch all of the values: $0,1,16,25,40,81,96,105$.