Explicit formula for floor(x)?

2.1k Views Asked by At

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?

3

There are 3 best solutions below

6
On

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. (:

0
On

The standard way in analytic number theory to deal with sums involving the floor function is to either (a) estimate it trivially or (b) use Fourier analysis. In both cases, the idea is that \[\lfloor x \rfloor = x - \{x\},\] where $\{x\}$ denotes the fractional part of $x$. Trivially, one has \[0 \leq \{x\} < 1,\] and often this is sufficient for applications. Alternatively, one can use Fourier analysis, as this is essentially a sawtooth function, which has the Fourier expansion \[\{x\} = \frac{1}{2} - \frac{1}{2\pi i} \sum_{\substack{m = -\infty \\ m \neq 0}}^{\infty} \frac{1}{m} e^{2\pi i mx}.\] In practice, one instead uses the partial sum \[S_M \{x\} = \frac{1}{2} - \frac{1}{2\pi i} \sum_{\substack{m = -M \\ m \neq 0}}^{M} \frac{1}{m} e^{2\pi i mx},\] which satisfies \[S_M \{x\} = \{x\} + O\left(\frac{1}{1 + \|x\| M}\right),\] where $\|x\|$ denotes the distance from $x$ to the nearest integer. In particular, $S_M \{x\}$ is uniformly bounded in $M$ for all $x$ and converges pointwise almost everywhere to $\{x\}$ as $M$ tends to infinity.

1
On

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). $$