Let D ≡ 3(mod4) be a
positive square free integer greater than 3 which is not a multiple of the odd prime p.
If d is the order of a prime ideal divisor of (p) in the class group of the quadratic field
Q(), then in order for the diophantine equation x2+ D = pn to have a solution
in integers, it is necessary and sufficient that (−D∕p) = 1 and that either (i) 4pd−D
be a square and 3 pd− D = ±2 or (ii) pd− D be a square. Conditions which
guarantee the uniqueness of the solution are given. A linear recurrence is used in the
proof.