If n is a power of 3, then n is in the form 3^k for some natural k. Now, if n -1 is five times a power of two, then it is in the form 5\cdot 2^m. So, we have:
n = (n - 1) + 1
3^k = 5 \cdot 2^m + 1
You know that 5\cdot 2^m is a multiple of 10, so the right side will have a "1" in it's units place. Of course, so must the left side. You can quickly convince yourself that for this to happen, k must be a multiple of 4, i.e. n must be a power of 81. So, we have:
81^h = 5 \cdot 2^m + 1
Where h = k/4 \in \mathbb{N}. Now, take the binomial expansion of the left side as follows:
81^h = 5 \cdot 2^m + 1
(80 + 1)^h = 5 \cdot 2^m + 1
\sum _{i = 0} ^h {h\choose i}80^i = 5 \cdot 2^m + 1
\sum _{i = 1} ^h {h\choose i}80^i = 5 \cdot 2^m
16 \sum _{i = 1} ^h {h\choose i}80^{i - 1} = 2^m
\sum _{i = 1} ^h {h\choose i}80^{i - 1} = 2^{m-4}
Now, I did this quickly, so you have to consider the case when h = 0, or m < 4, or things like that, but I'll leave that to you. Now, it's really a simple matter of finding the values of h for which the sums in the form \sum _{i = 1} ^h {h\choose i}80^{i - 1} are multiples of 2. Now, that means you have to find the h for which the following is even:
{h\choose 1} + {h\choose 2}80 + {h\choose 3}80^2 + \dots + {h\choose h}80^{h - 1}
But you know that all the terms except the first are necessarily even. So, the whole thing is even iff {h\choose 1} is even, which is obviously when h is even. So, all n that are even powers of 81 satisfy the conditions.