4. $n^{2}(n \geqslant 4)$ positive numbers are arranged in $n$ rows and $n$ columns:
$$
\begin{array}{llllll}
a_{11} & a_{12} & a_{13} & a_{14} & \cdots & a_{1 n} \\
a_{21} & a_{22} & a_{23} & a_{24} & \cdots & a_{2 n} \\
a_{31} & a_{32} & a_{33} & a_{34} & \cdots & a_{3 n} \\
\cdots & & & & & \\
a_{n 1} & a_{n 2} & a_{n 3} & a_{n 4} & \cdots & a_{n n}
\end{array}
$$

where the numbers in each row form an arithmetic sequence, and the numbers in each column form a geometric sequence, with all common ratios being equal. Given $a_{24}=1, a_{42}=\frac{1}{8}, a_{43}=\frac{3}{16}$. Find $a_{11}+a_{22}+\cdots+a_{m n}$.
(1990 National High School League Problem)
4. Since each row forms an arithmetic sequence, and $a_{42}=\frac{1}{8}, a_{43}=\frac{3}{16}$, the common difference of the fourth row is $\frac{1}{16}$, and $a_{4 k}=\frac{k}{16}$, $k=1,2,3,4, \cdots, n$. Given that each column forms a geometric sequence with the same common ratio, and using $a_{24}=1, a_{44}=\frac{1}{4}$, the common ratio is $\frac{1}{2}$. Therefore, $a_{k k}=\left(\frac{1}{2}\right)^{k-4} \cdot \frac{k}{16}, k=1,2, \cdots, n$. Thus, $\sum_{k=1}^{n} a_{k k}=\sum_{k=1}^{n} k\left(\frac{1}{2}\right)^{k}$. Let $S=\sum_{k=1}^{n} a_{k k}$, then $\frac{S}{2}=\sum_{k=1}^{n} k\left(\frac{1}{2}\right)^{k+1}=\sum_{k=2}^{n}(k-1)\left(\frac{1}{2}\right)^{k}+n\left(\frac{1}{2}\right)^{n+1}$, hence $\frac{S}{2}=S-\frac{S}{2}=\frac{1}{2}+\sum_{k=2}^{n}\left(\frac{1}{2}\right)^{k}-$ $n\left(\frac{1}{2}\right)^{n+1}=\frac{1}{2}+\frac{1}{2}-\frac{1}{2^{n}}-\frac{n}{2^{n+1}}=1-\frac{n+2}{2^{n+1}}$. Therefore, $S=2-\frac{n+2}{2^{n}}$.