$7 \cdot 38$ On the blackboard, there are natural numbers:
$$
1,2,3, \cdots, n . \quad n \geqslant 3 \text {. }
$$

Each time, it is allowed to erase any two numbers $p$ and $q$, and replace them with $p+q$ and $|p-q|$. After several such rewrites, all the numbers on the blackboard become $k$.
What values can $k$ take?
(25th All-Soviet Union Mathematical Olympiad, 1991)
[Solution] Let $s$ be any natural number that satisfies the inequality $2^{s} \geqslant n$.
After each step, the numbers written on the blackboard are non-negative integers.
If the sum and difference of two non-negative integers are multiples of some odd number $d$, then these two numbers themselves are also multiples of $d$.

Therefore, if the number $k$ is a multiple of an odd number $d (d>1)$, then the numbers initially written on the blackboard should also be multiples of the odd number $d$, which is impossible. Because initially there is 1, and 1 is not a multiple of $d (d>1)$.
Therefore, $k$ cannot have any odd prime factors, i.e., $k=2^{s}$.
Since after each step, the maximum number on the blackboard does not decrease, thus $k \geqslant n$.
Below we prove that $k$ can be any $2^{s}$ not less than $n$.
By the problem statement, we can obtain the pair $\left(0,2^{a+1}\right)$ from the pair $\left(2^{a}, 2^{a}\right)$, and we can also obtain the pair $\left(2^{c}, 2^{c}\right)$ from the pair $\left(0,2^{c}\right)$.

Therefore, if a set of numbers composed of powers of 2 is written on the blackboard, and their exponents do not exceed $s_{0}$, and there are two equal numbers less than $2^{s_{0}}$, then after a few steps, all the numbers can be transformed into $2^{s_{0}}$.

Below we use mathematical induction to prove: Starting from the array $1,2, \cdots, n$, according to the transformation rules given in the problem, we can always obtain an array composed entirely of powers of 2.
(1) When $n=3$, from $1,2,3$ we can get $(1,2,3) \rightarrow(4,2,2) \rightarrow(4,4,0) \rightarrow(8,0,0) \rightarrow(8,8,0) \rightarrow(8,8,8)$.
(Or from $(4,4,0) \rightarrow(4,4,4)$ ).
(2) Assume the conclusion holds for all $n$ such that $3 \leqslant n \leqslant m$. We now prove that the conclusion holds for $n=m+1$.
If $m+1 \leqslant 8$, it can be directly verified.
Now let $m+1=2^{t}+b$, where $1 \leqslant b \leqslant 2^{t}, \quad t \geqslant 3$.
We perform the required transformation on $p=2^{t}-u, q=2^{t}-u$, where $1 \leqslant u \leqslant b$, (when $b=2^{t}$, $1 \leqslant u \leqslant b-1$).
This can result in an array composed of the following three parts:
First group: $\left\{1,2, \cdots, 2^{t}-b-1\right\}$. When $b=2^{t}$ and $b=2^{t}-1$, this group does not exist;
Second group: $\{2,4, \cdots, 2 b\}$ (derived from the difference $\mid p-q$ |);
Third group: $\left\{2^{t}, 2^{t+1}, \cdots, 2^{t+1}\right\}$ (derived from the sum $p+q$ and $2^{t}$).
If the first group and the second group each have at least 3 numbers $\left(3 \leqslant b \leqslant 2^{t}-4\right)$, then we can use the induction hypothesis for each.
If only one of these groups has at least 3 numbers, then we can use the induction hypothesis for that group, and the other two groups must all be powers of 2.
If the numbers in the first group and the second group are both less than 3, then it is impossible to have $t \geqslant 3$, because in this case, by
$$
\left\{\begin{array}{l}
2^{t}-b-1 \leqslant 2 \\
2 b \leqslant 4
\end{array}\right.
$$

we can get
$$
2^{t} \leqslant 5, \quad t<3 .
$$

Thus, by mathematical induction, we have proved that $1,2, \cdots, n$ can be transformed into an array composed entirely of powers of 2 according to the transformation rules given in the problem.
Therefore, $k$ can take any $2^{s}$ not less than $n$.