Given fundamental discriminant $d \equiv -1 \bmod 8$ such that the quadratic imaginary number field $\mathbb{Q}(\sqrt{-d})$ has ***odd*** [class number](http://mathworld.wolfram.com/ClassNumber.html) $h(-d)$. Is it true that one can always solve the diophantine equation,


$$x^2+dy^2 = 2^{2+h(-d)}\tag{1}$$


with ***odd*** integers $x,y$? 


For example, one can indeed solve,


$$x^2+7y^2 = 2^3$$


$$x^2+23y^2 = 2^5$$


$$x^2+47y^2 = 2^7$$


$$x^2+71y^2 = 2^9$$


which have $d$ with $h(-d) = 1,3,5,7$, respectively, and it is solvable for all such $d$ with $h(-d) \leq 25$ in the link given above (I tested them all), but it would be nice to know if it is true in general.



On class numbers $h(-d)$ and the diophantine equation $x^2+dy^2 = 2^{2+h(-d)}$
Because $d=-1\pmod{8}$, $2$ splits in $K=\mathbb{Q}(\sqrt{-d})$. Let $\mathfrak{p}$ be a prime above $2$. Then $\mathfrak{p}^{h(-d)}$ is principal and has norm $2^{h(-d)}$. Let $z=x+\frac{1+\sqrt{-d}}{2}y$ be a generator, so $z$ has norm $2^{h(-d)}$. But this can be rewritten as $(2x+y)^2+dy^2 = 4\cdot 2^{h(-d)}$. Since $d$ is odd, $2x+y$ and $y$ are both odd unless $2$ divides $z$. But if it were so, $(2)$ would divide $\mathfrak{p}^{h(-d)}$ so $\bar{\mathfrak{p}}$ would divide $\mathfrak{p}^{h(-d)}$, which it does not (uniqueness of factorization).


