Can you prove the Floor Function Challenge?

In summary, the Floor Function Challenge is a mathematical problem that involves finding the largest integer less than or equal to a given real number. It is represented using the notation "⌊x⌋" or "floor(x)" and can be used with both positive and negative numbers. The floor function is different from the ceiling function, which rounds numbers up to the nearest integer. A common application of the Floor Function Challenge is in computer programming and other mathematical and scientific calculations.
  • #1
anemone
Gold Member
MHB
POTW Director
3,883
115
Prove \(\displaystyle \sum_{k=1}^{n}\left\lfloor{\left(\frac{k}{2}\right)^2}\right\rfloor=\left\lfloor{\dfrac{n(n+2)(2n-1)}{24}}\right\rfloor\).
 
Mathematics news on Phys.org
  • #2
anemone said:
Prove \(\displaystyle \sum_{k=1}^{n}\left\lfloor{\left(\frac{k}{2}\right)^2}\right\rfloor=\left\lfloor{\dfrac{n(n+2)(2n-1)}{24}}\right\rfloor\).
I shall prove the same for n even
we have for k even

$\lfloor (\dfrac{k}{2})^2 \rfloor = (\dfrac{k}{2})^2\cdots(1)$ because $ (\dfrac{k}{2})$ is integer

further we have for k odd say (2m-1)

$\lfloor (\dfrac{k}{2})^2 \rfloor$

= $\lfloor (\dfrac{2m-1}{2})^2 \rfloor$

= $\lfloor \dfrac{4m^2-4m +1}{4} \rfloor$

= $\lfloor m^2-m + \dfrac{1}{4} \rfloor$

= $m^2-m$so summing the given expression from k = 1 to n breaking into even part and odd part we get

$\sum_{k=1}^{n}\left\lfloor{\left(\frac{k}{2}\right)^2}\right\rfloor$

= $\sum_{k=1}^{\frac{n}{2}}\left\lfloor{\left(\frac{2k-1}{2}\right)^2+ \left(\frac{2k}{2}\right)^2}\right\rfloor$ justified to merge the 2 because 2nd expression is integer

= $\sum_{k=1}^{\frac{n}{2}}{k^2-k+ k^2}$

= $\sum_{k=1}^{\frac{n}{2}}{2k^2-k}$

= $2 * \dfrac{\frac{n}{2}\cdot(\frac{n}{2}+1)\cdot(n+1)}{6}- \dfrac{\frac{n}{2} \cdot (\frac{n}{2}+1)}{2}$

= $\dfrac{n\cdot(n+2)\cdot(n+1)}{12}- \dfrac{n\cdot(n + 2)}{8}$

= $n\cdot(n+2)(\dfrac{2n-1}{24})$

= $\dfrac{n\cdot(n+2)\cdot(2n-1)}{24}$



becuase above is integer ( being sum of integers) hence same as $\lfloor \dfrac{n\cdot(n+2)\cdot(2n-1)}{24}\rfloor $

hence the result
 
  • #3
kaliprasad said:
I shall prove the same for n even
we have for k even

$\lfloor (\dfrac{k}{2})^2 \rfloor = (\dfrac{k}{2})^2\cdots(1)$ because $ (\dfrac{k}{2})$ is integer

further we have for k odd say (2m-1)

$\lfloor (\dfrac{k}{2})^2 \rfloor$

= $\lfloor (\dfrac{2m-1}{2})^2 \rfloor$

= $\lfloor \dfrac{4m^2-4m +1}{4} \rfloor$

= $\lfloor m^2-m + \dfrac{1}{4} \rfloor$

= $m^2-m$so summing the given expression from k = 1 to n breaking into even part and odd part we get

$\sum_{k=1}^{n}\left\lfloor{\left(\frac{k}{2}\right)^2}\right\rfloor$

= $\sum_{k=1}^{\frac{n}{2}}\left\lfloor{\left(\frac{2k-1}{2}\right)^2+ \left(\frac{2k}{2}\right)^2}\right\rfloor$ justified to merge the 2 because 2nd expression is integer

= $\sum_{k=1}^{\frac{n}{2}}{k^2-k+ k^2}$

= $\sum_{k=1}^{\frac{n}{2}}{2k^2-k}$

= $2 * \dfrac{\frac{n}{2}\cdot(\frac{n}{2}+1)\cdot(n+1)}{6}- \dfrac{\frac{n}{2} \cdot (\frac{n}{2}+1)}{2}$

= $\dfrac{n\cdot(n+2)\cdot(n+1)}{12}- \dfrac{n\cdot(n + 2)}{8}$

= $n\cdot(n+2)(\dfrac{2n-1}{24})$

= $\dfrac{n\cdot(n+2)\cdot(2n-1)}{24}$



becuase above is integer ( being sum of integers) hence same as $\lfloor \dfrac{n\cdot(n+2)\cdot(2n-1)}{24}\rfloor $

hence the result
now based on result of even we prove for odd ( last n-1 terms + nth term , n is odd)
we have shown that for k odd = 2m- 1
$\lfloor (\dfrac{k}{2})^2 \rfloor$
= $\lfloor (\dfrac{2m-1}{2})^2 \rfloor$
= $\lfloor \dfrac{4m^2-4m +1}{4} \rfloor$
= $\lfloor m^2-m + \dfrac{1}{4} \rfloor$
= $m^2-m$
= $m(m-1)$
= $\dfrac{n+1}{2} \dfrac{n-1}{2}$
= $\dfrac{n^2-1}{4}$Now sum upto n terms

= $sum_{k=1}^{n}\left\lfloor{\left(\frac{k}{2}\right)^2}\right\rfloor$
= $(sum_{k=1}^{n-1}\left\lfloor{\left(\frac{k}{2}\right)^2}\right\rfloor)+ \left\lfloor{\left(\frac{n}{2}\right)^2}\right\rfloor$
= $\dfrac{(n-1)(n+1)(2n-3)}{24} + \dfrac{n^2-1}{4}$ (sum upto n-1 terms n-1 even taken care)
= $\dfrac{(n-1)(n+1)(2n-3)+6n^2-6}{24}$
= $\dfrac{(n^2-1)(2n-3)+6n^2-6}{24}$
= $\dfrac{2n^3-3n^2-2n + 3+6n^2-6}{24}$
= $\dfrac{2n^3+ 3n^2-2n - 3}{24}$
= $\dfrac{n(2n^2 + 3n-2) - 3}{24}$
= $\dfrac{n(n+2)(2n-1)}{24} -\dfrac{1}{8}$
= $\lfloor \dfrac{n(n+2)(2n-1)}{24} \rfloor$
 
  • #4
Thank you kaliprasad for your solution, very well done! My approach is more or less the same as yous, just so you know. :)
 

1. What is the Floor Function Challenge?

The Floor Function Challenge is a mathematical problem that involves finding the largest integer less than or equal to a given real number. It is often used in computer programming and can be solved using the floor function, which rounds down a number to the nearest integer.

2. How is the floor function represented in mathematical notation?

The floor function is represented using the notation "⌊x⌋" or "floor(x)", where x is the number being rounded down. It can also be written as "int(x)" or "integer(x)".

3. Can the floor function be used with negative numbers?

Yes, the floor function can be used with both positive and negative numbers. When applied to a negative number, the floor function will round the number down to the nearest integer, which is closer to negative infinity.

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

The floor function rounds numbers down to the nearest integer, while the ceiling function rounds numbers up to the nearest integer. For example, the floor of 3.5 would be 3, while the ceiling of 3.5 would be 4.

5. What is a common application of the Floor Function Challenge?

The Floor Function Challenge is commonly used in computer programming to solve problems that involve rounding down to the nearest integer. It can also be used in various mathematical and scientific calculations where precise integer values are required.

Similar threads

Replies
9
Views
2K
Replies
4
Views
849
Replies
1
Views
730
Replies
1
Views
955
  • Linear and Abstract Algebra
Replies
2
Views
1K
Replies
9
Views
2K
Replies
2
Views
1K
Replies
1
Views
1K
Replies
4
Views
1K
Replies
2
Views
2K
Back
Top