Determine all positive integers $k$ and $n$ satisfying the equation

$$k^2 - 2016 = 3^n$$

(Stephan Wagner)

To determine all positive integers \( k \) and \( n \) satisfying the equation 
\[ k^2 - 2016 = 3^n, \]
we proceed as follows:

1. **Check divisibility by 3:**
   Since \( 2016 \equiv 0 \pmod{3} \) and \( 3^n \equiv 0 \pmod{3} \) for \( n \geq 1 \), it follows that \( k^2 \equiv 0 \pmod{3} \). Therefore, \( k \) must be divisible by 3. Let \( k = 3k_1 \) for some integer \( k_1 \).

2. **Substitute \( k = 3k_1 \) into the equation:**
   \[
   (3k_1)^2 - 2016 = 3^n \implies 9k_1^2 - 2016 = 3^n.
   \]
   Dividing the entire equation by 3, we get:
   \[
   3k_1^2 - 672 = 3^{n-1}.
   \]
   Dividing by 3 again, we obtain:
   \[
   k_1^2 - 224 = 3^{n-2}.
   \]

3. **Analyze the parity of \( n-2 \):**
   Since \( k_1^2 \equiv 0, 1 \pmod{4} \) and \( 224 \equiv 0 \pmod{4} \), it follows that \( k_1^2 - 224 \equiv 0, 1 \pmod{4} \). Therefore, \( 3^{n-2} \equiv 0, 1 \pmod{4} \). This implies that \( n-2 \) must be even because \( 3^m \equiv 3 \pmod{4} \) for odd \( m \) and \( 3^m \equiv 1 \pmod{4} \) for even \( m \). Let \( n-2 = 2m \) for some integer \( m \).

4. **Rewrite the equation:**
   \[
   k_1^2 - 224 = 3^{2m}.
   \]
   This can be factored as:
   \[
   (k_1 - 3^m)(k_1 + 3^m) = 224.
   \]

5. **List all factor pairs of 224:**
   The factor pairs of 224 are:
   \[
   (1, 224), (2, 112), (4, 56), (7, 32), (8, 28), (14, 16).
   \]
   We need to check which pairs satisfy the equation \( (k_1 - 3^m)(k_1 + 3^m) = 224 \).

6. **Check each factor pair:**
   - For \( (1, 224) \):
     \[
     k_1 - 3^m = 1 \quad \text{and} \quad k_1 + 3^m = 224.
     \]
     Adding these equations, we get:
     \[
     2k_1 = 225 \implies k_1 = 112.5 \quad (\text{not an integer}).
     \]
   - For \( (2, 112) \):
     \[
     k_1 - 3^m = 2 \quad \text{and} \quad k_1 + 3^m = 112.
     \]
     Adding these equations, we get:
     \[
     2k_1 = 114 \implies k_1 = 57 \quad (\text{not an integer}).
     \]
   - For \( (4, 56) \):
     \[
     k_1 - 3^m = 4 \quad \text{and} \quad k_1 + 3^m = 56.
     \]
     Adding these equations, we get:
     \[
     2k_1 = 60 \implies k_1 = 30 \quad (\text{not an integer}).
     \]
   - For \( (7, 32) \):
     \[
     k_1 - 3^m = 7 \quad \text{and} \quad k_1 + 3^m = 32.
     \]
     Adding these equations, we get:
     \[
     2k_1 = 39 \implies k_1 = 19.5 \quad (\text{not an integer}).
     \]
   - For \( (8, 28) \):
     \[
     k_1 - 3^m = 8 \quad \text{and} \quad k_1 + 3^m = 28.
     \]
     Adding these equations, we get:
     \[
     2k_1 = 36 \implies k_1 = 18 \quad (\text{not an integer}).
     \]
   - For \( (14, 16) \):
     \[
     k_1 - 3^m = 14 \quad \text{and} \quad k_1 + 3^m = 16.
     \]
     Adding these equations, we get:
     \[
     2k_1 = 30 \implies k_1 = 15.
     \]
     Subtracting these equations, we get:
     \[
     2 \cdot 3^m = 2 \implies 3^m = 1 \implies m = 0.
     \]
     Therefore, \( k_1 = 15 \) and \( m = 0 \).

7. **Find \( k \) and \( n \):**
   Since \( k_1 = 15 \) and \( m = 0 \), we have:
   \[
   k = 3k_1 = 3 \cdot 15 = 45,
   \]
   and
   \[
   n = 2m + 2 = 2 \cdot 0 + 2 = 2.
   \]

Thus, the only solution is \( k = 45 \) and \( n = 2 \).

The final answer is \( \boxed{ k = 45 } \) and \( n = 2 \).