1.204 $a_{1}, a_{2}, \cdots, a_{n}$ is a sequence, for each $k, 1 \leqslant k \leqslant n, a_{k} \in$ $\{0,1\}$. If $a_{k}, a_{k+1}$ are the same, let $b_{k}=0$; if $a_{k}, a_{k+1}$ are different, let $b_{k}$ $=1$, thus obtaining a new sequence $b_{1}, b_{2}, \cdots, b_{n-1}, b_{k} \in\{0,1\}$, where $k=1,2$, $\cdots, n-1$. Repeating this operation, a triangular number table composed entirely of the digits 0 and 1 is obtained, with the last row containing only one digit. Find the maximum value of the sum of 1s in this triangular number table composed of digits.
[Solution] Let $x_{n}$ denote the maximum value sought.
Obviously, $x_{1}=1, x_{2}=2$.
When $n=3$, the first row of the number table $a_{1}, a_{2}, a_{3}$ has only 8 possibilities, so the sum of 1s in these number tables is $3,4,4,4,3,3,3,0$. Therefore, we get
Now, we seek the relationship between $x_{n}$ and $x_{n+3}$.
Consider a triangular number table with $n+3$ rows, where the first three rows are

Divide the above $3 n+6$ numbers into $n+2$ triplets:
$\left\{a_{i}, b_{i}, c_{i}\right\}(i=1,2, \cdots, n+1) ;\left\{a_{n+2}, b_{n+2}, a_{n+3}\right\}$.
If a triplet $\left\{a_{k}, b_{k}, c_{k}\right\}$ contains at least one zero, it is called a zero-containing triplet. If a triplet $\left\{a_{k}, b_{k}, c_{k}\right\}$ is all 1s, where $k \leqslant n$, then $a_{k+1}=0, b_{k+1}=0$, so the two triplets $\left\{a_{k}, b_{k}, c_{k}\right\}$ and $\left\{a_{k+1}, b_{k+1}, c_{k+1}\right\}$ on average contain at least one zero, and are called average zero-containing triplets. If $\left\{a_{n+1}, b_{n+1}, c_{n+1}\right\}$ is all 1s, then $a_{n+2}=0, b_{n+2}=0$, so $\left\{a_{n+1}, b_{n+1}, c_{n+1}\right\}$ and $\left\{a_{n+2}, b_{n+2}, a_{n+3}\right\}$ are two average zero-containing triplets. If $\left\{a_{n+1}, b_{n+1}, c_{n+1}\right\}$ is a zero-containing triplet, then $\left\{a_{n+2}, b_{n+2}, c_{n+3}\right\}$ must also be a zero-containing triplet. Therefore, starting from the first triplet $\left\{a_{1}, b_{1}, c_{1}\right\}$, and considering the number of zeros in each triplet, from the above analysis, we know that among the $3 n+6$ numbers in the first three rows, there are at least $n+2$ zeros, thus at most $2 n+4$ ones, hence we get
$x_{n+3} \leqslant x_{n}+(2 n+4) \quad(n \in N)$.
In the above inequality, let $n=3(k-1), 3(k-2), \cdots, 6,3$ respectively, we get $x_{3 k} \leqslant x_{3(k-1)}+6(k-1)+4$,
$x_{3(k-1)} \leqslant x_{3(k-2)}+6(k-2)+4$,
$x_{9} \leqslant x_{6}+6 \cdot 2+4$,
$x_{6} \leqslant x_{3}+6 \cdot 1+4$.
Adding the $k-1$ inequalities obtained, and noting that $x_{3}=4$, we get
$x_{3 k} \leqslant 6[1+2+\cdots+(k-2)+(k-1)]+4 k$ $=k(3 k+1)$.
In (1), let $n=3 k-2,3 k-5, \cdots, 4,1$ respectively, we get
$x_{3 k+1} \leqslant x_{3 k-2}+6 k$
$x_{3 k-2} \leqslant x_{3 k-5}+6(k-1)$
$x_{7} \leqslant x_{4}+6 \cdot 2$
$x_{4} \leqslant x_{1}+6$
Adding the $k$ inequalities obtained, and noting that $x_{1}=1$, we get
$x_{3 k+1} \leqslant 6(1+2+\cdots+k)+1$
$=3 k(k+1)+1$
In (1), let $n=3 k-1,3 k-4, \cdots, 5,2$ respectively, we get
$x_{3 k+2} \leqslant x_{3 k-1}+6 k+2$,
$x_{3 k-1} \leqslant x_{3 k-4}+6(k-1)+2$,
$x_{8} \leqslant x_{5}+6 \cdot 2+2$,
$x_{5} \leqslant x_{2}+6 \cdot 1+2$.
Adding the $k$ inequalities obtained, and noting that $x_{2}=2$, we get
$$\begin{aligned}
x_{3 k+2} & \leqslant 6(1+2+\cdots+k)+2(k+1) \\
& =3 k(k+1)+2(k+1) \\
& =(k+1)(3 k+2) .
\end{aligned}$$

Combining (2), (3), and (4) into one formula, we get
$$x_{n} \leqslant\left[\frac{n(n+1)+1}{3}\right], n \in N$$

Here $\left[\frac{n(n+1)+1}{3}\right]$ represents the largest integer not exceeding $\frac{n(n+1)+1}{3}$ (obviously, (5) holds for $n=1,2,3$ as well).

The following example shows that the number on the right side of (5) can be achieved.
$\begin{array}{llllllll}0 & 1 & 1 & 0 & 1 & 1 & 0 & 1\end{array}$

We look at this example number table in reverse, considering every three rows as a group,
Let the $k$-th group be the $(3 k-2)$-th row from the bottom, the $(3 k-1)$-th row from the bottom, and the $(3 k)$-th row from the bottom, then, on the $(3 k-2)$-th row from the bottom, write "1,0,1" repeatedly; on the $(3 k-1)$-th row from the bottom, write "0,1,1" repeatedly; on the $(3 k)$-th row from the bottom, write "1,1,0" repeatedly, until the number of numbers to be written in each row is reached.

When $n=3 k$, the number of 1s in this number table is
$(1+1+2)+(3+3+4)+(5+5+6)+\cdots+[(2 k-1)+(2 k$
$+1)+2 k]$
$=2 k^{2}+k(k+1)=(3 k+1) k$.
When $n=3 k+1$, i.e., filling the first row (i.e., the $n$-th row from the bottom) in the above $n=3 k$ number table, this row is obtained by repeatedly writing "1,0,1", so the number of 1s in this row is $2 k$
+1, thus the number of 1s in the number table when $n=3 k+1$ is
$(3 k+1) k+2 k+1=3 k(k+1)+1$
When $n=3 k+2$, the first row of the number table is obtained by repeatedly writing "0,1,1", so the number of 1s in the first row is $2 k+1$, and the total number of 1s in the number table is
$[3 k(k+1)+1]+(2 k+1)=(k+1)(3 k+2)$.
In summary, we have provided an example of a number table that satisfies
$x_{n}=\left[\frac{n(n+1)+1}{3}\right] \quad n \in N$
Therefore, the maximum value sought is
$x_{n}=\left[\frac{n(n+1)+1}{3}\right], n \in N$