In number theory we have so-called explicit formula's in terms of the Riemann zeta zero's. For instance to count the sum of the logarithms of the primes below some given integer.

(second Chebyshev Function)

Consider the floor function : http://mathworld.wolfram.com/FloorFunction.html

Is there an explicit formula for it consisting of elementary functions?

If not, why not?

Maybe in terms of the zero's of another special function?


Solution 1:

Note that $\lfloor x \rfloor = x - \{x\}$, where $\{x \}$ (the fractional part of $x$) is periodic with period $1$, with a jump discontinuity at integer points. Let's try to write $\{x\}=f\left(\cot \pi x\right)$, since $\cot \pi x$ has the same property. We need $f(y)\rightarrow 0$ as $y\rightarrow \infty$, $f(y)\rightarrow 1$ as $y\rightarrow -\infty$, and the correct arc-tangent-y interpolation in between. What works is $f(y)=\frac{1}{2}-\frac{1}{\pi}\tan^{-1}y$. Putting things together, $$ \lfloor x \rfloor=x-\frac{1}{2} + \frac{1}{\pi}\tan^{-1}(\cot \pi x). $$

Solution 2:

I've derived an explicit formula for $S(x)=Floor(x)$ from the explicit formula for $Q(x)$ based on the relationship between $S(x)$ and $Q(x)$. The $c(n)$ coefficient referenced in (3) below involves both a Dirichlet convolution and a Dirichlet inverse, but I believe it simplifies such that $c(n)=1$ when $n$ is a square integer ($n\in\{1,4,9,16,...\}$) and $c(n)=0$ when $n$ is not a square integer.

(1) $\quad Q(x)=\sum\limits_{n=1}^x a(n)\,,\quad a(n)=\left|\mu(n)\right|$

(2) $\quad Q_o(x)=\frac{6\,x}{\pi^2}+\sum\limits_{k=1}^K\left(\frac{x^{\frac{\rho_k}{2}}\zeta\left(\frac{\rho_k}{2}\right)}{\rho_k \zeta'\left(\rho_k\right)}+\frac{x^{\frac{\rho _{-k}}{2}}\zeta \left(\frac{\rho_{-k}}{2}\right)}{\rho_{-k}\zeta'\left(\rho_{-k}\right)}\right)+1+\sum\limits_{n=1}^N\frac{x^{-n}\,\zeta(-n)}{(-2\,n)\,\zeta'(-2\,n)}\,,\\$ $\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad K\to\infty\land N\to\infty$

(3) $\quad S_o(x)=\sum_\limits{n=1}^x c(n)\,Q_o\left(\frac{x}{n}\right)$

The following plot illustrates $S_o(x)$ (orange) evaluated at $K=N=200$. $S(x)$ is illustrated in blue as a reference but is mostly hidden under the evaluation of $S_o(x)$. The red discrete portion of the plot illustrates the evaluation of $S_o(x)$ at integer values of $x$.

Illustration of $S_o(x)$

Solution 3:

I don't think your going to find an explicit formula for the floor function and here is why,

$nextprime(n)= 1+\sum_{j=1}^{2n}\lfloor\frac{n!^j}{j!}\rfloor-\lfloor\frac{n!^j-1}{j!}\rfloor$

$prevprime(n)=n+1-\sum_{j=1}^{n}\lfloor\frac{j!^{n-1}}{(n-1)!}\rfloor-\lfloor\frac{j!^{n-1}-1}{(n-1)!}\rfloor$

Greatest prime factor of $n$ $=n+1-\sum_{j=1}^{n}\lfloor\frac{j!^n}{n}\rfloor-\lfloor\frac{j!^n-1}{n}\rfloor$

Smallest prime coprime to $n=1+\sum_{j=1}^{n}\lfloor\frac{n^j}{j!}\rfloor-\lfloor\frac{n^j-1}{j!}\rfloor$

I mean the list goes on and on. If there were an explicit formula for the floor function, any thing having to do with primes would have a solution. Let me know if you find it. (: