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?
If two numbers give the same remainder when divided by 5, they are said to be equivalent, modulo 5.  From $n^2$ to $n^3$, we have multiplied by $n$.  Since $n^2$ is equivalent to 4 (modulo 5), and $n^3$ is equivalent to 2 (modulo 5), we are looking for an integer $n$ for which $4\cdot n$ is equivalent to 2, modulo 5.  Notice that if $n$ is greater than 4, then we can replace it with its remainder when divided by 5 without changing whether it satisfies the condition. Therefore, we may assume that $0\leq n <5$.  Trying 0, 1, 2, 3, and 4, we find that only $\boxed{3}$ times 4 leaves a remainder of 2 when divided by 5.
3
Level 2
Number Theory
Problem: 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?
Solution:<|START_OF_LATENT|><|PRIOR_PREFIX|>To find the remainder of $n$ when divided by 5, we start by analyzing the given conditions. 

First, we know that $n^2 \equiv 4 \pmod{5}$. The possible quadratic residues modulo 5 are 0, 1, and 4. Therefore, $n^2 \equiv 4$ implies that $n$ could be congruent to either 2 or 3 modulo 5, since:

- If $n \equiv 0 \pmod{5}$, then $n^2 \equiv 0 \pmod{5}$.
- If $n \equiv 1 \pmod{5}$, then $n^2 \equiv 1 \pmod{5}$.
- If $n \equiv 2 \pmod{5}$, then $n^2 \equiv 4 \pmod{5}$.
- If $n \equiv 3 \pmod{5}$, then $n^2 \equiv 4 \pmod{5}$.
- If $n \equiv 4 \pmod{5}$, then $n^2 \equiv 1 \pmod{5}$.

Next, we consider the second condition: $n^3 \equiv 2 \pmod{5}$. We will evaluate the candidates for $n$ (2 and 3) to see which satisfies this condition.

1. If $n \equiv 2 \pmod{5}$:
   - Then $n^3 \equiv 2^3 \equiv 8 \equiv 3 \pmod{5}$.

2. If $n \equiv 3 \pmod{5}$:
   - Then $n^3 \equiv 3^3 \equiv 27 \equiv 2 \pmod{5}$.

Since $n \equiv 3 \pmod{5}$ satisfies both conditions ($n^2 \equiv 4$ and $n^3 \equiv 2$), we conclude that the remainder when $n$ is divided by 5 is 3.<|END_OF_LATENT|> The final answer is $3$.