I have a sequence of numbers, described by start number, end number and a step.
E.g., if start = 4, end = 10, step = 2, the sequence will be: [4, 6, 8, 10]. The average of 1 divided by each number in the sequence will be:
$$ (\frac{1}{4} + \frac{1}{6} + \frac{1}{8} + \frac{1}{10}) \div 4 ≈ 0.1604 $$
Is it possible to calculate an average of inverses using only start, end, and step (4, 10, 2 in this example)? What is the formula? f(start, end, step) = ?
I do not believe that this is possible. Even in the case where the step size is 1, we cannot, in general, write down the sum. That is to say, there is no general formula for $$\sum_{n=a}^b \frac{1}{n}.$$
This is explained in more detail in the top answer to the question here.