Can You Prove the Floor Function Relationship for Positive Integers?

In summary, the floor function, also known as the greatest integer function, rounds down a real number to the nearest integer. The Floor function Challenge is a programming exercise that tests one's ability to implement this function, and it has various applications in mathematics, computer science, and physics. The floor function is different from the ceiling function, which rounds a number up to the nearest integer. Some common mistakes when implementing the floor function include incorrect handling of negative numbers and using the wrong rounding method.
  • #1
juantheron
247
1
For any positive integer $n\;,$ prove that$\sqrt{4n+1}<\sqrt{n}+\sqrt{n+1}<\sqrt{4n+2}$.

Hence or otherwise, prove that $\left\lfloor{\sqrt{n}+\sqrt{n+1}}\right\rfloor=\left\lfloor{\sqrt{4n+1}}\right\rfloor$

for any positive integer $n$.
 
Mathematics news on Phys.org
  • #2
jacks said:
For any positive integer $n\;,$ prove that$\sqrt{4n+1}<\sqrt{n}+\sqrt{n+1}<\sqrt{4n+2}$.

Hence or otherwise, prove that $\left\lfloor{\sqrt{n}+\sqrt{n+1}}\right\rfloor=\left\lfloor{\sqrt{4n+1}}\right\rfloor$

for any positive integer $n$.

we realize that $n(n+1) = (n+\dfrac{1}{2})^2 - \dfrac{1}{4}$

so $\sqrt{n(n+1)}\lt(n+\dfrac{1}{2})$

clearly $n\lt\sqrt{n(n+1)}$



so

we have

$(\sqrt{n} + \sqrt{n+1})^2 = n + n+ 1 + 2 \sqrt{n(n+1)}$

= $2n +1 + 2 \sqrt{n(n+1)}$

>$2n+ 1 + 2 n$ or > $4n+ 1$

and = $2n +1 + 2 \sqrt{n(n+1)}$ < $2n +1 + 2 (n + \dfrac{1}{2})$

or < (4n + 2)

so $(4n+1)\lt(\sqrt{n} + \sqrt{n+1})^2\lt(4n+2)$

because 4n+2 is not a perfect square

we have $\lfloor(\sqrt{4n+1}\rfloor = \lfloor(\sqrt{4n+2}\rfloor$

and as $ (\sqrt{n} + \sqrt{n+1})^2$ is between 4n + 1 and 4n +2 we have

$\lfloor(\sqrt{4n+1}\rfloor = \lfloor(\sqrt{4n+2}\rfloor= \lfloor(\sqrt{n} +\sqrt{n+1}\rfloor$
 
  • #3
Thank U kali. Nice solution

My solution is same as you.

Left inequality :: $\displaystyle R = \frac{\sqrt{n} + \sqrt{n+1}}{\sqrt{4n + 1}}$

Squaring the fraction gives:

$\displaystyle R^2 = \frac{2n + 1 + 2\sqrt{n^2 + n}}{4n + 1}$

$\displaystyle R^2 = \frac{2n + 1}{4n + 1} + \frac{2\sqrt{n^2 + n}}{4n + 1}$

Replacing $n^2 + n$ with $n^2$ (which is smaller) gives:

$\displaystyle R^2 > \frac{2n + 1}{4n + 1} + \frac{2n}{4n + 1}$

$\displaystyle R^2 > \frac{4n + 1}{4n + 1}$

$R^2 > 1$

Therefore, $\displaystyle \sqrt{n} + \sqrt{n+1} > \sqrt{4n + 1}$

Right inequality :: Now, let $\displaystyle R = \frac{\sqrt{n} + \sqrt{n+1}}{\sqrt{4n + 2}}$. Again, squaring yields:

$\displaystyle R^2 = \frac{2n + 1 + 2\sqrt{(n)(n+1)}}{4n + 2}$

This time, replace $n(n+1)$ with $(n+\frac{1}{2})^2$, which is bigger (the factors have the same sum, and the biggest product for two numbers with the same sum is when the factors are the same - or just expand $n(n+1) - (n + \frac{1}{2})^2$ to get a convenient negative constant). This gives:

$\displaystyle R^2 < \frac{2n + 1 + 2n + 1}{4n + 2}$

$\displaystyle R^2 < \frac{4n + 2}{4n + 2}$

$R^2 < 1$

Therefore, $\displaystyle \sqrt{n} + \sqrt{n + 1} < \sqrt{4n + 2}$.

Lemma: the numbers $\sqrt{4n + 1}$ and $\sqrt{4n + 2}$ do not have an integer "strictly" in between them. That is to say, there is no integer $k$ such that $\sqrt{4n + 1} < k < \sqrt{4n + 2}$.

Semi-Proof: The two numbers are the square roots of consecutive positive integers, so they are two neighboring numbers in the list $\sqrt{1}, \sqrt{2}, \sqrt{3}, ...$. Every positive integer is on this list, but clearly no two integers are next to each other on this list, since the integers in this list start off "close" and only appear less often as you go up the list.

Thus, there is some integer $k$ for which $k \le \sqrt{4n + 1} < \sqrt{4n + 2} \le k + 1$. Putting our other expression in, we have:

$k \le \sqrt{4n + 1} < \sqrt{n} + \sqrt{n+1} < \sqrt{4n + 2} \le k + 1$

By definition, $\displaystyle \lfloor \sqrt{4n + 1}\rfloor = k$, and $\lfloor \sqrt{n} + \sqrt{n+1}\rfloor = k$, so they have the same floor.
 
Last edited by a moderator:

Related to Can You Prove the Floor Function Relationship for Positive Integers?

1. What is the floor function?

The floor function, also known as the greatest integer function, takes a real number as input and rounds it down to the nearest integer.

2. What is the purpose of the Floor function Challenge?

The Floor function Challenge is a programming exercise that tests one's ability to write a function that implements the floor function. It also helps in understanding the concept of rounding down real numbers to integers.

3. What are some applications of the floor function?

The floor function has various applications in fields such as mathematics, computer science, and physics. It is used in algorithms, data analysis, and calculating floor division in programming languages.

4. How is the floor function different from the ceiling function?

The ceiling function, also known as the least integer function, rounds a real number up to the nearest integer. The floor function rounds the number down to the nearest integer. For example, the floor of 3.5 is 3, while the ceiling of 3.5 is 4.

5. What are some common mistakes when implementing the floor function?

One common mistake is forgetting to handle negative numbers correctly. The floor of -3.5 is -4, not -3. Another mistake is using the incorrect rounding method. The floor function always rounds the number down, regardless of its decimal value.

Similar threads

Replies
1
Views
790
Replies
9
Views
2K
Replies
3
Views
869
Replies
2
Views
1K
  • General Math
Replies
1
Views
783
Replies
2
Views
1K
Replies
3
Views
1K
Replies
9
Views
2K
Replies
2
Views
927
  • General Math
Replies
3
Views
1K
Back
Top