Prove that there are no integers $a$ and $b$ such that $a^2-3b^2 = -1$.
I got a hint to use prime factorization, so I rearrange the equation to be $a^2 = 3b^2-1$ and set $a$ to be $a= p_1p_2\cdots p_n$ and $b$ to be $b=t_1 t_2\cdots t_m$.
I saw a similar question online where they concluded that there are $2n$ primes on the left side of the equation and $2t+1$ primes on the right, and since euclid's fundamental theorem states there is only one factorization, then we cannot have even=odd, hence the proof is concluded.
But I do not understand how it was concluded that there are $2n$ and $2t+1$ primes on either side of the equation?
I think this is what we can do $$n^2 \equiv 0,1 \pmod 3$$For all $n$. But $$a^2=3b^2-1 \equiv -1 \pmod {3}$$ Contradiction, as a square number can only be $0$ or $1$ modulo $3$.