Question 23
Let $n$ be a positive integer and $S$ be the set of all numbers that can be written in the form $\displaystyle\sum_{i=2}^k a_{i-1}a_i$ with $a_1,\ldots,a_k$ being positive integers that sum to $n$. Suppose the average value of all the numbers in $S$ is $88199$. Determine $n$.