Solving $28^x \equiv 2 \pmod{43}$ 
How do we solve $28^x \equiv 2 \pmod{43}$?

I know there are not generally efficient methods for computing the discrete logarithm which are defined for an invertible $a$ modulo $q$ by $$a \equiv t^x \pmod{q}, \quad 0 \leq x \leq q-1,$$ but I was wondering if there was a way to compute it efficiently here. 
 A: We try to make $\,2\equiv 45\equiv \color{#c00}5\cdot \color{#0a0}3^2\,$ using factors of $\,3\,$ and $\,5\,$ from small powers of $\,28.\,$ 
$\qquad\qquad  28^3\equiv 22\equiv -\color{#0a0}3\cdot 7$
$\qquad\qquad  \color{#c00}{28^5}\equiv \color{#c00}5$
$\qquad\qquad 28^7\equiv 7$  
So we have $\,\color{#c00}5\,$ and we can make  $\ {-}\color{#0a0}3\equiv 28^3/28^7\equiv \color{#0a0}{28^{-4}}$
Therefore $\ 2\equiv \color{#c00}5\cdot (\color{#0a0}{-3})^2 \equiv  \color{#c00}{28^5}(\color{#0a0}{28^{-4}})^2\equiv 28^{-3}\equiv 28^{39},\ $ by $\,28^{42}\equiv 1\,$ by Fermat.
A: Some enumerating is inevitable:
Notice that 
$28^7 \equiv 7 \pmod{43}$
$28^4 \equiv 14 \pmod{43}$
Let $x = 4k+7w$ since Bézout's theorem 
Now $28^x \equiv 28^{4k+7w} \equiv  2 ^k 7^{k+w} \equiv 2 \pmod{43}$
$\implies k \equiv 1 \pmod {42}$ and $k+w \equiv 0 \pmod {42}$
$ \implies k \equiv 1 \pmod {42}$ and $w \equiv -1 \equiv 41 \pmod {42}$
$\implies x \equiv 39 \pmod{42}$
EDIT: Why do I come up with such idea?
Firstly, I write a program running all the logarithm with base $28$. Here is my program written in C plus plus:
int u = 1;
for(int i = 1;i<=42;++i)
{
        u*= 28;
        u%=43;
        printf("%d ",u);
}

All the related discrete logarithm  listed here (i.e. the output of my program):
28 10 22 14 5 11 7 24 27 25 12 35 34 6 39 17 3 41 30 23 42 15 33 21 29 38 32 36 19 16 18 31 8 9 37 4 26 40 2 13 20 1

And notice that $28 = 2 \times 7$, so I will try to find the position the least number which can be decomposed into $2$ or $7$ or spontaneous.
And I ascertain that position $7$ and $4$ satisfying the condition.  
A: We move from $28$ to $5$ to facilitate calculations (btw, both numbers are primitive roots modulo $43$). One has $5^{17}=28$ so we have to solve the equivalent equation $$5^{17x}\equiv 2\pmod{43}$$ Calculating first $$5^w\equiv 2\pmod{43}$$ we find $w=33$ hence $$5^{17x}=5^{33}\Rightarrow  5^{17x}=5^{33}\cdot 5^{42y}\space  (\text{ Fermat’s little theorem })$$
We have then the diophantine equation $$17x-42y=33$$ whose general solution is $$(x,y)=(42n+39,17n+15)$$ For $n=0$ one has the answer $\color{red}{x=39}$
