Direct vs Contradiction Proof: For any odd integer n, prove that $\lfloor n^2/4 \rfloor = (n^2-1)/4$.

162 Views Asked by At

To start things off, I was assigned a "homework" (wait, hear me out first) to use direct proof and proof on contradiction for the following:

For any odd integer n, prove that $\lfloor n^2/4 \rfloor = (n^2-1)/4$.

(I has modified the question to something similar, so this is not my homework question)

Direct proof is easy, just sub $n = 2a+1$ to get the right hand side.

But for proof of contradiction, would it be considered correct to do the same thing?

For example, we assume that $\lfloor n^2/4 \rfloor \neq (n^2-1)/4$, then fit in $n=2a+1$ to both sides, and prove that they are equals.

Or should I instead derive $\lfloor n^2/4 \rfloor = (n^2-1)/4 + x$ from the assumption, derive the properties of x, and disprove these properties of x?