Can the integers $n$ expressible as $2a^2-3b^2$ be classified? Let $S$ be the set of integers $n$ that are expressible with $$n=2a^2-3b^2$$ with integers $a,b$

Can $S$ be classified by an iff-condition that allows to decide whether $n\in S$ , when the factorization of $n$ is known ?

I found out several partial results, but I could not find a final structure.
What I found out :


*

*The residues $1$ and $3$ modulo $8$ are impossible as well as the residue $1$ modulo $3$

*A prime $p\ge 5$ can only be in $S$, when $p\equiv 5\mod 24$ or $p\equiv 23\mod 24$

*$n\in S$ if and only if the pell-like equation $$c^2-6b^2=2n$$ has an integer solution

*A non-zero perfect square (including $1$) cannot be in $S$


Looking at the impossible residues modulo $2^k$, it seems that for $k\ge 3$ there are $2^{k-1}-2$ impossible residues, so with every additional factor $2$, $2$ new impossible residues occur. Is this true, and if, why ? Also, the residue $3^k$ modulo $3^{k+1}$ seems to be impossible. Again, is this true, and if , why ?

The integer solutions of $2 x^2 - 3 y^2 = n$ are invariant under the mapping
$(x,y) \to (5x+6y, 4x+5y)$.  Thus if there is an integer solution, there must be one with $\sqrt{n/2} \le x \le 5 \sqrt{n/2}$ (if $n > 0$), or $\sqrt{-n/3} \le y \le 6 \sqrt{-n/3}$ (if $n < 0$).
