$2 \cdot 54$ Let $S=\left\{a_{1}, a_{2}, \cdots, a_{r}\right\}$ be a set of integers, where $r>1$. For a non-empty subset $A$ of $S$, define $p(A)$ as the product of all integers in $A$. Let $m(S)$ denote the arithmetic mean of all $p(A)$. If $m(S)=13$, and there is a positive integer $a_{r+1}$ such that $m\left(S \cup\left\{a_{r+1}\right\}\right)=49$. Determine the values of $a_{1}, a_{2}, \cdots, a_{r}$ and $a_{r+1}$.
[Solution] For any natural number $n$ and $A=\left\{a_{1}, a_{2}, \cdots, a_{n}\right\}$. The sum of the products of the elements of all non-empty subsets of $A$ is
$$
\begin{aligned}
a_{1} & +a_{2}+\cdots+a_{n}+\left(a_{1} a_{2}+\cdots+a_{1} a_{n}+\cdots+a_{n-1} a_{n}\right)+\left(a_{1} a_{2} a_{3}\right. \\
& \left.+\cdots+a_{n-1} a_{n} a_{1}\right)+\cdots+a_{1} a_{2} \cdots a_{n} \\
= & \left(1+a_{1}\right)\left(1+a_{2}\right) \cdots\left(1+a_{n}\right)-1 .
\end{aligned}
$$
The number of all non-empty subsets of $A$ is $2^{n}-1$. Therefore,
$$
m(A)=\frac{\left(1+a_{1}\right) \cdots\left(1+a_{n}\right)-1}{2^{n}-1},
$$

which implies
$$
\left(1+a_{1}\right) \cdots\left(1+a_{n}\right)-1=m(A)\left(2^{n}-1\right) .
$$

From this equation, when $n=r+1$,
$$
\begin{aligned}
& \left(2^{r+1}-1\right) m\left(S \cup\left\{a_{r+1}\right\}\right)+1 \\
= & \left(1+a_{1}\right) \cdots\left(1+a_{r}\right)\left(1+a_{r+1}\right) \\
= & {\left[m(S)\left(2^{r}-1\right)+1\right]\left(1+a_{r+1}\right) . }
\end{aligned}
$$

Given $m(S)=13, m\left(S \cup\left\{a_{r+1}\right\}\right)=49$,
$$
49\left(2^{r+1}-1\right)+1=\left[13\left(2^{r}-1\right)+1\right]\left(1+a_{r+1}\right) .
$$

From this equation, we can derive
$$
2^{r}=\frac{12\left(a_{r+1}-3\right)}{13 a_{r+1}-85} .
$$

Notice that the right-hand side of the above equation is a function of $a_{r+1}$, and it is a decreasing function in the intervals $\left(-\infty, \frac{85}{13}\right)$ and $\left(\frac{85}{13}\right.$, $+\infty)$.

When $a_{r+1}=1$, the right-hand side of (1) equals $\frac{24}{72}=\frac{1}{3}$. Therefore, when $a_{r+1}=1,2,3,4,5,6$, the right-hand side of (1) is less than 1. Thus, we only need to consider the case where $a_{r+1} \geqslant 7$. When $a_{r+1} \geqslant 8$, the right-hand side of (1) is not an integer, so we must have $a_{r+1}=7$.
From (1), we get
$$
2^{r}=\frac{12 \times 4}{91-85}=8
$$

Thus, $r=3$.
Therefore,
$$
\begin{aligned}
& \left(1+a_{1}\right)\left(1+a_{2}\right)\left(1+a_{3}\right)=\left(2^{3}-1\right) m(S)+1 \\
= & 7 \times 13+1=92 .
\end{aligned}
$$

Hence,
$$
\left(1+a_{1}\right)\left(1+a_{2}\right)\left(1+a_{3}\right)=92=2 \times 2 \times 23 .
$$

From this, we obtain the unique positive integer solution.