2. 28 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 $p(A)$, where $A$ is any non-empty subset of $S$.

If $m(S)=13$, and there exists 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] Let $A=\left\{a_{1}, a_{2}, \cdots, a_{n}\right\}, n \in N$, then 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}+\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)\left(1+a_{2}\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 which we can derive
$$
\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 that $m(S)=13, m\left(S \cup\left\{a_{r+1}\right\}\right)=49$,
we have
$$
49\left(2^{r+1}-1\right)+1
$$
$$
=\left[13\left(2^{r}-1\right)+1\right]\left(1+a_{r+1}\right) \text {, }
$$

which leads to
$$
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}$, which is decreasing on $\left(-\infty, \frac{85}{13}\right)$ and $\left(\frac{85}{13},+\infty\right)$. When $a_{r+1}=1$, the left-hand side of (1) equals $\frac{24}{72}=\frac{1}{3}$.
So when $a_{r+1}=1,2,3,4,5,6$, the right-hand side of (1) is a number less than 1.
But when $a_{r+1} \geqslant 8$, the right-hand side of (1) is not an integer except for $a_{r+1}=49$ (when $a_{r+1}=49$, $2^{r}=1$, so $r=0$, which contradicts $r>1$), so $a_{r+1}=7$, and from (1) we get
$$
2^{r}=\frac{12 \times 4}{91-85}=8 \text {, }
$$

hence
$$
r=3 \text {. }
$$

And
$$
\left(1+a_{1}\right)\left(1+a_{2}\right)\left(1+a_{3}\right)
$$
$$
\begin{array}{l}
=\left(2^{3}-1\right) m(S)+1 \\
=7 \times 13+1
\end{array}
$$

Thus we have
$$
\left(1+a_{1}\right)\left(1+a_{2}\right)\left(1+a_{3}\right)=92=2 \times 2 \times 23 .
$$

From this, we can obtain the unique positive integer solution:
$$
1+a_{1}=2,1+a_{2}=2,1+a_{3}=23 .
$$

That is, $a_{1}=1, a_{2}=1, a_{3}=22$.
In addition, there are 13 other integer solutions, which can be obtained from the different integer factorizations of 92. They are:
$$
\begin{array}{l}
(0,0,91),(-2,-2,91),(-2,0,-93),(0,1,45),(-2,-3,45), \\
(-2,1,-47),(0,-3,-47),(0,3,22,),(-2,-5,22), \\
(-2,3,-24),(0,-5,-24),(-3,-3,22),(-3,1,-24) .
\end{array}
$$