Stack Exchange Network

Stack Exchange network consists of 174 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).

1
vote
1answer
24 views

Equivalence between ceil and floor functions

I was reading heap data structures from various sources. They used to explain heap as stored in array. One source has array starting at index 0. Other has it starting at 1. They specify different ...
-4
votes
1answer
55 views

How can I prove that $3 \le \dfrac {\lfloor a×\pi\rfloor} a \lt4$? [on hold]

How can I prove that $3 \le \dfrac {\lfloor a×\pi\rfloor} a \lt4$? I need this to solve an Ukraine Math Olympiad $1999$ problem.
0
votes
0answers
23 views

Proving multiplication floor functions

If x, y is bigger than zero (I mean real numbers bigger than 0.) Then why does this always works? [x][y]<=[xy]<([x]+1)([y]+1) <= means less or equal to [] brackets are floor function
-1
votes
3answers
40 views

Why is $\left\lfloor\frac{\lfloor a\pi\rfloor}{a}\right\rfloor=3$ for $a>0$?

Why is this true? $$\left\lfloor\frac{\lfloor a\pi\rfloor}{a}\right\rfloor=3 \text{, for } a>0$$ I need this to solve the Ukraine Math Olymipiad 1999. "$\lfloor\cdot\rfloor$" indicates the floor ...
0
votes
3answers
42 views

how to find the closest year that had the exact same calendar as a given year - equations involving floor

2019 has the exact same calendar (i.e. all days of the week coincide) as 2013. I noticed this by simply looking at the actual printed out calendars. However, this made me wonder how to calculate in ...
1
vote
1answer
30 views

Is it possible to represent this function as a polynomial, by removing the ceiling function?

I've been working through a derivation and have arrived at the following expression: $$E = 1 - \frac{x}y \left( \bigg\lceil \dfrac{x}{y} \bigg\rceil \right)^{-1}$$ where $x,y \in \mathbb{R^+}$. I ...
3
votes
2answers
39 views

Prove that $N - \lfloor{N/p}\rfloor = \lfloor{\frac{p-1}{p}\left({N + 1}\right)}\rfloor$ for positive $N$ and prime $p$

I am counting the number of positive integers less than or equal to some positive integer $N$ and not divisible by some prime $p$. This gets generalized for $k$ primes where I use the principle of ...
1
vote
2answers
47 views

Can this be solved to remove the floor function and simplify the answer?

I've been working through a derivation and have arrived at the following exprssion: $$E = 1 - \frac{x}y \left( \bigg\lfloor \dfrac{2x+yx-2}{2y} \bigg\rfloor \right)^{-1}$$ where $x,y \in \mathbb{R^+...
4
votes
5answers
72 views

Algebraic Closed Form for $\sum_{n=1}^{k}\left( n- 3 \lfloor \frac{n-1}{3} \rfloor\right)$

Let's look at the following sequence: $a_n=\left\{1,2,3,1,2,3,1,2,3,1,2,3,...\right\}$ I'm trying to calculate: $$\sum_{n=1}^{k} a_n$$ Attempts: I have a Closed Form for this sequence. $$...
0
votes
1answer
29 views

Understanding Binomial coefficient with floored terms

I was reading through the notation used in a paper on arxiv.org when I came across this on page 6: $[x]$ the floor of $x$ $\{x\}$ the sawtooth function of $x$. That is $\{x\} = x - [x]$ $\begin{...
1
vote
2answers
64 views

Is my approach correct to this equation?

The problem is the following: Does $a \in \mathbb{R}$ exist such that $[a + \sqrt{2n + 1}] = [a + \sqrt{2n + 2}]$ for all $n \in \mathbb{N}$? ($[x]$ denotes the whole part of $x$). Note: I will ...
1
vote
0answers
14 views

Double sum over $\left\lfloor{ac+bd\over k}\right\rfloor$

We have $$\left\lfloor{ac+bd\over k}\right\rfloor-\left\lfloor{ac+bd-1\over k}\right\rfloor=1-\left\lceil{ (ac+bd)\mod{k}\over k}\right\rceil$$ for $a,b,c,d,k$ - integers, $a\geqslant0$, $b\geqslant0$,...
2
votes
1answer
31 views

Injectivity of $f(x) = x + [x/2]$, and finding an explicit inverse

Context: This question comes up as a tangent to an earlier MSE question from today. The OP of this question was, in effect, seeking an explicit inverse to the function $$f(x) = x + \left[ \frac{x}{2}...
0
votes
0answers
21 views

Identity involving floor, ceiling and nearest integer functions

For $n\geqslant0$, $m>0$, $s>t\geqslant0$, $n,m,s,t$ - integers we have $$\sum\limits_{k=0}^{m-1}\left\lfloor{n+ks+t\over ms}\right\rfloor=\left\lfloor{n+t\over s}\right\rfloor$$ $$\sum\limits_{...
-1
votes
1answer
28 views

Prove that if $nm ≤ nx < nm + n $, where $ n,m ∈ ℤ $ and $ x ∈ ℝ$, then there exists …

Prove that if $nm ≤ nx < nm + n $, where $ n,m ∈ ℤ $ and $ x ∈ ℝ$, then there exists $j$ such that $j ∈ ℤ$ and $0≤ j <n$ for which $ nm+j≤ nx <nm+j+1 $. I'm trying to prove Hermite's ...
-4
votes
1answer
36 views

Prove that $a∈N$ is an n digit number where $n = ⌊log(a)⌋ + 1$ [closed]

Dont know how to proceed with this question. Here log means log to base 10.
2
votes
3answers
255 views

Compute $\lim_{x\to\infty} x \lfloor \frac{1}{x} \rfloor$

I'm working out a limit and I'm not sure if my assumption is considered rigorous $$\lim_{x\to\infty} x\left\lfloor\frac1x\right\rfloor$$ I supposed that $0\leq x\left\lfloor\frac1x\right\rfloor \leq \...
1
vote
1answer
58 views

Floor equation $\lfloor 3x-x^2 \rfloor = \lfloor x^2 + 1/2 \rfloor$

Solve the equation: $$\left \lfloor 3x-x^2 \right \rfloor = \left \lfloor x^2 + 1/2 \right \rfloor$$ In the solution it writes We notice that $x^{2}+\frac{1}{2}> 0$ therfore $\left \...
1
vote
5answers
60 views

Apostol's Calulus: Prove that $[x+y] = [x]+[y]$ or $[x]+[y]+1$, where $[·]$ is the floor function.

Prove that $[x+y] = [x]+[y]$ or $[x]+[y]+1$, where $[·]$ is the floor function I'm Having a little bit of trouble with the last part of this proof. First, I will use the definition of floor ...
1
vote
2answers
68 views

Calculating $\lim_{x \to 0}{\frac{ \lfloor x \rfloor}{\lfloor x \rfloor}}$

My question is about $$\lim_{x \to 0}{\frac{ \lfloor x \rfloor}{\lfloor x \rfloor}}$$ where the notation is the floor function. I've graphed it and it is 1 everywhere except for $[0, 1)$. So, I ...
0
votes
1answer
39 views

Find the global min of $\lfloor{(1/2)(\lfloor{N/p}\rfloor+3-\sqrt{(\lfloor{N/p}\rfloor+1)^2-4N})}\rfloor$

Denote this function as ${a}_{l}$. Here $p$ is prime but not necessary for the solution, just $p \ge 2$ is needed. This solution is for fixed $p$ with $N$ allowed to vary. Now a plot of this ...
0
votes
1answer
20 views

Proving that $\lfloor{i/2^h}\rfloor = \lfloor \lfloor\cdots \lfloor i/2\rfloor/2\cdots\rfloor/2\rfloor$

I am trying to prove that $$\left\lfloor{\frac{i}{2^h}}\right\rfloor$$ equals to performing a series of $h$ operations of $$\left\lfloor\frac{\left\lfloor\frac{\left\lfloor\frac{i}{2}\right\rfloor}{2}\...
1
vote
2answers
43 views

Prove that $\lfloor \sqrt{(p-1)p} \rfloor = p - 1$ and likewise $\lceil \sqrt{(p-1)p} \rceil = p$.

Here $p$ is prime but is not necessary for the problem just that $p \ge 0$. I suspect that a statement like $p-1 \le \sqrt{(p-1)p} \le p$ would be the case but I am not certain how to establish this ...
2
votes
3answers
211 views

Show that $g(x)=[\frac1x]\sin x$ has a limit in $x=0$.

Show that $g(x)=\left[\frac1x \right]\sin x$ has a limit in $x=0$. ( $[1/x]$ as greatest integer less than or equal to $1/x$) I tried to use squeeze theory to find the limit of this function, but I ...
-4
votes
1answer
76 views

What is $\int \lfloor x^n \rfloor dx$ where $n$ is any real number?

I've been trying to figure out a general rule for integrating functions of the form $\lfloor x^n \rfloor$. I don't have any ideas other than trying some kind of clever substitution but I have no idea ...
3
votes
4answers
194 views

Closed form of $\int{\lfloor{x}\rfloor}dx$

I calculated $\int{\lfloor{x}\rfloor}dx$ and i got this result: $$\int{\lfloor{x}\rfloor}dx = \frac{x^2-x}{2}+\sum_{k=1}^{\infty}\left(\frac{\sin(k\pi x)}{k\pi}\right)^2+c$$ Do you know if this series ...
1
vote
2answers
37 views

Find a necessary and sufficient condition

Let $(a_n)_{n=1}^\infty$ be a real sequence. Find a necessary and sufficient condition for $(a_n)$ so $(\lfloor a_n \rfloor)_{n=1}^\infty$ converges to $0$. Hi everyone. I am trying to brush up on ...
1
vote
1answer
110 views

summation of floor function involving prime number

Can you give me some hints on solving following summation. Is there any theory concerning the following summation? $p$ is a prime number > 2 $$\sum_{s=2}^{p-1}\left(\left\lfloor\frac{p}{s}\right\...
1
vote
1answer
56 views

Does $\left\lfloor\dfrac{x^2+x}{i}\right\rfloor - \left\lfloor\dfrac{x^2}{i}\right\rfloor = \left\lfloor\dfrac{x}{i}\right\rfloor$?

Does $\left\lfloor\dfrac{x^2+x}{i}\right\rfloor - \left\lfloor\dfrac{x^2}{i}\right\rfloor = \left\lfloor\dfrac{x}{i}\right\rfloor$? where $i \le x^2$ and $x$ are any positive integer. Intuitively, ...
1
vote
1answer
131 views

Algorithm for finding sequence verifying a floor equation

We are looking for an algorithm solving the following problem. Given a sequence $ 0 < x_1< \dots < x_n $ find a sequence $0 < y_1 < \dots < y_n$ such that $\forall j \in \{2, \dots, ...
2
votes
1answer
38 views

Limit of a sequence with floor function.

How do I compute the following limit: $\lim \limits_{n \to \infty} \frac{n + \lfloor \sqrt[3]n\rfloor^3}{n - \lfloor \sqrt{n+9}\rfloor}$ Without the floor function this would be simple, but I never ...
1
vote
0answers
42 views

Mircea Merca's conjecteture

Mircea Merca conjectured that $$\left \lfloor{\frac{1}{n}\sum_{k=1}^n\sqrt{k}}\right \rfloor=\left \lfloor{\left(\frac{2}{3}+\frac{1}{6n}\right)\sqrt{n+1}}\right \rfloor$$ John Zacharias claimed that ...
0
votes
0answers
24 views

Divisor sum simplification

How does this : $$D(n)=\displaystyle\sum\limits_{i=1}^n i \left\lfloor\frac{n}{i}\right\rfloor$$ become $$D(n)=\displaystyle\sum\limits_{i=1}^{n/(u+1)} i \left\lfloor\frac{n}{i}\right\rfloor + \sum_{d=...
0
votes
1answer
32 views

Calculating $\sum_{k=0}^{\lfloor \frac{p}{2} \rfloor} \binom{p}{k}$

I'm trying to find the value of: $$\sum_{k=0}^{\left \lfloor \frac{p}{2} \right \rfloor} \binom{p}{k}$$ For even and odd $p$, the indication I was given suggests writing it as $$\frac{1}{2}\left (\...
1
vote
1answer
25 views

Constructing a 2-periodic extension of the absolute value function using floor and ceiling functions

I am trying to use floor and ceiling functions to construct a 2-periodic extension of the function $f(x) = |x|, -1 \leq x \leq 1$. Through trial an error I have been able to show that: $f(x) = 1 - \...
0
votes
0answers
18 views

For $s, t \in \{-\lfloor (n-1)/2 \rfloor, \dots, -1, 0, 1, \dots, \lfloor n/2 \rfloor \}$, $n \in \mathbb{Z}_{ > 0}$, show $s-t \neq \ell n$

This is an intermediate step to a problem that I don't know how to prove. For the record, I am not certain that this is true. For any $s, t \in \{-\lfloor (n-1)/2 \rfloor, \dots, -1, 0, 1, \dots, \...
2
votes
0answers
63 views

Calculate the number of nonnegative integer solutions of $ax+by\leq c$.

If $a$, $b$, and $c$ are known, and $x$ and $y$ are integers greater than or equal to zero, how many possible values of ($x$, $y$) exist that satisfy the equation $$ax + by \le c\,?$$ I have ...
0
votes
0answers
25 views

Non-linear congruence with two variables

Find all pairs $(m,n)$ of positive integers such that $$\left\lfloor\frac{178^m}{1117}\right\rfloor\equiv178n\pmod{1116}.$$ Obviously, the congruence has a solution iff $\left\lfloor178^m/1117\...
1
vote
2answers
43 views

Equivalence relation with the floor function

Let us consider a function $f:\ \Bbb{R}\ \longrightarrow\ \Bbb{R}$ and we define the equivalence relation $\sim$ on $\Bbb{R}$ such that: $$x\ \sim\ y\qquad\Leftrightarrow\qquad f(x)=f(y).$$ Note: ...
0
votes
1answer
30 views

Is it possible to show that $a\cdot a^{\lfloor\frac{b}{2}\rfloor}\cdot a^{\lfloor\frac{b}{2}\rfloor} = a^b$ when $b$ is odd

I have $a$ and $b$ and $b$ is odd $a$ is an integer and $b$ is a strictly positive integer. Is there a way I can show: $a\cdot a^{\lfloor\frac{b}{2}\rfloor}\cdot a^{\lfloor\frac{b}{2}\rfloor} = a^b$ ...
1
vote
1answer
65 views

Proof for Natural number Identities

I am now trying to find proof for the following, which are significant to establishing proof for the Prime number relation that was originally stated in the question I posted here: $$\Bigl \lfloor \...
2
votes
3answers
134 views

Proving If $k \le \left\lfloor \frac{n}{2} \right\rfloor$ then $\binom{n}{k-1} < \binom{n}{k}$

So I'm trying to do a proof for this problem: If $\displaystyle{k \le \left\lfloor \frac{n}{2} \right\rfloor}$ then $$\displaystyle{\binom{n}{k-1} < \binom{n}{k}}$$ I can do it algebraically but ...
0
votes
0answers
21 views

Inequality involving $\text{floor}(x)$ [duplicate]

I'm trying to prove the following inequality $\forall x,y \in \mathbb R$ : $$\lfloor x \rfloor + \lfloor x + y \rfloor + \lfloor y \rfloor \le \lfloor 2x \rfloor + \lfloor 2y \rfloor$$ If one thing ...
-1
votes
2answers
88 views

Prove that $\lfloor x \rfloor +\lfloor 2x \rfloor + \dots +\lfloor 32x \rfloor =12345$ has no solution [closed]

Given that $\lfloor x \rfloor +\lfloor 2x \rfloor + \dots +\lfloor 32x \rfloor =12345$ where $\lfloor x \rfloor $ denotes the floor function, prove that there is no $x$ that satisfies the equation.
6
votes
1answer
86 views

Find $\sum_{n=1}^\infty\frac{2^{f(n)}+2^{-f(n)}}{2^n}$, where $f(n)=\left[\sqrt n +\frac 12\right]$ denotes greatest integer function

Question: Let $f(n)=\left[\sqrt n +\dfrac 12\right]$, where $[\cdot]$ denotes greatest integer function, $\forall n\in \Bbb N$. Then, $$\sum_{n=1}^\infty\frac{2^{f(n)}+2^{-f(n)}}{2^n}={\color{red}?...
0
votes
0answers
14 views

Properties of the floor function for $a\left \lfloor{\frac{x+b}{c}}\right \rfloor$

Is there a way to split the following floor function setup into two separate terms with the x in one term and the c in another term? Such as: $a\left \lfloor{\frac{x+b}{c}}\right \rfloor$ = $a\left \...
-1
votes
1answer
34 views

Describe the sequence $2,2,1,0,0,1,2,2,…$ using the floor function

Is there a way to describe the sequence $2,2,1,0,0,1,2,2,1,0,0,1,2,2...$ by using the floor function? I can describe the series using a sinusoidal function but wanted to get it in terms of a floor ...
1
vote
1answer
39 views

Difference of 2 floors vs floor of difference

Good day, we are currently covering basic principles for algorithm optimisation and we were tasked with explaining the following problem. Assume $x,y \in \Bbb R$. How much can the following two ...
0
votes
4answers
94 views

Disprove the following statement: For all real numbers $x$ and $y$, if $x + \lfloor x \rfloor = y + \lfloor y \rfloor$ then $x = y$.

Disprove the following statement: For all real numbers $x$ and $y$, if $x + \lfloor x \rfloor = y + \lfloor y \rfloor$ then $x = y$. Aka: Prove the negation: There are real numbers $x$ and $y$, that $...
2
votes
2answers
55 views

How to represent $x^y$ = [Integer] + [Remainder]?

For example: $5^{\frac{1}{2}} = 2.23606\ldots = 2 + 0.23606\ldots$ Can we do this for $x^y$ in general? Motivation: a way of expressing the floor, $ \lfloor x^y\rfloor $, of an exponential $x^y$ ...