Given an integer $a$, show that there is a square-free integer $ N > 1$ and an integer $b$ such that $a^2 - Nb^2 = 1$.
I'm not too sure how to go about proving this. I believe I'm supposed to use the fact that $a^2 - 1$ is not a square. I also understand that $a^2 - Nb^2 = 1$ can be factored into $(a+\sqrt Nb)(a-\sqrt Nb) = 1$, but I'm not sure how to go from here to proving that the solution exists.
If $a^2-1$ is square free, then take $N = a^2-1$ and $b = 1.$ If not, then you have: $$a^2-1 = \prod_{i=1}^np_i^{\alpha_i}\cdot \prod_{k=1}^mq_k$$ where $p_i,q_k$ are all prime numbers and $\alpha_i\geq 2.$ Now you just have to shift one $p_i$ from the first product to the second product whenever $\alpha_i$ is odd and then you have your factorization $a^2-1 = b^2N.$