Let h denote the class number of the quadratic field ℚ(−A) for a square free odd integer A>1,
and suppose that n>2 is an odd integer with (n,h)=1 and m>1. In this paper, it is proved that the equation of the title
has no solution in positive integers x and y if n has any
prime factor congruent to 1 modulo 4. If n has no such factor it is proved that there exists at most one solution with x and y odd. The case n=3 is solved completely. A result of E.
Brown for A=3 is improved and generalized to the case where A is a prime ≢7(mod8)
.