Let m denote a positive nonsquare integer. It is shown that if Pell's equation X2 - mY2 = -1 is solvable in integers X and Y then the equation X2 - mY2 = -4 is solvable in coprime integers X and Y if and only if l(√m) ≡ l( 1 2(1+√m)) (mod 4), where l(α) denotes the length of the period of the continued fraction expansion of the quadratic irrational α.

Additional Metadata
Persistent URL dx.doi.org/10.1016/0022-314X(86)90087-9
Journal Journal of Number Theory
Kaplan, P. (Pierre), & Williams, K.S. (1986). Pell's equations X2 - mY2 = -1, -4 and continued fractions. Journal of Number Theory, 23(2), 169–182. doi:10.1016/0022-314X(86)90087-9