[Math] Let k be an integer. Disprove: “The equation $x^2 − x − k = 0$ has no integer solution if and only if $k$ is odd.”

diophantine equationselementary-number-theoryproof-verificationquadratics

My problem is I keep ending up proving the statement true, instead of disproving it. I was getting it mixed up in my mind so I broke it down into very explicit steps but now I'm wondering if I'm overthinking it?

I started out proving that if there is no integer solution, then k is even (one negation of the statement, $P$ and not $Q$ where $P = \text{ no integer solution and } Q = k \text{ is odd}$). By contrapositive I try to prove that if $k$ is odd then there is an integer solution (I quickly recognized this is the same as the other negation, $Q$ and not $P$, so this is the only thing I need to prove).

So $k = 2n + 1$ for any integer $n$. Then $x^2-x -(2n+1) = 0$. So $x^2-x=2n+1$. But if $x$ is an integer then $x^2-x$ must always be even, and cannot equal an odd integer $2n+1$. So this has led to a contradiction, which means I just proved that if k is odd then there is no integer solution.

Is my logic off somewhere, or should I be approaching it differently? Sorry if this has an obvious answer, I only started doing proofs this quarter. Thanks

Best Answer

You seem to be struggling with the logic involved here. The statement is $$ k\text{ is odd}\iff x^2-x-k=0\text{ has no integer solutions} $$ Yes, it seems that making $k$ odd makes the equation have no integer solutions (in other words, the $\implies$ direction is true). Your proof of this looks fine.

However, the statement also claims that if there are no integer solutions, then $k$ is odd (the $\Longleftarrow$ direction). The contrapositive of this claim is that making $k$ even will always result in an integer solution. This is disproven by providing a single counterexample.