# Prove : Every even number can be written as the sum of an odd number and a perfect square

Prove : Every even number can be written as the sum of an odd number and a perfect square

I'm defining an even number as $$2n$$, $$n$$ being any integer For odd numbers, $$2m + 1$$, $$m$$ being any integer For perfect squares, $$k^2$$, $$k$$ being any integer

Then, $$2n = 2m + 1 + k^2$$

not quite sure where to go from here... some things to note are that these numbers can be positive or negative and I've tried to disprove it with some simple numbers to no avail
even number = perfect square + odd number
$$0 = 1 + (-1)$$
$$2 = 9 + (-7)$$
$$4 = 9 + (-5)$$
$$6 = 9 + (-3)$$
$$8 = 9 + (-1)$$
$$10 = 9 + 1$$
$$12 = 9 + 3$$
and so on so it seems like it holds up

• Your definitions for $n,m,k$ should specify they are integers, not merely real numbers. – Eevee Trainer May 5 '19 at 21:29
• $2 m = (2 m - 1) + 1^2$. – Travis Willse May 5 '19 at 21:32

Any number can be written as the sum of a square and an odd number, start with $$1=0+1$$. If the number is a square greater than 1, then it can be written as $$n^2+(2n+1)$$, where $$n\geq1$$. Otherwise the number must be between two consecutive squares, say $$n^2$$ and $$(n+1)^2$$. All such numbers are of the form $$n^2+k$$, for some $$k$$. If $$k$$ is odd we're done, otherwise if $$k$$ is even, note that $$k+2n-1$$ is odd, and $$n^2+k = (n-1)^2+(k+2n-1)$$.
• clearer: if we have a square, write it as $(n+1)^2 = n^2 + 2n + 1$. This works for all integers that are squares. – Rylee Lyman May 5 '19 at 22:23