Which primepowers can divide $3^k-2$? I tried to get a survey which primepowers $p^n$ divide $3^k-2$ 
for some natural k.
PARI has a function znlog, but there are some issues :
Instead of returning 0, if the discrete logarithm does not exist, 
an error occurs. So I cannot filter out, for which primes $3^n\equiv2\ (mod\ p)$ 
has a solution. znlog(2,Mod(3,11)) returns the wrong solution 7, if the
order is omitted and returns an error again, if it is added.
Of course, I can use brute force to filter out the primes, but I
would like to have a better method. This leads to my question :
How can I find out efficiently for which prime powers $p^n$ the equation 
$3^k \equiv 2\ (mod\ p^n)$ has a solution (I need not know, if 
the solution is unique).
It seems that for arbitary high powers of 5 and 7, there is a solution.
If so, is there a simple explanation, why ?

To answer your last question:
It well known that if $a$ is a primitive root mod $p^2$ then $a$ is a primitive root mod $p^n$ for all $n\ge 2$.
$3$ is a primitive root mod $5^2$ and mod $7^2$. This explains why $3^k\equiv 2 \bmod p^n$ can be solved for $p=5$ and $p=7$ for all $n$. 
