Prove that there do not exist positive integers $a$ and $n$ such that $a^2 + 3 = 3^n$.
I have tried writing the equation in another way: $a^2 = 3^n - 3 = 3(3^{n-1} -1)$ but that doesn't get me anywhere. Should I consider different cases such as $a$ and $n$ being odd, $a$ and $n$ being even, etc.?
First, you can notice that $a\equiv 0\mod 3$. That said, you now know that $a=3k$, meaning you need to prove that there do not exist positive integers $k$ and $n$ such that
$$9k^2 + 3 = 3^n$$
Or, dividing by $3$: $$3k^2 + 1 = 3^{n-1}$$
Can you do the final step?
EDIT:
You can also continue what you started:
$$a^2=3(3^{n-1} - 1)$$
From this equation, you can see that $a^2$ must be divisible by $3$, and because it is a perfect square, it must be divisible by $9$, which is impossible.