Chinese remainder Theorem in polynomials in one variable. In a question I was  answering, I needed to solve these congruences to proceed, and find the least $k&lt;1000$

$$2k+k^2 = 0 \pmod 3$$

$$ 2k^3 + 6k = 0 \pmod 7$$

$$ k = 0 \pmod 2$$

My try:

due to the third statement

$$ k = 2j$$ for  some integer $j$,

due to the second statement
$$ k  = 7x ; k= 7x+2$$ for some integer $k$

due to the first statement

$$ k = 3y+1; k = 3y$$

can I just exhaust all of the $4$ possible cases due to these statements and use the Chinese remainder theorem? I don't know if I'm doing it right or not.
As pointed out in the comments, the solutions for the second congruence are $k\equiv0,2,5\bmod7$. Now combine the congruences one-by-one: the first and third give $k\equiv0,4\bmod6$, which when combined with the second gives
$$k\equiv0,12,16,28,30,40\bmod42$$
So the least positive $k$ is $12$, and the greatest $k&lt;1000$ is $996$.
Least non-negative $k$ is $0$. If you are looking for non-zero solutions then, essentially $k = 2j$; $j = 7i+1, 7i-1$ or $7i$; $i = 3b, 3b+1$;