582. The number $n^{2}+2 n(n \in N)$ ends with the digit 4. Find all possible values of its second-to-last digit.
$\triangle$ Add 1 to both sides of the equality

$$
n^{2}+2 n=10 a+4
$$

where $a-$ is the number of tens in the number $n^{2}+2 n$, to get:

$$
n^{2}+2 n+1=10 a+5, \quad(n+1)^{2}=10 a+5
$$

From this, it is clear that the number $n+1$ ends in 5, and therefore, its square ends in 25 (see the statement of problem 563). Then the number $a$ ends in 2, i.e., the second-to-last digit of the original number $n^{2}+2 n$ is 2.

Answer: 2.