When checking whether if $9-\sqrt{17}$ in the ring $\{a+b\sqrt17: a,b \in \mathbb{Z}\}$ is a prime. Suppose $$\alpha\cdot \beta = 9-\sqrt{17},$$ using norm argument $$N(\alpha)N(\beta) = N(9-\sqrt{17}) = -8.$$ If say $N(\alpha) = N(a+b\sqrt17) = a^2 - 17b^2$, I need to know if there exist integer solutions for $a^2 - 17b^2= 2$ or $a^2 - 17b^2 = 4$. So in general, how can I check if there exist integer solutions of $a^2 -17b^2 = $ any constant?
Thank you very much!
Let the "any constant" be $\mu$, $\mu \geq 0$. Then $a^{2} - 17 \, b^{2} = \mu$ becomes $$x^{2} - 17 \, y^{2} = 1 \tag{1}$$ where $a = \sqrt{\mu} \, x$ and $b = \sqrt{\mu} \, y$. Equation (1) is a Pell equation, see Pell Equations, and has solutions \begin{align} x_{n} &= \frac{1}{2} \, \left[ (33+8 \, \sqrt{17})^{n} + (33 - 8 \, \sqrt{17})^{n} \right] \\ y_{n} &= \frac{1}{2 \, \sqrt{17}} \, \left[ (33+8 \, \sqrt{17})^{n} - (33 - 8 \, \sqrt{17})^{n} \right] \end{align} and in terms of $(a,b)$ the result becomes \begin{align} a_{n} &= \frac{\sqrt{\mu}}{2} \, \left[ (33+8 \, \sqrt{17})^{n} + (33 - 8 \, \sqrt{17})^{n} \right] \\ b_{n} &= \frac{\sqrt{\mu}}{2 \, \sqrt{17}} \, \left[ (33+8 \, \sqrt{17})^{n} - (33 - 8 \, \sqrt{17})^{n} \right] \end{align} for $n\geq 0$. For the case of negative "any constant" a similar path may be taken.