maximum of reciprocals of integers Suppose you have n integers, such that $\sum_{i=1}^n \frac{1}{a_i}<1$. What is the maximum value of this sum?
The answers for $n=1,2,3,4$ are $1-\frac{1}{2}, 1-\frac{1}{6}, 1-\frac{1}{42}, 1-\frac{1}{42*43}$(checked by hands).
Could it be anyhow proven that this sequence is exactly connected with https://oeis.org/A007018?
 A: Claim:
$\max \{ \sum_{i=1}^n \frac{1}{a_i} \} = 1- \frac{1}{A_n}$ , where $A_n=(A_{n-1})^2+A_{n-1}$ with $A_0=1$.
Proof:
Let the claim be true for some $n=k$. That is,
$\max \{ \sum_{i=1}^k \frac{1}{a_i} \} = 1- \frac{1}{A_k}$ .
Now we need to find $$\max \{ \sum_{i=1}^{k+1} \frac{1}{a_i} \} $$.
We already know
$\max \{ \sum_{i=1}^k \frac{1}{a_i} \} = 1- \frac{1}{A_k}$,
$\implies$ to get $\max \{ \sum_{i=1}^{k+1} \frac{1}{a_i} \}$, we need to find $\max \{ 1-\frac{1}{A_k} +\frac{1}{a_{k+1}} \}$ .
Notice that, if $a_{k+1} \le A_k$ then $\frac{1}{a_{k+1}} \ge \frac{1}{A_k} \implies 1 -  \frac{1}{A_k} +\frac{1}{a_{k+1}} \ge 1$, contradiction.
$\implies a_{k+1}>A_k$. For maximum, $a_{k+1}=A_k+1$
$\implies \max \{ \sum_{i=1}^{k+1} \frac{1}{a_i} \}=\max \{ 1-\frac{1}{A_k} +\frac{1}{a_{k+1}} \}=1-\frac{1}{A_k} +\frac{1}{A_k+1}=1-\frac{1}{A_k(A_k+1)}=1-\frac{1}{A_{k+1}}$.
Therefore, our claim is true by induction.
A: A different answer:
Call the sum $A$ and the partial sums $A_n$. For $n=1$, $a_1$ must obviously be $2$; otherwise we would already have $A=1$. It's useful to write this as $A_1 = 1 - \frac12$.
Each time we add a new fraction, we must add the largest possible fraction (smallest $a_i$) that keeps us below $A=1$. Since $A_1=1 - \frac12$, it's obvious that we can safely add $\frac13$ without going above $A=1$. So $A_2 = 1- \frac12 + \frac13 = 1 - \frac16$.
From there we see that each new $a_i$ must be one greater than the number in the previous denominator (we'll label the denominators $d_i$). This gives us a result each time of:
$$A_{i+1} = 1- \frac{1}{d_{i}} + \frac{1}{d_{i} +1} = 1 - \frac{1}{d_i^2 + d_i}$$
so $a_{i+1} = d_i + 1$. Given $a_1 = 2$, and defining $a_0 =1$, from the sequence $(1), 2, 3, 7, 43, 1807, \cdots$  we notice the recursion
$$a_i = \prod_{k=1}^{i-1} a_k + 1$$
which also gives the sequence of denominators you've linked when summed up, each equal to $a_i - 1$.
