Find all quadruples $(p, q, r, n)$ of prime numbers $p, q, r$ and positive integer numbers $n$, such that 
$$p^2 = q^2 + r^n$$

(Walther Janous)
To find all quadruples \((p, q, r, n)\) of prime numbers \(p, q, r\) and positive integer \(n\) such that 
\[ p^2 = q^2 + r^n, \]
we start by factorizing the equation.

1. **Factorize the equation:**
   \[ p^2 - q^2 = r^n \]
   \[ (p - q)(p + q) = r^n \]

2. **Assume \(p - q = r^a\) and \(p + q = r^b\) where \(a + b = n\) and \(a < b\):**
   \[ 2p = r^a (r^{b-a} + 1) \]

3. **Case 1: \(a \geq 1\):**
   Since \(r \mid 2p\), \(r\) must be either 2 or \(p\).

   - **Subcase 1: \(r = p\):**
     - If \(a = 1\), then:
       \[ 2 = r^{b-1} + 1 \implies r^{b-1} = 1 \implies b = 1 \]
       Hence, \(n = 2\). This gives:
       \[ p - q = r \quad \text{and} \quad p + q = r \]
       \[ 2q = 0 \implies q = 0 \]
       This is a contradiction since \(q\) must be a prime number.

     - If \(a = 2\), then:
       \[ r = p = 2 \]
       This is not true since \(r^{b-2} \neq 0\).

     - If \(a \geq 3\), then \(p\) is not a prime anymore, leading to a contradiction.

   - **Subcase 2: \(r = 2\):**
     - If \(a = 2\), then:
       \[ p = 2 \]
       This gives a contradiction since \(r^{b-2} \neq 0\).

     - If \(a = 1\), then:
       \[ p = 2^{n-2} + 1 \]
       \[ p - q = 2 \quad \text{and} \quad p + q = 2^{n-1} \]
       \[ q = 2^{n-2} - 1 \]

       - If \(n\) is even, let \(n = 2k\):
         \[ q = 2^{2k-2} - 1 \equiv (-1)^{2k} - 1 \equiv 0 \pmod{3} \implies q = 3 \]
         Thus, \(p = 5\) and hence \(n = 4\).

       - If \(n\) is odd, let \(n = 2k + 1\):
         \[ p = 2^{2k-1} + 1 \equiv (-1)^{2k+1} + 1 \equiv 0 \pmod{3} \implies p = 3 \]
         Thus, \(q = 1\), which is a contradiction since \(q\) must be a prime number.

     - If \(a = 0\), then:
       \[ 2p = 2^n + 1 \]
       This gives a contradiction by modulo 2.

4. **Case 2: \(a = 0\):**
   \[ p = q + 1 \]
   The only consecutive primes are 2 and 3, thus:
   \[ q = 2 \quad \text{and} \quad p = 3 \]
   This gives:
   \[ r^n = 5 \]
   Hence, \(n = 1\) and \(r = 5\).

Therefore, the solutions are:
\[ \boxed{(p, q, r, n) = (3, 2, 5, 1) \text{ and } (p, q, r, n) = (5, 3, 2, 4)} \]