Let $p$ be a prime number. All natural numbers from $1$ to $p$ are written in a row in ascending order. Find all $p$ such that this sequence can be split into several blocks of consecutive numbers, such that every block has the same sum.

[i]A. Khrabov[/i]
1. **Identify the sum of the sequence from 1 to \( p \):**
   The sum of the first \( p \) natural numbers is given by the formula:
   \[
   \sum_{i=1}^p i = \frac{p(p+1)}{2}
   \]
   This sum must be divisible by the number of blocks \( b \) since each block has the same sum \( S \).

2. **Express the total sum in terms of blocks:**
   Let the number of blocks be \( b \) and the common sum of each block be \( S \). Then:
   \[
   bS = \frac{p(p+1)}{2}
   \]
   Since \( S \) must be an integer, \( \frac{p(p+1)}{2} \) must be divisible by \( b \).

3. **Analyze the divisibility condition:**
   Since \( b \) is a divisor of \( \frac{p(p+1)}{2} \), and \( b \) must be less than \( p \) (as \( 1 < b < p \)), we need to check the conditions under which \( \frac{p(p+1)}{2} \) can be split into equal parts.

4. **Consider the first block:**
   The first block of numbers must start from 1 and go up to some \( k \) where \( k < p \). The sum of the first \( k \) numbers is:
   \[
   \sum_{i=1}^k i = \frac{k(k+1)}{2}
   \]
   For this sum to be divisible by \( p \), we need:
   \[
   p \mid \frac{k(k+1)}{2}
   \]

5. **Determine \( k \) such that \( p \mid \frac{k(k+1)}{2} \):**
   Since \( k < p \), the only way \( p \) can divide \( \frac{k(k+1)}{2} \) is if \( k = p-1 \). This is because \( k+1 = p \) would make the sum:
   \[
   \frac{(p-1)p}{2}
   \]
   which is clearly divisible by \( p \).

6. **Check the remaining numbers:**
   If \( k = p-1 \), the first block is \( \{1, 2, \ldots, p-1\} \) and the sum is:
   \[
   \frac{(p-1)p}{2}
   \]
   The remaining number is \( p \), and we need:
   \[
   S = \frac{(p-1)p}{2} = p
   \]
   This implies:
   \[
   \frac{(p-1)p}{2} = p \implies (p-1)p = 2p \implies p-1 = 2 \implies p = 3
   \]

7. **Verify the construction for \( p = 3 \):**
   For \( p = 3 \), the sequence is \( \{1, 2, 3\} \). We can split it into blocks:
   \[
   \{1, 2\}, \{3\}
   \]
   The sum of the first block is \( 1 + 2 = 3 \) and the sum of the second block is \( 3 \), which are equal.

Thus, the only prime \( p \) that satisfies the condition is \( p = 3 \).

The final answer is \( \boxed{ p = 3 } \).