I've been trying to solve this problem but I couldn't and I don't get the solutions either (I don't think I get how to use modular arithmetic to solve problems in general. And though I tried to understand it by reading articles from Khan Academy and Art of Problem Solving, when it comes to actual application and solving, I can't quite use modular arithmetic - can anyone explain it in a simpler way please?).
The problem goes like this:
For a certain natural number $n$, $n^2$ gives a remainder of $4$ when divided by $5$, and $n^3$ gives a remainder of $2$ when divided by $5$. What remainder does $n$ give when divided by $5$?
How would you solve this using the modular arithmetic - or is there a simpler way/ other way to solve the problem?
The answer is $3$, by the way.