Find all positive integers $n$, such that $n-1$ and $\frac{n(n+1)}{2}$ are both perfect numbers.
Analysis requires the following knowledge:
(1) When $n, m$ are coprime, $\sigma(m n)=\sigma(m) \sigma(n)$, i.e., the sum of the positive divisors of $n$, $\sigma(n)$, is a multiplicative function.
(2) A necessary and sufficient condition for $n$ to be an even perfect number is $n=2^{p-1}\left(2^{p}-1\right)$, and both $p$ and $2^{p}-1$ must be prime numbers.
We discuss in two cases:
(1) $n$ is odd. $n-1$ is an even perfect number, so $n-1=2^{p-1}\left(2^{p}-1\right)$. When $p=2$, $n=7, n-1=6, \frac{n(n+1)}{2}=28$ are all perfect numbers.

When $p \geqslant 3$, $\frac{n(n+1)}{2}=\frac{1}{2}\left(2^{p-1}\left(2^{p}-1\right)+1\right)\left(2^{p-1}\left(2^{p}-1\right)+2\right)=\left(2^{p-1}\right.$ $\left.\left(2^{p}-1\right)+1\right)\left(2^{p-2}\left(2^{p}-1\right)+1\right)$ is an odd number.
$$
\begin{aligned}
\frac{n+1}{2} & =4^{p-1}-2^{p-2}+1=(3+1)^{p-1}-(3-1)^{p-2}+1 \\
& \equiv 1+3(p-1)+1-3(p-2)+1=6(\bmod 9),
\end{aligned}
$$

Thus, $3 \left\lvert\, \frac{n+1}{2}\right.$, and $3^{2} \left\lvert\, \frac{n+1}{2}\right., \sigma\left(\frac{n+1}{2}\right)=. \sigma(3) \sigma\left(\frac{n+1}{6}\right)=4 \sigma\left(\frac{n+1}{6}\right)$, hence $\sigma\left(\frac{n(n+1)}{2}\right)=\sigma(n) \sigma\left(\frac{n+1}{2}\right)$ is divisible by 4. But $2 \times \frac{n(n+1)}{2}=n(n+1)$ is divisible by 2, but not by 4. Therefore, $\sigma\left(\frac{n(n+1)}{2}\right) \neq 2 \times \frac{n(n+1)}{2}$, i.e., $\frac{n(n+1)}{2}$ is not a perfect number.
(2) $n$ is even.
If $4 \mid n$, then $n-1 \equiv-1(\bmod 4), n-1$ is not a perfect square. The factors $d$ and $\frac{n-1}{d}$ of $n-1$ are different. Pairing $d$ and $\frac{n-1}{d}$, since $d \cdot \frac{n-1}{d}=-1(\bmod 4)$, and both $d$ and $\frac{n-1}{d}$ are odd, one of $d$ and $\frac{n-1}{d}(\bmod 4)$ is congruent to 1, and the other is congruent to -1, $d+\frac{n-1}{d}=1+$ $(-1)=0(\bmod 4)$, thus $4 \mid \sigma(n-1)$. But $2(n-1)=2(\bmod 4)$, so $n-1$ is not a perfect number.

If $n=4 k+2$, then $\frac{n(n+1)}{2}=(2 k+1)(4 k+3)$ is an odd number. Similarly, $4 \mid \sigma(4 k+3)$, so $\sigma\left(\frac{n(n+1)}{2}\right)=\sigma(2 k+1) \sigma(4 k+3)$ is divisible by 4, and $\frac{n(n+1)}{2} \times 2 \equiv$ $2(\bmod 4)$, so $\frac{n(n+1)}{2}$ is not a perfect number.
Thus, the only $n$ that satisfies the condition is $n=7$.
Comment: Is there an odd perfect number? This is an unsolved problem to date.