Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [floor-function]

The floor function, also known as the greatest integer function, maps a real number $x$ to the greatest integer less than or equal to $x$ (often denoted $\lfloor x \rfloor$). See also (ceiling-function).

0
votes
0answers
10 views

How to linearize a floor funtion in constraints?

I want to linearize the following constraints: $Y_ij^tb$ ≤ $M$.$X_ij^tb$ $Y_ij^tb$ ≤ ([$S^tb$]+1) $Y_ij^tb$ ≥ ([$S^tb$]+1)-(1-$X_ij^tb$).$M$ $Y_ij$^tb ≥ 0 where a floor function is used. $M$ is ...
1
vote
1answer
26 views

Solving an inequality with the floor operator

Assume that $A$, $B$, $C$ are positive real numbers and that $I$ is a positive integer. How could I isolate $A$ in the inequality $\left \lfloor{AB/C}\right \rfloor \geq I$ ? The best I could do: \...
1
vote
2answers
43 views

Floor function summation[difficult]

The question is to find the value of — $$\sum_{r=1}^{502} \Big \lfloor \frac{305r}{503}\Big \rfloor$$ The answer is pretty big, so I don't think trial and error will work here. I seriously can't ...
2
votes
1answer
25 views

Floor function equation with $n$ solutions

The question is — The equation $\lfloor ax \rfloor = x$ has exactly $n$ distinct solutions, given that $n \in \mathbb{N}, n \geqslant 2$ and $a \in \mathbb{R}, a > 1$. Find the range of $a$. My ...
4
votes
1answer
97 views

Evaluating $\sum_{n=0}^{\infty}ne^{1-n}$ using calculus

I'm trying to evaluate the following integral which popped up in MIT Integration Bee 2015 which involves the floor function. $$\int_{0}^{\infty}\left(xe^{1-x}-\lfloor x\rfloor e^{1-\lfloor x\rfloor}\...
0
votes
0answers
29 views

Voyage into the golden screen

We start from A004718 named "The Danish composer Per Nørgård's "infinity sequence", invented in an attempt to unify in a perfect way repetition and variation" $$a(2n) = -a(n), a(2n+1) = a(n) + 1, a(0)=...
0
votes
1answer
63 views

Solve $x + \lfloor y \rfloor + \{ z \} = 13.2$; $\{ x \} + y + \lfloor z \rfloor = 15.1$; $\lfloor x \rfloor + \{ y \} + z = 14.3$

The equation system is — $x + \lfloor y \rfloor + \{ z \} = 13.2$ $\{ x \} + y + \lfloor z \rfloor = 15.1$ $\lfloor x \rfloor + \{ y \} + z = 14.3$ Now I've tried substituting $n$ with $\lfloor n \...
0
votes
2answers
43 views

Maximum and minimum values of $\left\lfloor \frac{x}{nm}\right\rfloor - \left\lfloor \frac{1}{m}\left\lfloor \frac{x}{n}\right\rfloor \right\rfloor$

I feel like I need some additional pointers on the following questions as I am unable to come up with a solution for it: If $m$ and $n$ are any integers, and $x$ is any positive real number, what are ...
1
vote
3answers
65 views

Maximum and minimum value of ⌊2x⌋ − 2 ⌊x⌋ for any real number x?

Working through some sample problems on flooring from a guide book and I'm stuck on the following questions: What is the maximum and minimum value of $\lfloor 2x\rfloor − 2 \lfloor x\rfloor$ for any ...
0
votes
1answer
13 views

How to make a transformation to the floor function to the right or left?

Assume a function called $f(x)$ , Then all of us know that of we draw $f(x+a)$ it will be a transformation to the left or right and $f(x)+b$ to up or down. But when I drew floor function on Desmos ...
0
votes
1answer
46 views

Prove with geometry: $\lfloor\frac{p}{q}\rfloor+\lfloor\frac{2p}{q}\rfloor+\cdots+\lfloor\frac{(q-1)p}{q}\rfloor=(p-1)(q-1)/2$, for coprime $p$, $q$

The question is to prove this using geometry: For $p$ and $q$ coprime, $$\left\lfloor\frac{p}{q}\right\rfloor +\left\lfloor\frac{2p}{q}\right\rfloor+\cdots + \left\lfloor\frac{(q-1)p}{q}\right\...
0
votes
1answer
40 views

Minimum value of a floor function [closed]

Minimum value of a floor function. $\left \lfloor{(a+b+c)/d}\right \rfloor + \left \lfloor{(a+b+d)/c}\right \rfloor +\left \lfloor{(a+d+c)/b}\right \rfloor + \left \lfloor{(d+b+c)/a}\right \rfloor$ My ...
0
votes
1answer
43 views

Solve $\int_{2}^{341} \left(x - \lfloor x \rfloor \right)^2$

The question is $\int_{2}^{341} \left(x - \lfloor x \rfloor \right)^2$. I understand how to solve integrals of floor functions (they get converted to discrete integrals) and even just this part: $(x ...
4
votes
1answer
95 views

A bizarre expression for cardinality involving summation of roots and floor function

Show that number of triples $(a,b,c)$ with $a,b,c\in [1,n]$ such that $ab=c$ is given by $$\bigl|\bigl\{(a,b,c)\in [1,n]^3:ab=c\bigr\}\bigr|=2\sum_{i=1}^{\left\lfloor\sqrt{n}\right\rfloor}\Big(\...
0
votes
0answers
42 views

Proof that $\lfloor \log(n) \rfloor = \lfloor \log((n−1)/2) \rfloor + 1$

I have an assignment tomorrow and we should proof that $$\lfloor{\log n}\rfloor = \left\lfloor \log\left( \Big\lfloor \frac{n-1}2 \Big\rfloor \right) \right\rfloor + 1$$ But the floor drives me ...
1
vote
1answer
55 views

Can I split this inequality like this?

Recently I had solved this number theory problem but after I solved it I was a bit uncertain whether my approach was correct so I approached AOPS. The problem is : Prove that $[x] + [y] + [x + y] \...
3
votes
0answers
48 views

Reasoning about remainders and the Möbius function

This one seems counter intuitive to me but I am not seeing a mistake in my reasoning. Please let me know if you find one. Let: $x > 0$ be an integer $\mu(x)$ be the möbius function $x\#$ be the ...
2
votes
1answer
65 views

Prove that $ \left \lfloor {\log n} \right \rfloor = \left \lfloor {\log \left \lceil \frac {n-1}{2}\right \rceil} \right \rfloor + 1$

We have been doing algorithm analysis in university, and after analyzing binary search algorithm, the following equation resulted. What we have to do now is to prove that $ \left \lfloor {\log n} \...
5
votes
2answers
89 views

Limit of $\left\lfloor x \left\lfloor \frac1x \right\rfloor \right\rfloor$, as $x$ goes to zero

Find $\lim\limits_{x\to 0^+}\left\lfloor x \left\lfloor \frac1x \right\rfloor \right\rfloor$ and $\lim\limits_{x\to 0^-}\left\lfloor x \left\lfloor \frac1x \right\rfloor \right\rfloor$ ? See the ...
2
votes
1answer
56 views

Counting integers with a least prime factor greater than $x$ in a sequence of $x$ consecutive integers.

It is well known from Sylvester-Schur that in any sequence of $x$ consecutive integers, there is always at least one integer divisible by a prime greater than $x$. I am interested in counting the ...
1
vote
1answer
19 views

proving floor, and rounding floats in some programming languages

Here is a simple property which is very useful while programming : In most programming languages, ...
0
votes
1answer
25 views

Let $x \in \Bbb R$, $n \in \Bbb N$, show that $n \lfloor x \rfloor \leq \lfloor nx \rfloor \leq n \lfloor x \rfloor + (n-1)$

Problem: Let $x \in \Bbb R$, $n \in \Bbb N$, show that $n \lfloor x \rfloor \leq \lfloor nx \rfloor \leq n \lfloor x \rfloor + (n-1)$ I have one part of the inequality, namely that since $ \lfloor x ...
2
votes
2answers
57 views

Finding the floor of $\sqrt{d^2-1}$

If we are given $d$ an integer, then I've seen it written that the floor of $\sqrt{d^2-1}=d-1$, but how is this found? It's not immediately obvious, at least not to me.It makes me feel there must be ...
0
votes
1answer
80 views

Show that f is continuous at all c ∈ R \ Z and discontinuous at all c ∈ Z.

For any x ∈ R define the floor of x, denoted [x],to be the largest integer y with y ≤ x. Then define a function f : R → R by f(x) =[x]. Show that f is continuous at all c ∈ R \ Z and discontinuous at ...
2
votes
2answers
61 views

Reasoning about $\left(\left\lfloor\frac{2x}{i}\right\rfloor -2\left\lfloor\frac{x}{i}\right\rfloor\right)$

I am working on an alternative argument for Bertrand's Postulate that depends on the following argument. Please let me know if I made a mistake or if any point is unclear. Let: $p_k$ be the $k$th ...
2
votes
2answers
62 views

Greatest Integer Function linear equation

Given that $2[x]=x+2(x)$, $[x]$ if the Greatest Integer Function and $(x)$ is the fractional part of $x$, find the value (s) of $x$. I tried replacing $(x)=x–[x]$ but for an equation in $x$ and $[x]$....
0
votes
2answers
42 views

Evaluate $\int_{1}^{n} \lfloor x \rfloor^{x- \lfloor x \rfloor} dx$.

$\int_{1}^{n} [x]^{x-[x]} dx$ I tried to approach this with riemann sum method but it seems impossible by that way. Even using other general integration techniques it seems quite complicated .I have ...
2
votes
1answer
68 views

How do limits work with floor/ceiling?

I'm interested in the below equation: $$\frac{n}{\operatorname{floor}(\frac{x}{n})}$$ Plotting with $n = 1..100$ shows the graph being slightly more aliased as $n$ increases and a discontinuity ...
0
votes
1answer
22 views

Find the solution of $1 \le \left\lfloor \left\lvert \frac{x+1}{x-3}\right\rvert +x\right\rfloor \lt 2$

Find the solution of $$1 \le \left\lfloor \left\lvert \frac{x+1}{x-3}\right\rvert +x\right\rfloor \lt 2$$ My try: The only thing i know is that $$\left\lfloor \left\lvert \frac{x+1}{x-3}\right\rvert +...
0
votes
0answers
67 views

Proving $\lfloor e^x \rfloor =\lfloor e^{\lfloor x \rfloor} \rfloor$

Prove that $$\lfloor e^x \rfloor =\lfloor e^{\lfloor x \rfloor} \rfloor \tag{1}$$ I was actually trying to prove $$\lfloor \sqrt{x} \rfloor=\lfloor \sqrt{\lfloor x \rfloor} \rfloor$$ and i ...
-1
votes
3answers
60 views

Is $\lfloor2\sqrt{n-\lfloor \sqrt{n} \rfloor}\rfloor <\lfloor2\sqrt{n} \rfloor$ true for $n\geq 0$?

I have reasons to believe that $\lfloor2\sqrt{n-\lfloor \sqrt{n} \rfloor}\rfloor <\lfloor2\sqrt{n} \rfloor$ for $n\geq 0$. How could I go about proving (or disproving) this?
0
votes
1answer
43 views

I need to solve one equation, but I dont know how to solve equation with floor functions

Im a student with not such a knowledge to solve equations with floor functions. I want to ask, if it is even possible and if it so, how is possible to prove this equation to be true. ...
0
votes
0answers
23 views

Differentiation wrt a Floor Division

I have been racking my brain on how i should go about resolving: $\frac{d( n (\frac{g}{n} - \lfloor\frac{g}{n}\rfloor))}{d \lfloor\frac{g}{n}\rfloor}$ For this case replace ${\lfloor\frac{g}{n}\...
3
votes
8answers
88 views

Proving that the $\lfloor-x\rfloor= -\lceil x\rceil$

My homework assignment has asked me to prove that $\lfloor-x\rfloor = -\lceil x\rceil$. Conceptually this makes perfect sense to me, I just am at a loss for how to start actually proving it. I figure ...
0
votes
2answers
60 views

Chebyshev function - show that $\psi(x)>(x-2)\log2-\log(x+1)$

The question I'm trying to do is this: Assume $x>2$ and $n=\lfloor x/2\rfloor$. Show that $\psi(x)>(x-2)\log2-\log(x+1)$, given the inequality $2n\log2-\log(2n+1)<\psi(2n)$. All I've ...
0
votes
3answers
57 views

Approximating series of fractions [duplicate]

Let $$ P = \frac{1}{\sqrt{2}} + \frac{1}{\sqrt{3}}+ \frac{1}{\sqrt{4}} ... +\frac{1}{\sqrt{10000}}$$ what is the value of the floor function of P? My try: I tried assuming these 2 bounds $$ P_x =...
1
vote
1answer
67 views

Reasoning about inequalities involving floor functions

I am working on the beginning of an inductive argument and I wanted to confirm that my base case is sound. Let $f(x) = \lfloor x\rfloor - \left\lfloor\dfrac{x}{2}\right\rfloor$ where is $x$ is a ...
2
votes
2answers
53 views

Showing $\int_{a}^{b} \left\lfloor x \right\rfloor dx + \int_{a}^{b} \left\lfloor -x \right\rfloor dx=a-b$

I want to show $$\int_{a}^{b} \left\lfloor x \right\rfloor dx + \int_{a}^{b} \left\lfloor -x \right\rfloor dx=a-b$$ I know that \begin{equation} \left\lfloor -x \right\rfloor = \begin{cases} -\...
1
vote
1answer
64 views

Doubt on Integration

$$\int_0^4 \lfloor x/2 \rfloor \ d(x-\lfloor x \rfloor)$$ I don't get how we convert the given differential element into normal dx differential element. I plotted the graphs of $$\lfloor x/2 \...
1
vote
1answer
56 views

Proving $\int_0^{n^2} \left\lfloor\sqrt t\right\rfloor \,dt=\frac{n(n-1)(4n+1)}{6}$

I want to prove $$\int_{0}^{n^{2}} \left\lfloor \sqrt{t} \right\rfloor \,dt=\frac{n(n-1)(4n+1)}{6}$$ Is it correct to say that $\left\lfloor \sqrt{t} \right\rfloor=\sqrt{(k-1)}$ and $(k-1)^{2} &...
0
votes
2answers
49 views

Values of $x$ satisfying $\lfloor{x^2\rfloor}=\left(\lfloor{x\rfloor}\right)^2$

Prove that values of $x$ satisfying $\lfloor{x^2\rfloor}=\left(\lfloor{x\rfloor}\right)^2$ is $(0,\sqrt{2})\cup \mathbb{Z}$ My try: Its trivial that every integer satisfies the given equation. Now ...
-1
votes
2answers
52 views

Algorithm to find floors of multiples of the golden ratio

What is an algorithm to calculate $\lfloor n\phi \rfloor$ given some integer $n$, where $\phi$ is the golden ratio? I am thinking the easiest way will involve calculating multiples of its continued ...
2
votes
1answer
49 views

Graph of $f(x)=x-[x]-\dfrac{1}{2}$

I have a question regarding this graph, for $f(x)=x-[x]-\dfrac{1}{2}$, where $[\cdot ]$ denotes the greatest integer function. My question is about the graph, why does the first slop has an open ...
0
votes
1answer
38 views

Formula containing floor functions. [closed]

How can I solve an equation with multiple floor functions added together? $$ 18 + \lfloor 2.6 \rfloor + \lfloor x \rfloor + \left\lfloor \frac x4 \right\rfloor + 5 = 1 $$
0
votes
1answer
24 views

Let $n$ be an integer, prove that $\lfloor n/2 \rfloor \geq (n-1)/2$

So far, I used the definition of floors to provide an interval. Then I did some algebra in order to get $(n-1)/2$. And I am able to deduce that $\lfloor n/2 \rfloor > (n-1)/2$, but now I'm stuck on ...
0
votes
0answers
30 views

Calculate the floor-function of the expression

Let n be a positive integer and x a real number with x $\ge$ $\frac {3n^2+1}{3}$. Calculate $\lfloor \sqrt{x^2-nx}+\sqrt{x^2-n^2}+\sqrt{x^2+n^2}-3x \rfloor$, where $\lfloor t \rfloor$ is the usual ...
0
votes
0answers
21 views

Calculating the Mean of a Range with Floor and Ceiling Functions?

I did a survey a couple months back, and one of the questions required a range of numbers. I may have discovered my own formula for how to calculate the mean of a range of numbers, but I don't know ...
0
votes
0answers
27 views

Floor Summation Closed Form?

Let $ a_1,a_2,a_3,...a_n $ be a set of positive integers. Does there exist any closed form for the approximation of the sum $$ \sum_{i=p}^n\operatorname{floor}\left(\frac{a_p}{i-p+1}\right) ?$$ If ...
5
votes
2answers
113 views

Find sum $ \sum\limits_{k=2}^{2^{2^n}} \frac{1}{2^{\lfloor \log_2k \rfloor} \cdot 4^{\lfloor \log_2(\log_2k )\rfloor}} $

Calculate sum $$ \sum_{k=2}^{2^{2^n}} \frac{1}{2^{\lfloor \log_2k \rfloor} \cdot 4^{\lfloor \log_2(\log_2k )\rfloor}} $$ I hope to solve this in use of Iverson notation: my try $$ \sum_{k=2}^{2^{2^...
0
votes
1answer
53 views

Reasoning with fractional parts and the Möbius function.

Let $S(p_k,x)$ be the set of all elements $s$ where $s \le x$ and gcd$(s,p_k\#)=1$ where $p_k$ is the $k$th prime and $p_k\#$ is the primorial for $p_k$. Let $|S(p_k,x)|$ be the count of elements in $...