$a_n=(2^n)−3 $ , how do we find which $a_n$ are divisible by 13? Or we can re write it as
for what all n is $2^n≡ 3\pmod{13}$ true.
$16≡ 3mod 13$ or $2^4≡ 3\pmod{13}$
$2^{4n}≡ 3^{n}\pmod{13}$ or
$2^{4n}≡ 3^{n}\bmod 13≡ 3\bmod13$ for which n
$3^n≡3\pmod n$ little Fermat little theorem , when n is prime.
You know that $2^4 \equiv 3 \pmod{13}.$
Suppose that $r$ is the smallest positive integer such that
$2^r \equiv 1 \pmod{13}.$
Then, once $r$ is determined, you know immediately that all solutions to $2^n \equiv 3 \pmod{13}$, will be represented by the following set:
$$n \in \{ ~4, ~4 + (1 \times r), ~4 + (2 \times r), ~4 + (3 \times r), \cdots\}.$$
So, the problem reduces to determining $r$.
From Fermat's Little Theorem, you know that $2^{12} \equiv 1 \pmod{13}.$
Therefore, $r$ must be a divisor of $12$.
However, $~2^6 \equiv -1 \pmod{13}~$ and $~2^4 \equiv 3 \pmod{13}.$
Therefore, $~r~$ must equal $12.$
Therefore, the answer to the problem is
$$n \in \{ ~4, ~4 + (1 \times 12), ~4 + (2 \times 12), ~4 + (3 \times 12), \cdots\}.$$