For a certain positive integer n, n2 gives a remainder of 4 when divided by 5, and n3 gives a remainder of 2 when divided by 5. What remainder does n give when divided by 5?
Please help!
I tried trial and error, but that didn't work! An explanation would be appreciated!