If the real numbers $x, y, z$ are such that $x^2 + 4y^2 + 16z^2 = 48$ and $xy + 4yz + 2zx = 24$, what is the value of $x^2 + y^2 + z^2$?
1. Given the equations:
   \[
   x^2 + 4y^2 + 16z^2 = 48
   \]
   and
   \[
   xy + 4yz + 2zx = 24
   \]

2. We can rewrite the first equation as:
   \[
   x^2 + (2y)^2 + (4z)^2 = 48
   \]

3. Notice that the second equation can be rewritten as:
   \[
   xy + 4yz + 2zx = x(2y) + (2y)(4z) + (4z)x
   \]

4. We recognize that the right-hand side of the second equation can be expressed as a sum of squares:
   \[
   x(2y) + (2y)(4z) + (4z)x = \frac{1}{2} \left( (x - 2y)^2 + (2y - 4z)^2 + (4z - x)^2 \right)
   \]

5. Given that the sum of these squares equals zero:
   \[
   (x - 2y)^2 + (2y - 4z)^2 + (4z - x)^2 = 0
   \]

6. Since the sum of squares is zero, each individual square must be zero:
   \[
   x - 2y = 0 \implies x = 2y
   \]
   \[
   2y - 4z = 0 \implies 2y = 4z \implies y = 2z
   \]
   \[
   4z - x = 0 \implies 4z = x
   \]

7. From the above, we have:
   \[
   x = 4z \quad \text{and} \quad y = 2z
   \]

8. Substitute \( x = 4z \) and \( y = 2z \) into the first equation:
   \[
   (4z)^2 + 4(2z)^2 + 16z^2 = 48
   \]
   \[
   16z^2 + 4 \cdot 4z^2 + 16z^2 = 48
   \]
   \[
   16z^2 + 16z^2 + 16z^2 = 48
   \]
   \[
   48z^2 = 48
   \]
   \[
   z^2 = 1 \implies z = \pm 1
   \]

9. Using \( z = 1 \):
   \[
   y = 2z = 2 \quad \text{and} \quad x = 4z = 4
   \]

10. Calculate \( x^2 + y^2 + z^2 \):
    \[
    x^2 + y^2 + z^2 = 4^2 + 2^2 + 1^2 = 16 + 4 + 1 = 21
    \]

The final answer is \(\boxed{21}\)