The number $1$ is written on the blackboard. After that a sequence of numbers is created as follows: at each step each number $a$ on the blackboard is replaced by the numbers $a - 1$ and $a + 1$; if the number $0$ occurs, it is erased immediately; if a number occurs more than once, all its occurrences are left on the blackboard. Thus the blackboard will show $1$ after $0$ steps; $2$ after $1$ step; $1, 3$ after $2$ steps; $2, 2, 4$ after $3$ steps, and so on. How many numbers will there be on the blackboard after $n$ steps?
1. **Initial Setup and Sequence Generation:**
   - We start with the number \(1\) on the blackboard.
   - At each step, each number \(a\) on the blackboard is replaced by \(a-1\) and \(a+1\).
   - If \(0\) occurs, it is erased immediately.
   - If a number occurs more than once, all its occurrences are left on the blackboard.

2. **Pattern Observation:**
   - After \(0\) steps: \(1\)
   - After \(1\) step: \(2\)
   - After \(2\) steps: \(1, 3\)
   - After \(3\) steps: \(2, 2, 4\)
   - We observe that:
     - An even row \(r\) consists of copies of the odd numbers \(1, 3, \ldots, r+1\).
     - An odd row \(r\) consists of copies of the even numbers \(2, 4, \ldots, r+1\).
     - The number \(r+1\) occurs exactly once in row \(r\).

3. **Inductive Step for Even Rows:**
   - Consider an even row \(r = 2n\).
   - It can be shown by induction that this row \(2n\) contains exactly \(\frac{2k+1}{n+k+1} \binom{2n}{n+k}\) copies of any odd integer \(2k+1\) with \(0 \le k \le n\).
   - This is because:
     - Every copy of \(2k-1\) in row \(2n-2\) generates one copy of \(2k+1\) in row \(2n\).
     - Every copy of \(2k+1\) in row \(2n-2\) generates two copies of \(2k+1\) in row \(2n\).
     - Every copy of \(2k+3\) in row \(2n-2\) generates one copy of \(2k+1\) in row \(2n\).

4. **Special Case for Integer 1:**
   - In particular, row \(r = 2n\) contains exactly \(\frac{1}{n+1} \binom{2n}{n}\) copies of the integer \(1\).

5. **Total Number of Integers in Row \(r\):**
   - Let \(f(r)\) denote the total number of integers in row \(r\).
   - We claim that \(f(2n) = \binom{2n}{n}\) and \(f(2n-1) = \frac{1}{2} \binom{2n}{n}\).
   - The proof is by induction on \(n\), and \(f(0) = f(1) = 1\) are clear.

6. **Inductive Proof:**
   - For the inductive step:
     - Every (even) integer in an odd row \(2n-1\) spawns off two integers in row \(2n\); hence \(f(2n) = 2f(2n-1)\).
     - Every (odd) integer in an even row \(2n\) spawns off two integers in row \(2n+1\), but the \(\frac{1}{n+1} \binom{2n}{n}\) zeroes generated by the copies of \(1\) are erased again. Hence:
       \[
       f(2n+1) = 2f(2n) - \frac{1}{n+1} \binom{2n}{n} = \frac{1}{2} \binom{2n+2}{n+1}
       \]

The final answer is \(\boxed{\frac{1}{2} \binom{2n+2}{n+1}}\).