# prove that an integer a is odd if and only if it can be written as a sum of two consecutive integers

Can someone please revise my proof.

(->)

Let $a$ and $x$ be arbitrary integers. Assume $a$ is odd so there exists an integer $k$ s.t $a = 2k + 1$. $a = 2k + 1 = k + k + 1= k + (k+1)$ , evidently $a$ is the sum of two consecutive integers.

(<-)

Let $a$ be the sum of two consecutive integers. $a = x + (x+ 1) = 2x + 1$. by def. of odd, $a$ must be odd.

• What is your definition of "odd"? – user7530 Feb 19 '15 at 0:56
• Write your assumptions for reverse direction. Say let $a\in\mathbb{Z}$ and assume that $a$ can be written as the sum of two consecutive integers. It follows that $a=k+(k+1)$ where $k\in\mathbb{Z}$... And from there the rest of your proof is correct. The foward direction looks fine to me. – user60887 Feb 19 '15 at 0:57
• Assuming the definition of "odd" is "of the form $2k+1$." If it's "not divisible by two" there is a small step missing, as for instance not every element of $\mathbb{Z}[x]$ that's indivisible by 2 is of the form $2k+1$. – user7530 Feb 19 '15 at 0:59

It's logically fine, but stylistically, it doesn't look nice to define the term $x$ in your first direction, and then not use it until your second direction, and then use two different uses of $a$ among both directions.
Furthermore, x is not really arbitrary, in that it is dependent on $a$. I would write "suppose that $a$ is the sum of two consecutive integers. Then there exists an integer $x$ such that $a = x + (x + 1)$