# How do I prove that the sum of any integer ≥ 1 and its square will always result in an even number? [closed]

I started with x + x^2 = 2n but got nowhere

## closed as off-topic by Shailesh, Yves Daoust, Jyrki Lahtonen, José Carlos Santos, A. PongráczJan 19 at 13:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Shailesh, Jyrki Lahtonen, José Carlos Santos, A. Pongrácz
If this question can be reworded to fit the rules in the help center, please edit the question.

• If a number is odd or even is it's square odd or even? – ThorbenK Jan 19 at 9:12
• If you want to prove $x+x^2$ is of the form $2n$, you mustn't start by assuming it is. More generally, don't start from what you want to prove (unless you're confident you can reason backwards to something obvious, but even then rewrite the proof forwards). Any number of people new to proofs commit circular logic trying this. – J.G. Jan 19 at 9:17
• IMO, you didn't search much. It takes two or three attempts to see that squaring preserves parity and that the sum of two numbers of the same parity is even. – Yves Daoust Jan 19 at 9:58
• I'm voting to close this question as off-topic because I see no personal effort – Yves Daoust Jan 19 at 9:58

For any integer $$x$$, exactly one of $$\{x, x+1\}$$ is even. Now factor $$x^2 + x$$.

$$(2n)+(2n)^2=2n+4n^2=2(n+2n^2)$$ and

$$(2n+1)+(2n+1)^2=2n+1+4n^2+4n+1=2(1+3n+2n^2).$$

$$(n+n^2)\bmod2=((n\bmod2)+(n\bmod2)^2)\bmod2=((n\bmod2)+(n\bmod2))\bmod2=0.$$

By induction,

$$1+1^2=2$$ and $$n+n^2=2k\implies n+1+(n+1)^2=n+n^2+2n+2=2(k+n+1)=2k'.$$

As pointed out by commenter ThorbenK,

Case 1: $$x$$ even. Then $$x^2$$ is even, and the sum of even numbers is even.

Case 2: $$x$$ odd. Then $$x^2$$ is odd, and the sum of two odd numbers is even.

Since $$\binom{x+1}{2}=\frac{x(x+1)}{2}$$ is an integer (the number of size-$$2$$ subsets of a size-$$x+1$$ set), $$x(x+1)$$ is even.

When written in binary, a number and its square have the same rightmost digit. If you add them, you get a $$0$$.

E.g.

$$100\color{green}1+101000\color{green}1=101101\color{green}0.$$

$$n+n^2$$ is twice a triangular number, i.e. twice an integer.

• Undeserved downvote. – Yves Daoust Jan 20 at 11:29