Equivalence of two multisets of natural numbers

$\forall k,l \in \mathbb{N}$,

$$ 2(k+l+\frac{1}{2})^2+2(l+\frac{1}{2})^2=2(k^2+l^2+\frac{1}{4}+k+l+2kl)+2(l^2+l+\frac{1}{4})$$

$$ = 2k^2+4l^2+2k+4l+4kl+1$$

$$ = k^2+4l^2+1+4kl+4l+2k+k^2$$

$$ = (k+2l+1)^ 2+k^2$$

When $k=2m$, the expression becomes, $(2(m+l)+1)^2+4m^2$.

Now $l$ can describe $\mathbb{N}$ for $2(m+l)+1$ to describe the set of odd numbers.

When $k=2n+1$, the expression becomes $ (2(n+l+1))^2+(2n+1)^2$.

The remaining $l$ allows all the no null even numbers.


At first notice that: $$ \{ 4m^2+(2n+1)^2 \} _{m,n \in \mathbb{Z}_{\ge 0}} = \{ 4m^2+(2n+1)^2 \} _{m,n \in \mathbb{Z}} ; $$

also note that:

$$ \{ 2(k+l+1/2)^2+2(l+1/2)^2 \} _{k,l \in \mathbb{Z}_{\ge 0}} = \{ 2(k+l+1/2)^2+2(l+1/2)^2 \} _{k,l \in \mathbb{Z}} . $$


Notice that : $2a^2+2b^2=(a+b)^2+(a-b)^2$; so we can conclude that:

$$ 2(k+l+1/2)^2 + 2(l+1/2)^2 = (2l+k+1)^2 + k^2 \Longrightarrow \\ \ \ \ \ \ \ \ \ \ \ \ \ \ \{ 2(k+l+1/2)^2+2(l+1/2)^2 \} _{k,l \in \mathbb{Z}} = \{ (2l+k+1)^2+k^2 \} _{k,l \in \mathbb{Z}} . $$



Claim: $ \{ 4m^2+(2n+1)^2 \} _{m,n \in \mathbb{Z}} \subseteq \{ (2l+k+1)^2+k^2 \} _{k,l \in \mathbb{Z}} . $
Proof: Let $k:=2m$ and $l:=n-m$; one can see that: $$ (2l+k+1)^2+k^2 = (2n+1)^2+(2m)^2 . $$

Claim: $ \{ (2l+k+1)^2+k^2 \} _{k,l \in \mathbb{Z}} \subseteq \{ 4m^2+(2n+1)^2 \} _{m,n \in \mathbb{Z}} . $
Proof:

  • If $k$ is even let $m:=\dfrac{k}{2}$ and $n:=l+\dfrac{k}{2}$; one can see that: $$ (2n+1)^2+(2m)^2 = (2l+k+1)^2+k^2 . $$

  • If $k$ is odd let $m:=l+\dfrac{k+1}{2}$ and $n:=\dfrac{k-1}{2}$; one can see that: $$ (2m)^2+(2n+1)^2 = (2l+k+1)^2+k^2 . $$