Find all quadruples $(a, b, p, n)$ of positive integers, such that $p$ is a prime and
\[a^3 + b^3 = p^n\mbox{.}\]

[i](2nd Benelux Mathematical Olympiad 2010, Problem 4)[/i]
1. Let $\gcd(a, b) = d$. Since $d \mid p^n$, $d$ must be a power of $p$. Let $a = xp^k$ and $b = yp^k$ where $x$ and $y$ are natural numbers, $k$ is a non-negative integer, and $\gcd(x, y) = 1$. Substituting these into the original equation, we get:
   \[
   (xp^k)^3 + (yp^k)^3 = p^n \implies x^3 p^{3k} + y^3 p^{3k} = p^n
   \]
   Factoring out $p^{3k}$, we have:
   \[
   p^{3k}(x^3 + y^3) = p^n \implies x^3 + y^3 = p^{n-3k}
   \]
   Let $m = n - 3k$. Then we have:
   \[
   x^3 + y^3 = p^m
   \]
   where $m$ is a non-negative integer.

2. The equation $x^3 + y^3 = p^m$ is symmetric in $x$ and $y$, so without loss of generality, assume $x \leq y$. We can factor $x^3 + y^3$ as:
   \[
   x^3 + y^3 = (x + y)(x^2 - xy + y^2)
   \]
   Therefore, we have:
   \[
   (x + y)(x^2 - xy + y^2) = p^m
   \]

3. Since $\gcd(x, y) = 1$, it follows that $\gcd(x + y, x) = \gcd(x + y, y) = 1$. Thus, $\gcd(x + y, xy) = 1$. We also have:
   \[
   \gcd(x + y, x^2 - xy + y^2) = \gcd(x + y, 3xy)
   \]
   Therefore:
   \[
   \gcd(x + y, x^2 - xy + y^2) = \gcd(x + y, 3)
   \]

4. Consider two cases based on whether $3 \mid x + y$ or not.

   - **Case 1: $3 \nmid x + y$**

     Since $x + y$ and $x^2 - xy + y^2$ are coprime powers of $p$, and $x + y > 1$, it must be that:
     \[
     x^2 - xy + y^2 = 1
     \]
     This implies:
     \[
     0 \leq (x - y)^2 = 1 - xy \leq 0
     \]
     Therefore, $x - y = 0$, so $x = y = 1$ (since $x$ and $y$ are coprime). Substituting back, we get:
     \[
     p^m = 2 \implies p = 2 \text{ and } m = 1
     \]

   - **Case 2: $3 \mid x + y$**

     Then $3 \mid x^2 - xy + y^2$, and $p = 3$. Let:
     \[
     \frac{x + y}{3} = a \quad \text{and} \quad \frac{x^2 - xy + y^2}{3} = b
     \]
     where $a$ and $b$ are coprime powers of $3$. Thus, either $a = 1$ or $b = 1$.

     - If $a = 1$, then:
       \[
       x + y = 3
       \]
       Since $x \leq y$ and $\gcd(x, y) = 1$, the only solution is $x = 1$ and $y = 2$. Substituting back, we get:
       \[
       p^m = 3^2 \implies m = 2
       \]

     - If $b = 1$, then:
       \[
       x^2 - xy + y^2 = 3
       \]
       This implies:
       \[
       (x - y)^2 = 3 - xy
       \]
       Since $xy = 2$ (otherwise $x = y$), we get $x = 1$ and $y = 2$. Substituting back, we get:
       \[
       p^m = 3^2 \implies m = 2
       \]

5. Therefore, the solutions are:
   \[
   (x, y, p, m) = (1, 1, 2, 1), (1, 2, 3, 2), (2, 1, 3, 2)
   \]
   Transforming back to the original variables, we get:
   \[
   (a, b, p, n) = (2^k, 2^k, 2, 3k + 1), (3^k, 2 \cdot 3^k, 3, 3k + 2), (2 \cdot 3^k, 3^k, 3, 3k + 2)
   \]
   where $k$ is a non-negative integer.

The final answer is $\boxed{(2^k, 2^k, 2, 3k + 1), (3^k, 2 \cdot 3^k, 3, 3k + 2), (2 \cdot 3^k, 3^k, 3, 3k + 2)}$