Determine all functions $f : \mathbb{R} \to \mathbb{R}$ that satisfy the following two properties.
(i) The Riemann integral $\int_a^b f(t) \mathrm dt$ exists for all real numbers $a < b$.
(ii) For every real number $x$ and every integer $n \ge 1$ we have
\[ f(x) = \frac{n}{2} \int_{x-\frac{1}{n}}^{x+\frac{1}{n}} f(t) \mathrm dt. \]
1. **Initial Assumptions and Properties**:
   - Given that \( f \) is Riemann integrable on any finite interval, it implies that \( f \) is bounded on any finite interval.
   - From property (ii) with \( n = 1 \), we have:
     \[
     f(x) = \frac{1}{2} \int_{x-1}^{x+1} f(t) \, dt
     \]
     This implies that \( f \) is continuous because the right-hand side is a continuous function of \( x \).

2. **Subspace of Continuous Functions**:
   - The set of functions satisfying the two properties forms a subvector space of the space of all continuous functions.
   - It is clear that all linear functions belong to this subspace. We will show that there is no other function.

3. **Reduction to Zero at Specific Points**:
   - Let \( f \) satisfy the two properties. By adding a linear function to \( f \), we may assume that \( f(0) = f(1) = 0 \). It suffices to show that \( f = 0 \).

4. **Lemma**:
   - **Statement**: If \( f(a) = f(b) = 0 \) for some \( a < b \), then \( f(x) = 0 \) for all \( x \in [a, b] \).
   - **Proof**:
     - Suppose this is not the case. Since \( f \) is continuous, we may assume without loss of generality that \( m = \max\{f(x) : x \in [a, b]\} \) is strictly positive.
     - Consider the set \( C = \{x \in [a, b] : f(x) = m\} \). This is a nonempty closed subset of \( \mathbb{R} \).
     - For any \( c \in C \), we must have \( c \in (a, b) \) and hence there exists \( n \) such that \( [c - \frac{1}{n}, c + \frac{1}{n}] \subseteq [a, b] \).
     - We have:
       \[
       m = f(c) = \frac{n}{2} \int_{c - \frac{1}{n}}^{c + \frac{1}{n}} f(t) \, dt
       \]
       and also \( m \geq f(t) \) for all \( t \in [c - \frac{1}{n}, c + \frac{1}{n}] \). These imply that \( f(x) = m \) for all \( x \in (c - \frac{1}{n}, c + \frac{1}{n}) \).
     - We have shown that, for any \( c \in C \), there exists an open interval \( I \) such that \( c \in I \subseteq C \). This means that \( C \) is an open subset of \( \mathbb{R} \).
     - Therefore, \( C \) is both open and closed, which is impossible, as \( \mathbb{R} \) is connected.
     - Hence, \( f(x) = 0 \) for all \( x \in [a, b] \).

5. **Application of Lemma**:
   - Since \( f(0) = f(1) = 0 \), the Lemma implies that \( f(x) = 0 \) for all \( x \in [0, 1] \).
   - This means that the set \( B = \{z : f(x) = 0, \forall 0 \leq x \leq z\} \) is nonempty. Let \( b \) denote the supremum of the set \( B \). We want to show that \( b = \infty \).

6. **Proof by Contradiction**:
   - Suppose \( b \neq \infty \). Then we have \( f(x) = 0 \) for all \( 0 \leq x \leq b \).
   - By condition (ii) applied with \( n = 1 \), we have:
     \[
     0 = f(b) = \frac{1}{2} \int_{b - 1}^{b + 1} f(t) \, dt = \frac{1}{2} \int_b^{b + 1} f(t) \, dt
     \]
     - Since \( f \) is continuous, this implies that \( f(c) = 0 \) for some \( c \in (b, b+1) \).
     - Then the Lemma tells us that \( f(x) = 0 \) for all \( x \in [b, c] \). This leads to \( c \in B \), contradicting the assumption that \( b = \sup B \).
     - Therefore, we have \( \sup B = \infty \), i.e., \( f(x) = 0 \) for all \( x \geq 0 \).

7. **Symmetric Argument**:
   - The same argument, by considering \( A = \{z : f(x) = 0, \forall z \leq x \leq 1\} \) and \( a = \inf A \), shows that \( f(x) = 0 \) for all \( x \leq 1 \).
   - Thus, we have proved \( f = 0 \).

Conclusion:
- In conclusion, all functions satisfying the two properties are the linear functions.

The final answer is \( \boxed{ f(x) = 0 } \).