Solution:
For primes p=2,3,5,7, let the random variable Xp denote the number of factors of p in the product of the elements of S, plus 1. Then we wish to find E(X2X3X5X7).
If there were only prime powers between 1 and 10, then all Xp would be independent. However, 6 and 10 are non-prime powers, so we will do casework on whether these elements are included:
- Case 1: none included. Note that E(X2∣6,10∈/S)=1+21(1+2+3)=4, since each of {2,4,8} has a 1/2 chance of being included in S. Similarly, E(X3∣6,10∈/S)=25 and E(X5∣6,10∈/S)=E(X7∣6,10∈/S)=23. The values of X2,X3,X5, and X7 are independent given that 6,10∈/S, so E(X2X3X5X7∣6,10∈/S)=4⋅25⋅23⋅23=245.
- Case 2: 6 included. Now, we have E(X2∣6∈S,10∈/S)=5 and E(X3∣6∈S,10∈/S)=27, since we know 6∈S. We still have E(X5∣6∈S,10∈/S)=E(X7∣6∈S,10∈/S)=23. The values of X2,X3,X5, and X7 are independent given that 6∈S but 10∈/S, so E(X2X3X5X7∣6∈S,10∈/S)=5⋅27⋅23⋅23=8315.
- Case 3: 10 included. We have E(X2∣10∈S,6∈/S)=5 and E(X5∣10∈S,6∈/S)=25, since we know 10∈S. We also have E(X3∣10∈S,6∈/S)=25 and E(X7∣10∈S,6∈/S)=23, hence E(X2X3X5X7∣10∈S,6∈/S)=5⋅25⋅25⋅23=8375.
- Case 4: 6 and 10 included. We have E(X2∣6,10∈S)=6, E(X3∣6,10∈S)=27, and E(X5∣6,10∈S)=25. We still have E(X7∣6,10∈S)=23, hence E(X2X3X5X7∣6,10∈S)=6⋅27⋅25⋅23=4315.
The average of these quantities is 41(245+8315+8375+4315)=8375, as desired.