# Can you simplify a mod operator in the denominator of a floored fraction?

I have a function of the form $f(x)=\sum^x_{k=1}\lfloor \frac{1}{1+(x \bmod k)} \rfloor$ and I want to know whether it's possible to simplify this. I think that since the $\bmod$ operator can be rephrased as a function involving a floor function that maybe these can cancel out?

• @DougM I don't follow... If $1 + (x \bmod k) > 1$, then $\lfloor \frac{1}{1+(x \bmod k)} \rfloor = 0$ right? I think that what you're saying applies for a ceiling function - not a floor? Nov 28 '17 at 20:37
• You are right. I am getting sloppy... so $\lfloor \frac 1{1+(x\mod k)} \rfloor = 1$ when $k$ divides $x,$ and $0$ otherwise. $f(x)$ equals the number of factors of $x.$ Nov 28 '17 at 21:42
• And in case you didn't catch the import of Doug M's comment: if $$x = p_1^{e_1}p_2^{e_2}\dots p_n^{e_n}$$ is the prime factorization, then $$f(x) = \sigma_0(x) = (e_1 +1)(e_2 + 1)...(e_n+1)$$ Nov 29 '17 at 3:02