Show that $\sum_x \Big\lfloor\sqrt[m]{\frac{n}{x}}\Big\rfloor=\lfloor n\rfloor$ This seems to be a trivial fact however, I can't find a satisfactory proof for the following statement:

For any integer $n>0$, and $m>0$,
$$
\sum_x\left\lfloor\sqrt[m]{\frac{n}{x}}\right\rfloor=\lfloor n\rfloor
$$
where the sum is over all positive integers $x$ that are not divisible by a power $m$ of an integer larger than one, and  $p\mapsto[p]$ stands for the floor function.

I tried to use the fact that every positive integer $k$ can be expressed uniquely as
$$k=x s^m$$
where $x$ is not divisible by the power $m$ of any integer larger than $1$.
 A: Each term in the left-hand side counts the number of positive integers less than or equal to $n$ of the form $xs^m$ for some $s$; i.e. let
$$A_x = \{k\in \mathbb{N}: \exists s\in \mathbb{N}\text{ such that }k =xs^m\text{ and }k\leq n\}.$$
Then it suffices to show that $\{1, \ldots, n\}$ is a disjoint union of $\bigcup_x A_x$, since this would give
$$n = \left|\bigcup_xA_x\right|= \sum_x|A_x|,$$
which is what we want.
The fact that we take $x$ to be the positive integers that are not divisible by powers if $n$ ensures that the sets are disjoint. The fact that you put in the problem description tells us that we have included all the needed elements.
A: As you pointed out, any integer $k$ can be written uniquely as
$$
k = x s^m
$$
where $x$ is not divisible by any $m$ power of a number larger than one. Indeed, suppose $k$ has the prime decomposition
$$k=p^{\alpha_1}\cdot\ldots\cdot p^{\alpha_\ell}_\ell$$
where $p_1<\ldots<p_\ell$ are primes and $\alpha_j>0$. Then
$$ \alpha_j=q_jm+r_j,\qquad 0\leq r_j<m$$
and so
$$
k=\Big(\prod_{j:r_j>0}p^{r_j}\Big)\Big(\prod_{j:q_j>0}p^{q_j}\Big)^m
$$
provides the desired decomposition. Uniqueness follows from the uniqueness of the prime decomposition.

Back to the OP:
If $1\leq k\leq n$, then from $k=xs^m$, it follows that $s\leq \sqrt[m]{\frac{n}{x}}$; hence $s\leq\left[\sqrt[m]{\frac{n}{x}}\right]$.
Conversely, if $s\leq\left[\sqrt[m]{\frac{n}{x}}\right]$, then $xs^m\leq x\left[\sqrt[m]{\frac{n}{x}}\right]^m\leq n$. This means that for any $x$ which is not divisible  by the $m$ power of an integer other than $1$, there are exactly $\left[\sqrt[m]{\frac{n}{x}}\right]$ integers $s$ such that $k=xs^m\leq n$. Putting things together, this means that
$$
\sum_x\left[\sqrt[m]{\frac{n}{x}}\right]=\sum_{0<k\leq n}1 = [n]
$$
This can also bee seen as an application of Fubini's theorem. Let $P_m$ be the set of all positive integers that are not divisible by the $m$ powers of a positive integer larger than $1$. The uniqueness of the decomposition $k=x s^m$, $x\in P_m$ and $s\in\mathbb{N}$ implies that if $A_n=\{(x,s)\in P_m\times \mathbb{N}: x s^m\leq n\}$, then
$$\# A_n=\# \{k\in\mathbb{N}:k\leq n\}=[n]$$
Let $\mu$ be the counting measure suported on $P_m$, and let $\nu$ be the counting measure on $\mathbb{N}$. Then
$$\begin{align}
[n]&=\int_{P_m\times \mathbb{N}} \mathbb{1}_{A_n}\,\mu(dx)\otimes\nu(ds)= \int_{P_m}\nu(s:x s^m\leq n)\,\mu(dx)\\
&=\sum_{x\in P_m}\#\Big(s:s\leq \sqrt[m]{\frac{n}{x}}\Big)=
\sum_{x\in P_m}\Big[\sqrt[m]{\frac{n}{x}}\Big]
\end{align}
$$
