<s>[INST] Computing $\int_0^{\infty} x^n\left\lfloor\frac{1}{x}\right\rfloor d x=\frac{\zeta(n+1)}{n+1}$, where $n\in \mathbb N$. In the post, it was found that
$$
\int_0^{\infty} x\left\lfloor\frac{1}{x}\right\rfloor d x=\frac{\pi^2}{12}
$$
I want to generalise the integral as

$$
\int_0^{\infty} x^n\left\lfloor\frac{1}{x}\right\rfloor d x=\frac{\zeta(n+1)}{n+1},\; \textrm{ where } n\in \mathbb N.
$$

Now, let’s see whether it can be proved in a similar manner.
Noting that for any $\displaystyle  x\in \Big(\frac{1}{k+1}, \frac{1}{k}\Big]$ , $$
\frac{1}{k+1}<x \leq \frac{1}{k} \Leftrightarrow k+1>\frac{1}{x} \geqslant k \Leftrightarrow\left\lfloor\frac{1}{x}\right\rfloor=k
$$
and
for any $\displaystyle  x\in \big(1, \infty\big]$, we have
$\left\lfloor\frac{1}{x}\right\rfloor=0$.
$$
\begin{aligned}
 \int_0^{\infty} x^n\left\lfloor\frac{1}{x}\right\rfloor d x 
& =\int_0^1 x^n\left\lfloor\frac{1}{x}\right\rfloor d x \\
& =\sum_{k=1}^{\infty} \int_{\frac{1}{k+1}}^{\frac{1}{k}} k x^n d x \\
& =\sum_{k=1}^{\infty}\left[\frac{k x^{n+1}}{n+1}\right]_{\frac{1}{k+1}}^{\frac{1}{k}} \\
& =\frac{1}{n+1} \sum_{k=1}^{\infty}\left[\frac{1}{k^n}-\frac{(k+1)-1}{(k+1)^{n+1}}\right] \\
&= \frac{1}{n+1} \sum_{k=1}^{\infty}\left[\left(\frac{1}{k^n}-\frac{1}{(k+1)^n}\right)+\frac{1}{(k+1)^{n+1}}\right]\\&= \frac{1}{n+1}\left(1+\sum_{k=1}^{\infty} \frac{1}{(k+1)^{n+1}}\right)\\&= \frac{\zeta(n+1)}{n+1}
\end{aligned}
$$
Comments and alternative methods are highly appreciated.
 [/INST] Here is an alternative method. Similarly to the comment by reuns in the linked post, we can do the following:
\begin{align*}
\int_0^\infty x^n\left\lfloor\frac 1x\right\rfloor dx
&=\int_0^\infty y^{-n}\lfloor y\rfloor\frac{dy}{y^2}\\
&=\int_0^\infty y^{-n-2}\sum_{\substack{m\in\mathbb N\\ 1\leq m\leq y}}1 dy\\
&=\sum_{m=1}^\infty \int_m^\infty y^{-n-2}dy\\
&=\sum_{m=1}^\infty \frac{m^{-n-1}}{n+1}=\frac{\zeta(n+1)}{n+1}.
\end{align*}
</s>