Find all square-free integers $d$ for which there exist positive integers $x, y$ and $n$ satisfying
$x^2+dy^2=2^n$
Submitted by Kada Williams, Cambridge
To find all square-free integers \( d \) for which there exist positive integers \( x, y \), and \( n \) satisfying \( x^2 + dy^2 = 2^n \), we will consider both the cases where \( d \) is positive and where \( d \) is negative.

### Case 1: \( d \) is positive
1. Consider the equation \( x^2 + dy^2 = 2^n \).
2. If \( 2 \) is a composite number in \( \mathbb{Z}[\sqrt{-d}] \), then we can write:
   \[
   2 = (x + \sqrt{-d}y)(z + \sqrt{-d}t)
   \]
   Expanding and equating real and imaginary parts, we get:
   \[
   2 = xz - dyt + \sqrt{-d}(yz + xt)
   \]
   This gives us two equations:
   \[
   yz + xt = 0 \quad \text{(1)}
   \]
   \[
   xz - dyt = 2 \quad \text{(2)}
   \]
3. From equation (1), we have \( yz + xt = 0 \), which implies \( t = -\frac{yz}{x} \).
4. Substituting \( t \) in equation (2), we get:
   \[
   xz - dy\left(-\frac{yz}{x}\right) = 2
   \]
   Simplifying, we get:
   \[
   xz + \frac{dy^2z}{x} = 2
   \]
   Multiplying through by \( x \), we get:
   \[
   x^2z + dy^2z = 2x
   \]
   \[
   z(x^2 + dy^2) = 2x
   \]
   Since \( x^2 + dy^2 = 2^n \), we have:
   \[
   z \cdot 2^n = 2x
   \]
   \[
   z = \frac{2x}{2^n}
   \]
   For \( z \) to be an integer, \( 2^n \) must divide \( 2x \). This implies \( x = 1 \) and \( n = 1 \), giving \( z = 1 \).

5. Therefore, \( d = 1 \) and \( x = y = \pm 1 \). This means \( d = 1 \) is a solution.

### Case 2: \( d \) is negative
1. Consider the equation \( x^2 + dy^2 = 2^n \).
2. If \( 2 \) is a composite number in \( \mathbb{Z}[\sqrt{-d}] \), then we can write:
   \[
   2 = (x + \sqrt{-d}y)(z + \sqrt{-d}t)
   \]
   Expanding and equating real and imaginary parts, we get:
   \[
   2 = xz - dyt + \sqrt{-d}(yz + xt)
   \]
   This gives us two equations:
   \[
   yz + xt = 0 \quad \text{(1)}
   \]
   \[
   xz - dyt = 2 \quad \text{(2)}
   \]
3. From equation (1), we have \( yz + xt = 0 \), which implies \( t = -\frac{yz}{x} \).
4. Substituting \( t \) in equation (2), we get:
   \[
   xz - dy\left(-\frac{yz}{x}\right) = 2
   \]
   Simplifying, we get:
   \[
   xz + \frac{dy^2z}{x} = 2
   \]
   Multiplying through by \( x \), we get:
   \[
   x^2z + dy^2z = 2x
   \]
   \[
   z(x^2 + dy^2) = 2x
   \]
   Since \( x^2 + dy^2 = 2^n \), we have:
   \[
   z \cdot 2^n = 2x
   \]
   \[
   z = \frac{2x}{2^n}
   \]
   For \( z \) to be an integer, \( 2^n \) must divide \( 2x \). This implies \( x = 1 \) and \( n = 1 \), giving \( z = 1 \).

5. Therefore, \( d = -1 \) and \( x = y = \pm 1 \). This means \( d = -1 \) is a solution.

### Conclusion
The only square-free integers \( d \) for which there exist positive integers \( x, y \), and \( n \) satisfying \( x^2 + dy^2 = 2^n \) are \( d = 1 \) and \( d = -1 \).

The final answer is \( \boxed{ d = 1 } \) and \( d = -1 \).