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?

Here is one way to solve it:

*

*$(2n+1)\pmod 7\equiv 1,3,5,0,2,4,6,\cdots\ $ and cycling.

*$2^{4n+5}\pmod 7\equiv 4,1,2,\cdots\ $ and cycling.

Both can be proved by induction on $n$.

*

*$1\times 3\equiv 2\times 5\equiv 4\times 6\equiv 3\pmod 7\ $ verify there are no others.

Finally can you find $n$ for which the conditions are reunited ? (hint, Chinese theorem).
