I have done a number of congruence questions but then I encountered this question:
$7^{x+2} ≡ 5(mod 29)$
How do you go around solving this? I thought of splitting the powers to $7^x$ and $7^2$ but then I got stuck trying to evaluate it...
I have done a number of congruence questions but then I encountered this question:
$7^{x+2} ≡ 5(mod 29)$
How do you go around solving this? I thought of splitting the powers to $7^x$ and $7^2$ but then I got stuck trying to evaluate it...
Evaluating powers of $7$, mod $29$, we get \begin{align*} 7^0 \equiv 1\;(\text{mod}\;29)\\[4pt] 7^1 \equiv 7\;(\text{mod}\;29)\\[4pt] 7^2 \equiv 20\;(\text{mod}\;29)\\[4pt] 7^3 \equiv 24\;(\text{mod}\;29)\\[4pt] 7^4 \equiv 23\;(\text{mod}\;29)\\[4pt] 7^5 \equiv 16\;(\text{mod}\;29)\\[4pt] 7^6 \equiv 25\;(\text{mod}\;29)\\[4pt] 7^7 \equiv 1\;(\text{mod}\;29)\\[4pt] \end{align*} after which, the cycle repeats forever.
It follows that no power of $7$ is congruent to $5$, mod $29$.
$2$ can be proved to be a primitive root
$2^6\equiv6,2^7\equiv12,2^8\equiv-5,2^{14}\equiv12^2\equiv-1\pmod{29}$
$5=(-5)(-1)\equiv2^{8+14}$
$7\equiv29+7\equiv6^2\equiv(2^6)^2$
Using discrete logarithm, $(x+2)12\equiv22\pmod{\phi(29)}$