$\varphi(x,n)=\sum_{d|n}\mu(d)\left\lfloor\frac xd\right\rfloor$ and $\sum_{d|n}\varphi\left(\frac xd,\frac nd\right)=\lfloor x\rfloor$

160 Views Asked by At

If $x$ is real, $x\ge 1$, let $\varphi(x,n)$ denote the number of positive integers less than or equal to $x$ that are relatively prime to $n$. Prove that $$\varphi(x,n)=\sum_{d|n}\mu(d)\left\lfloor\frac xd\right\rfloor$$ and $$\sum_{d|n}\varphi\left(\frac xd,\frac nd\right)=\lfloor x\rfloor$$

Since it is clear that $\varphi(n,n)=\varphi(n)$, we can put $x=n$ and check that the identities indeed work.

I guess, the first one will somehow require writing $\varphi(n)$ as a sum over the $x$'s of $\varphi(x,n)$. And once the first one is done, I guess the second one will somehow follow from Möbius inversion formula. But, I am not sure about either. I also couldn't make any more progress.

As I mentioned in the comments, the duplicate question mentioned doesn't have a proper complete answer. In particular, none of the two answers has a proof for the second identity. I really want a complete proof of that.

2

There are 2 best solutions below

1
On

Use the identity

$$ \sum_{d|n}\mu(d)= \begin{cases} 1 & n=1 \\ 0 & n>1 \end{cases} $$

so that

$$ \varphi(x,n)=\sum_{\substack{k\le x\\(k,n)=1}}1=\sum_{k\le x}\sum_{d|(n,k)}\mu(d)=\sum_{d|n}\mu(d)\sum_{\substack{k\le x\\d|k}}1=\sum_{d|n}\mu(d)\left\lfloor\frac xd\right\rfloor. $$

Applying Möbius inversion for general convolutions to the right hand side shall give the second identity.

0
On

Here's an attempt for the second identity-

Let $$S_x=\{1,2,\dots \lfloor x\rfloor\}\\ A_{x,n}(d)=\{k\in S_x: (k,n)=d\}$$

So, the $\{A_{x,n}(d)\}$ partitions $S_x$ which gives $\sum_{d|n}|A_{x,n}(d)|=\lfloor x\rfloor$. Also, \begin{align*} |A_{x,n}(d)|&=|\{0<k\le x: (k,n)=d\}|\\ &=|\{k/d:0\le k/d\le x/d, (k/d,n/d)=1\}|\\ &=|\{0\le q\le x/d: (q,n/d)=1\}|\\ &=\varphi(x/d,n/d) \end{align*} So, $$\sum_{d|n}\varphi\left(\frac xd, \frac nd\right)=\left\lfloor x\right\rfloor$$ hence completing the proof.