Let $A_1, A_2, \ldots , A_{63}$ be the 63 nonempty subsets of $\{ 1,2,3,4,5,6 \}$. For each of these sets $A_i$, let $\pi(A_i)$ denote the product of all the elements in $A_i$. Then what is the value of $\pi(A_1)+\pi(A_2)+\cdots+\pi(A_{63})$?
Here is the solution
For size 1: sum of the elements, which is 21 For size 2: $ 1 \cdot (2 + 3 + 4 + 5 + 6) = 20 $, $ 2 \cdot (3 + 4 + 5 + 6) = 36 $, $ 3 \cdot (4 + 5 + 6) = 45 $, $ 4 \cdot (5 + 6) = 44 $, $ 5 \cdot 6 = 30 $. Sum is 175. For size 3: Those with least element 1: $ 6, 8, 10, 12, 12, 15, 18, 20, 24, 30 = 155 $. Those with least element 2: $ 24, 30, 36, 40, 48, 60 = 238 $. Those with least element 3: $ 60 + 72 + 90 = 222 $. Those with least element 4: only one possible subset, which is $ \{4, 5, 6\} $, the $ \pi $ of which is 120. The total sum here is 735. For size 4: Least element 1: $ 24 + 30 + 36 + 40 + 48 + 60 + 60 + 72 + 90 + 120 = 580 $; least element 2: $ 120 + 144 + 180 + 240 + 360 = 1044 $; least element 3: only one, which is $ 3 \cdot 4 \cdot 5 \cdot 6 = 360 $. The total sum here is 1984. For size 5: Exclude each one individually to get $ 720 + 360 + 240 + 180 + 144 + 120 = 1764 $ For size 6: $ 6! = 720 $
The final answer is $ 21 + 175 + 735 + 1984 + 1764 + 720 = \boxed{5399} $
Is there any shorter way for doing this ?
Thank a lot
It's just one less than the product $$(1+1)(1+2)(1+3)(1+4)(1+5)(1+6)$$ Equivalently, it's $f(1)-1$ where $$f(x) = (x+1)(x+2)(x+3)(x+4)(x+5)(x+6)$$ By Vieta's formulas, the coefficients of all powers of $x$, other than $x^6,\;$in the expanded form of $f(x)$ are the sums of products that you want.
More precisely, for $1 \le k \le 6$, the coefficient of $x^{6-k}$ in the expanded form of $f(x)$ is the sum of all products of $k$ elements of $\{1,2,3,4,5,6\}$.
But summing those coefficients is the same as substituting $x=1$ into $f(x)$, except that you need to subtract $1$ to correct for the extra summand from the term $x^6$.