## Main Question

I believe the following formula gives the right answer:

$$ \lim_{k \to \infty} \lim_{n h \to k} \left( \sum_{r=1}^n c_r f(hr) h\right) = \int_0^\infty f(x) \, dx \times \sum_{r=1}^\infty \frac{a_r} r $$

Where $$ c_r = \sum_{d\mid r} a_d $$

And $f(x)$ is a continuous function and its integral converges. How do I prove it rigorously and as the R.H.S looks familiar to a Dirichlet series can I analytically continue the L.H.S?

## My Heuristic Reasoning

We define the following basis: $$ A_n= ( \underbrace{00000\ldots}_{n-1\text{ times}} 1 )^T $$

Hence,

$$ A_1 =(111111 \ldots )^T $$ $$ A_2 = (010101 \ldots)^T $$ $$ A_3 = (001001 \ldots)^T $$ To prove it is a complete basis we have to prove:

$$ \sum_{i=1}^\infty a_i A_i = C $$

where $ a_ i$ are coeffiencts and $ C $ is an arbitrary vector.

We map this to a polynomial and write it explicitly as:

$$ a_1(x+x^2+x^3+\cdots) $$ $$ + $$ $$ a_2(x^2 + x^4 + x^6+ \cdots ) $$ $$ + $$ $$ \vdots $$ $$ = c_1 x + c_2 x^2 + c_3 x^3 + \cdots$$

If we define: $$ k(x)= a_1 x + a_2 x^2 + \cdots $$

We get: $$ k(x) + k(x^2) + \cdots = c(x) $$

We note by comparing coefficients of $x^n$:

$$ c_n = \sum_{d\mid n} a_d $$

## Application to Integration

Consider an integral such that $$ \int_0^\infty f(x) \, dx = C,$$where, $f(x)$ is a smooth and continuous function and absolutely converges.

Now we raise both sides to the power s:

$$\left(\int_0^\infty f(x) \, dx\right)^s = C^s $$

We substitute $x$ with $rx$ to get:

$$\left(\int_0^\infty f(rx) \, dx\right)^s = (C/r)^s $$

Multiplying both sides by an arbitrary coefficient:

$$ (a_r)\left(\int_0^\infty f(rx) \, dx\right)^s = (a_r)( C/r)^s $$

Taking their sum:

$$ \sum_{r=1}^\infty a_r \left(\int_0^\infty f(rx) \, dx\right)^s = C^s \sum_{r=1}^\infty \frac{a_r}{r^s} $$

We write the integral as a limit of a sum:

$$ \sum_{r=1}^\infty \lim_{k \to \infty} \lim_{n h \to k}\ a_r \left( \sum_{x=1}^n f(hrx) h\right)^s = C^s \sum_{r=1}^\infty \frac{a_r}{r^s} $$

## $s=1$ Case

$$ \sum_{r=1}^\infty \lim_{k \to \infty} \lim_{n h \to k}\ a_r \left( \sum_{x=1}^n f(hrx) h\right) = C \sum_{r=1}^\infty \frac{a_r} r $$

For this case we write the sum explictly:

$$ \lim_{h \to 0} a_1 h(f(h) + f(2h) + f(3h) +f(4h) + f(5h) + f(6h) + \cdots)$$ $$+$$ $$ \lim_{h \to 0} a_2 h(0.f(h) + f(2h) + 0.f(3h) +f(4h) + 0.f(5h) + f(6h) + \cdots)$$ $$+$$ $$ \vdots $$

We notice a striking similarity between the above and:

$$a_1( 1 1 1 1 1 1 1 1\cdots)$$
$$+$$

$$a_2( 0 1 0 1 0 1 0 1\ldots)$$
$$+$$
$$ \vdots $$

Hence,

$$ \lim_{k \to \infty} \lim_{n h \to c} \left( \sum_{r=1}^n c_r f(hr) h\right) = \int_0^\infty f(x) \, dx \times \sum_{r=1}^\infty \frac{a_r} r $$

Where $$ c_r = \sum_{d\mid r} a_d $$