Monday, June 9, 2025

Sqrt and square free

Given a positive integer $n$. Show that


$$ n = \sum_{k} \left[\sqrt{\dfrac{n}{k}}\right]$$

where $k$ runs through the square free numbers, $1 \le k \le n$ and $[x]$ is the integer part of $x$.







Solution:

If $\lambda$ is the Lioville function: $\lambda(p^a) = (-1)^a$  for prime powers and $\lambda(ab) = \lambda(a)\lambda(b)$ for co-prime $a,b$

then using dirichlet convolution we have the identity $\lambda * 1 = s$, where $s$ is the indicator function for perfect squares. 

We can also show that the dirichlet inverse of $\lambda$ is $\mu^2$, where $\mu$ is the mobius function.


Thus we have $1 = \lambda^{-1} * s$

Which gives (using summation identities involving dirichlet convolution)

$$ n  = \sum_{1 \le k \le n} \mu^2(k) S(n/k)$$

where $S(n/k)$ counts the number of perfects squares $ \le \frac{n}{k}$, which is in fact $\left[\sqrt{\frac{n}{k}}\right]$.

$\mu(k)$ is non-zero only for the square free numbers, and that proves the identity,