Find n where $(2n+1)2^{4n+5} = 3 \pmod{7}$ For $n$ normal number, the book solved it like this:
If $n$ can be divided by $3$ (which is $n = 3k$) then $n = 21L + 9$.
If $n$ can't be divided by 3(Which is either $n = 3k +1$ or $n = 3k + 2$) then $n = 21L + 1$ or $n = 21L + 2$ .
But I didn't solve it like this.
My logic is that since 3 is a prime number then $(2n+1)2^{4n+5} = 3 \pmod{7}$ means either $2^{4n+5} = 3\pmod{7}$ and $ 2n + 1 = 1\pmod{7} $ or the other way around.
But since there is no $n$ value that can make $2^{4n+5} = 3\pmod{7}$ then it means:
$ 2n + 1 = 3 \pmod{7}$ and by calculating we find in the end $n = 7k' + 1$
And $ 2^{4n+5} = 1\pmod{7}$ and by calculating we find that $n = 3k''$
So it means that $n = 7k' + 1$ AND $n = 3k''$
So, I know that my solution is faulty but can anyone explains to me the right solution or point out where I went wrong?

Update:
I found that this solution provides a neat way in general to solve this kind of problems. I will apply the method here:
$$(2n+1)2^{4n+5} \equiv 3 \pmod 7 \\ \iff g(n)=(2n+1)2^n\equiv (2n+1) 2^{4n+6} \equiv 3\cdot 2 \equiv -1 \pmod 7$$
Suppose $n=3k+i, i=0,1,2$, then
$$-1 \equiv g(3k+i) = (6k+2i+1)2^{3k+i} \equiv (-k+2i+1)2^i=g(i)-k\cdot 2^i \pmod 7\\
\iff k\equiv 2^{3-i}(g(i)+1)\equiv (2i+1) 2^3 + 2^{3-i} \equiv 2^{3-i}+2i+1 \pmod 7 \\
(\text{ now write } k = 2^{3-i}+2i+1 + 7j)\\
\iff n=3k+i = 3(2^{3-i}+2i+1+7j)+i \equiv 3\cdot 2^{3-i}+7i+3 \pmod {21}\\
\iff n \equiv \begin{cases}3 \cdot 8 + 0 + 3 \equiv 6  \\ 3 \cdot 4 + 7 +3\equiv 1  \\ 3 \cdot 2 + 14+3\equiv 2 \\ \end{cases} \pmod{21}$$

Just some comments:
$f(n)=(2n+1)2^{4n+5}$, then $f(n+21)\equiv f(n) \pmod 7$ (notice that $2^3\equiv 1 \pmod 7$). So the most direct way is to plug in $n=1, 2, \ldots, 21$ into $f(n)$ and see which ones yield $3 \pmod 7$. No fancy theorems needed.
To save time, do as zwim showed by reusing partial results (you can make a $3 \times 7$ table).
