Find all positive integers $n$ such that equation $$3a^2-b^2=2018^n$$has a solution in integers $a$ and $b$.
Source: 2018 Belarusian National Olympiad 10.5
Tags: Diophantine equation, number theory
Find all positive integers $n$ such that equation $$3a^2-b^2=2018^n$$has a solution in integers $a$ and $b$.