Sums of ratios of a set’s sums to its products Let $S = \{1, 2, 3, ..., 8\}$.
Let $A \subseteq S$ and $A \neq \varnothing$.
$F(X) = \text{sum of all elements in } X.$
$G(X) = \text{product of all elements in }X$.
Calculate $\left\lfloor{\sum_{A ⊆ S}^\  \frac {F(A)} {G(A)}}\right\rfloor$.
My approach was looking for a pattern, so I calculated the first three terms and found out the sum could be $\frac {N^3-(N-1)^2} N$. Can someone help me finding the real solution? Thanks in advance.
 A: OP asked about $S=\{1, 2, \dots, 8\},$ but I assume what's really meant is $S=\{1, 2, \dots, n-1\}$ for any $n.$  (The final expression turns out to be simpler with $n-1$ here rather than $n.)$
I'll prove that $$\sum_{A ⊆ \{1, 2, \dots, n-1\}}\frac {F(A)} {G(A)} = n(n-H_n),$$
where $H_n$ is the $n^\text{th}$ harmonic number; $H_n=\sum_{k=1}^n \frac1 k.$
Using the asymptotic expansion of $H_n,$ you can see that a very close approximation to $n(n-H_n)$ is $$n^2-n\ln n-n\gamma -\frac12,$$ where $\gamma$ is the Euler-Mascheroni constant.
OP asked about the floor of this value, but there probably isn't a closed form specifically for that integer, besides simply taking the floor of the harmonic-number formula above.

I prefer writing $\sum A$ and $\prod A$ instead of $F(A)$ and $G(A),$ respectively.
We'll follow the usual conventions that $\sum\emptyset=0$ and $\prod\emptyset=1.$
Also, in one place in the question, OP suggests requiring $A\subseteq S$ to be non-empty, but that doesn't change the value of the sum, since $
\frac{\sum\emptyset}{\prod\emptyset}=0.$

First we'll calculate $$P_n = \sum_{A\subseteq\{1,\dots,n\}} \frac1{ \prod A}.$$
Note that $P_0=1$ and, for $n>0,$ $$\begin{align}
P_n &= \sum_{A\subseteq\{1,\dots,n\}} \frac1{ \prod A}
\\
&= \sum_{A\subseteq\{1,\dots,n\},\, n\notin A} \frac1{ \prod A}
+ \sum_{A\subseteq\{1,\dots,n\},\, n\in A} \frac1{ \prod A}
\\
&= \sum_{A\subseteq\{1,\dots,n-1\}} \frac1{ \prod A}
+ \sum_{A\subseteq\{1,\dots,n-1\}} \frac1{ \prod (A\cup\{n\})}
\\
&= P_{n-1} + \sum_{A\subseteq\{1,\dots,n-1\}} \frac1{n \prod A}
\\
&= P_{n-1} + \frac1{n} \sum_{A\subseteq\{1,\dots,n-1\}}\frac1{\prod A}
\\
&= P_{n-1} + \frac1{n} P_{n-1}
\\
&= (1+\frac1{n}) P_{n-1},
\end{align}$$
and it follows easily by induction that $$P_n=n+1$$
for all $n \ge 0.$
$$ $$
Next we'll find a recurrence relation for $$D_n=\sum_{A\subseteq\{1,\dots,n\}} \frac{\sum A}{\prod A}.$$
We have $D_0=0$ and, for $n>0,$
$$\begin{align}
D_n &=\sum_{A\subseteq\{1,\dots,n\}} \frac{\sum A}{\prod A}
\\
&=\sum_{A\subseteq\{1,\dots,n\},\, n\notin A} \frac{\sum A}{\prod A}+\sum_{A\subseteq\{1,\dots,n\},\, n\in A} \frac{\sum A}{\prod A}
\\
&=\sum_{A\subseteq\{1,\dots,n-1\}} \frac{\sum A}{\prod A}+\sum_{A\subseteq\{1,\dots,n-1\}} \frac{\sum (A\cup\{n\})}{\prod (A\cup\{n\})}
\\
&=D_{n-1}+\sum_{A\subseteq\{1,\dots,n-1\}} \frac{n+\sum A}{n \prod A}
\\
&=D_{n-1}+\sum_{A\subseteq\{1,\dots,n-1\}} \frac{n}{n \prod A}
+\sum_{A\subseteq\{1,\dots,n-1\}} \frac{\sum A}{n \prod A}
\\
&=D_{n-1}+\sum_{A\subseteq\{1,\dots,n-1\}} \frac1{ \prod A}
+\frac1{n}D_{n-1}
\\
&=(1+\frac1{n})D_{n-1}+\sum_{A\subseteq\{1,\dots,n-1\}} \frac1{ \prod A}
\\
&=(1+\frac1{n})D_{n-1}+P_{n-1}
\\
&=\frac{n+1}{n}D_{n-1}+n.
\end{align}$$
This recurrence relation can be solved in terms of the harmonic numbers $H_n=\sum_{k=1}^n \frac1 k,$ as follows:
$$D_{n-1}=n(n-H_n)$$
for $n \ge 1.$
This can shown by induction, completing the proof of the desired formula.
A: I wrote a program to generate the values of this sum over all sets of the form $\{1, 2, 3,  \ldots, n\}$ for $0 \le n \lt 25$ and got back this sequence:
$$\begin{array}{ccccc}
0,   & 1,   & 3,   & 7,   & 13, \\
21,  & 30,  & 42,  & 55,  & 70, \\
87,  & 106, & 127, & 150, & 175,\\
201, & 230, & 261, & 293, & 328,\\
364, & 402, & 443, & 485, & 529
\end{array}$$
These values don't match the formula you came up with for the first few terms. Moreover, I'm not sure this is a known sequence of numbers; it doesn't appear in the OEIS. I also tried looking up the first differences of the terms in the sequence, but that also isn't in the OEIS anywhere either.
The closest sequence I found to the sequence of values you're looking for is this one, which it closely tracks but doesn't quite match. Curiously, that sequence seems to have nothing whatsoever to do with sets or set theory.
Here's the code I wrote, both for reference and in case there are any bugs. :-)
#include <iostream>
#include <vector>
#include <numeric>
using namespace std;

/* Given a list of numbers, returns their sum. */
double sumOf(const vector<int>& v) {
    return accumulate(v.begin(), v.end(), 0.0);
}

/* Given a list of numbers, returns their product. */
double productOf(const vector<int>& v) {
    return accumulate(v.begin(), v.end(), 1.0, multiplies<double>()); 
}

int main() {
    /* List of the sets we've generated so far. Start with the empty set. */
    vector<vector<int>> sets = {{}};
    
    for (int n = 1; n <= 20; n++) {
        /* Compute the sum. */
        double total = 0;        
        for (const auto& set: sets) {
            total += sumOf(set) / productOf(set);
        }
        
        /* Cast to int to take the floor. */
        cout << int(total) << ", " << flush;
        
        /* Expand the set to form the next power set. Do this by taking each
         * existing set and creating a new set that includes the value of n.
         */
        auto size = sets.size();
        for (size_t j = 0; j < size; j++) {
            auto set = sets[j];
            set.push_back(n);
            sets.push_back(set);
        }
    }
}
```

