Solutions of $x^2 + 7y^2 = 2^n$ where $x$ and $y$ are odd numbers Is it true that for any $n\geq 2$ the equation $x^2 + 7y^2 = 2^n$ has a solution with $x$ and $y$ odd ??
 A: The values of $2(\frac 12 +\frac 12 \sqrt{-7})^{n-2}$ give $x+y\sqrt{-7}$, which are a solution to the equation $x^2+7y^2 = 2^n$, where $x$ and $y$ are always odd.  
These solutions are thence unique, because all representations of $x^2+7y^2$ reduce to a complex number $x+y\sqrt{-7}$, and that $\frac 12 \pm \frac 12 \sqrt{-7}$ is the unique primes of this form.  $2$ is the product of these numbers, and since it requires both primes to give an even value of $x$ and $y$, powers of a single prime must lead always to odd numbers.
A: for $n=3$, they are solutions ($x_1=1,y_1=1$).
If you have odd solutions $x_n$, $y_n$ for $2^n$, then
$$\left(\frac{7y_n-x_n}{2}\right)^2+7\left(\frac{x_n+y_n}{2}\right)^2=2x_n^ 2+14y_n^2=2(x_n^2+7y_n^2)=2^{n+1}$$
$$\left(\frac{7y_n+x_n}{2}\right)^2+7\left(\frac{x_n-y_n}{2}\right)^2=2x_n^ 2+14y_n^2=2(x_n^2+7y_n^2)=2^{n+1}$$
Hence $x_{n+1}=\frac{7y_n-x_n}{2}$ and $y_{n+1}=\frac{x_n+y_n}{2}$
or $x_{n+1}=\frac{7y_n+x_n}{2}$ and $y_{n+1}=\frac{x_n-y_n}{2}$
This is, in fact, the same answer as wendy.
Note that always one of the solution is odd and the other is even. Take the odd one !
A: The result is true for $n=3$, since $2^3=x^2+7y^2$ with $x=y=1$. Moreover, $x\equiv y\pmod{4}$.
We show that if there exist $x$ and $y$, odd, with $x\equiv y\pmod{4}$, such that $x^2+7y^2=1$, then there exist $x_1,y_1$, odd, with $x_1\equiv y_1\pmod{4}$,  such that $x_1^2+7y_1^2=2^{n+1}$. Let
$$x_1=\frac{x+7y}{2}\quad\text{and}\qquad y_1=\frac{x+y}{2}.$$
First note that $\frac{x+y}{2}$ and $\frac{x-7y}{2}$ are odd. For $\frac{x+y}{2}$, we use the fact that $x$ and $y$ are odd and $x\equiv y\pmod{4}$ to conclude $\frac{x+y}{2}$ is odd. The argument for $\frac{x-7y}{2}$ is similar. It is easy to verify that $x_1\equiv y_1\pmod{4}$. 
To show that $x_1,y_1$ work, we compute
$$\frac{(x-7y)^2}{4}+7\frac{(x+y)^2}{4}.$$
This simplifies to $2x^2+14y^2$, which is $2^{n+1}$. (We used a version of the Brahmagupta Identity.)
Remark: It is an artefact of the proof that the solutions involve negative integers. We can get positive solutions by taking the absolute value. 
A: Allow me to come back to this question, having discovered it only now. I have had difficulties to fill in the details of the existence/uniqueness solution given by @wendy krieger (see below). I agree with the answers given by @Xof and @André Nicolas, but they deal only with existence. Let me propose the following existence-uniqueness proof (which will perhaps be only a clarification of Wendy's): 
Call ($Eul_n$) the proposed equation. Of course Eul is for Euler, who solved it using trigonometric functions. Here we shall appeal as Wendy to the arithmetic of the UFD $R=\mathbf Z[\frac 12\sqrt {-7}]$, which is the ring of integers of the quadratic field $K=\mathbf Q(\sqrt {-7})$. The ramification of primes in R is known : the units of R are $±1$, all the primes of $\mathbf Z$ remain prime in R, except for 7 which is ramified, and $2$ which splits as $2=\pm π\bar π$, where $π=\frac {1+\sqrt{-7}}2$ and $\bar π=\frac {1-\sqrt{-7}}2$ . Thus, with $z:= \frac {x+y\sqrt{-7}}2, x,y\in\mathbf Z$, the equation ($Eul_n$) becomes ($E_n$) $z\bar z=(π\bar π)^{n+2}$ in $R$, and we want to show that, for every $n≥3$, ($E_n$) admits a "unique" solution in $R$ given by $z=\pi^{n+2}$ . What does uniqueness precisely mean ? To put it in a « high brow » language, introduce the  Vierergruppe $V_4=C_2×C_2$ and let it act on R in the following manner : the first $C_2$ permutes the units of R, the second is the complex conjugation; clearly $V_4$ will act on the solutions of ($E_n$), and "unique solution" will mean "unique orbit". For clarity, from now on, write $z_n=\frac {x_n+y_n\sqrt{-7}}2$ in ($E_n)$.
Existence of a solution. If I understand correctly, Wendy considers the particular solution $a+b\sqrt {-7}=2\pi^{n-2}$, but I can't see why $a,b$ should be odd. From ($Eul_n$), $a,b$ must have the same parity, and one could take out from $a,b$ the common power of $2$ , but then $n$ would be changed. Did I miss something? I think that the particular solution must be chosen more strictly in order to ensure the oddness of $x_n,y_n$. So take a particular solution $z_n=\pi^{n-2}$ of ($E_n$) with $x_n , y_n$ odd. Then $z_{n+1}:=z_n\pi=\pi^{n+3}$ is a solution of ($E_{n+1})$, and the recurrence formulas: $2x_{n+1}=x_n-7y_n , 2y_{n+1}=x_n +y_n$ immediately show that the oddness of $x_n, y_n$ propagates to $x_{n+1}, y_{n+1}$. Starting the recurrence from ($E_3$), which admits the obvious solution $(1,1)$, we have thus shown that ($E_n$) admits a solution for any $n≥3$. NB: Taking into account all the solutions composing an orbit, the recurrence formulas coincide with those of André and Xof. Actually, they had been used by E. Müller in an Olympiad problem, see Pagesfromproblem-solving-strategies-math-cs.blog.ir (3).pdf 
Uniqueness of the solution. Again I have difficulty to understand Wendy's argument because the UF property holds only in $R$. Did I miss something? I think an additional ingredient is needed, such as the following: Denote by $N$ the norm map of $K/\mathbf Q$, defined by $N(z)=z\bar z$. Suppose that ($E_n$) admits two solutions $z,z’ \in R$, so that $N(z'/z)=1$ and we can eliminate the common factors to get coprime $z,z’$. Since $K/\mathbf Q$ is a cyclic extension, Hilbert’s thm.90 tells us that any element of norm $1$ in $K^*$ can be written as $w /\bar w$ (this can also be checked « by hand » here), and we can clear out denominators to get $w\in R$, coprime with $\bar w$. It follows that $z' \bar w=zw $ in $R$, and the UFD property and the coprimary conditions give immediately $z'=\bar w$ and $z=w$, hence $z'=\bar z$ (up to units) ./.
