116k views
3 votes
Prove that floor(n/2)ceil(n/2)=floor(n^2/4) for all integers n.

1 Answer

2 votes

Final answer:

To prove that floor(n/2)ceil(n/2) is equal to floor(n^2/4) for any integer n, we show that this holds true for both even and odd values of n by considering n as 2k and 2k+1 respectively, and demonstrating that the expressions simplify to the same value in either case.

Step-by-step explanation:

To prove that floor(n/2)ceil(n/2) = floor(n^2/4) for all integers n, we need to consider two cases, one where n is even and one where n is odd.

If n is even, n can be expressed as 2k for some integer k. The floor and ceiling of n/2 are then both k, so the left side of the equation becomes k * k or k^2. Since n^2/4 in this case is (2k)^2/4, it simplifies to k^2, which is exactly the floor of n^2/4 because k^2 is already an integer.

For odd n, write n as 2k + 1 where k is an integer. The floor of n/2 is k and the ceiling is k + 1. Multiplying these together gives us k(k + 1) = k^2 + k. The right side of the equation, n^2/4, is ((2k + 1)^2)/4 which simplifies to (4k^2 + 4k + 1)/4. When we take the floor of this expression, we ignore the +1/4 since the floor function takes us to the nearest lower integer, resulting in k(k + 1) or k^2 + k, which matches our left-hand side.

In both cases, whether n is even or odd, the expressions on both sides of the equation match, thus proving the given identity.

User Syam Mohan M P
by
8.5k points