Equivalence of two multisets of natural numbers

I want to show that the two multisets of natural numbers given by :

$\{4m^2+(2n+1)^2\}$ for $m,n \in \mathbb{Z}_{\ge 0}$

and

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

are equal as multisets (i.e. allowing repetitions). These two multisets arise as spectra of some domains that I suspect to be isospectral. One can compute the first few elements, they both start out with

$\{1,5,9,13,17,25,25,29, ... \}$

and numerically they agree further along as well.

My first approach was to assume that $m,n$ can be written as linear combinations of $k,l$ and vice versa but if such a transformation exists, the $2$-by-$2$ matrix would have to have only positive integer entries and its inverse would have to have only positive integer entries as well and the only matrices with these properties are permutation matrices which don't work here.

• What do you mean "including repetitions"? That the number of times each integer is represented in the two sets is equal? Sets usually don't care about repetitions: $\{2, 2, 2\}$ is the same set as $\{2\}$. Commented Sep 1, 2017 at 9:13
• These sets are sets of natural numbers but they are not a subset of the natural numbers because some numbers (for example 25) appear more than once. So here $\{2,2,2\}$ is a different set then $\{2\}$. Both are sets that contain natural numbers but not the same quantity of them. Commented Sep 1, 2017 at 9:22
• So this is really a question about multisets? Commented Sep 1, 2017 at 9:23
• If that makes it more clear, then yes, they are multisets. Commented Sep 1, 2017 at 9:24

$\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.

• In effect you are saying that the first set is clearly $(2m)^2+(2n+1)^2$ the sum of even squares and odd squares, and the second set is too. You might want to add the case when $k$ is odd. Perhaps something like $$2l+k=2n+1 \text{ and } k=2m-1 \Leftrightarrow l=n-m+1 \text{ and } k=2m-1$$ Commented Sep 1, 2017 at 9:35
• That's the reasoning, yes. Commented Sep 1, 2017 at 9:36
• For $k=0$, this becomes $4(l+1/2)^2=(2l)^2+1$, i.e. $(2l+1)^2=(2l)^2+1$. Are you sure?
– user436658
Commented Sep 1, 2017 at 9:37
• Error at third line. $4l$ missing. Thank you. Will edit. Commented Sep 1, 2017 at 9:42
• The well-known identity $$2(x^2+y^2)=(x+y)^2+(x-y)^2$$ with $x=k+l+1/2$ and $y=l+1/2$ gives $$2(k+l+1/2)^2+2(l+1/2)^2=(k+2l+1)^2+k^2.$$
– user436658
Commented Sep 1, 2017 at 9:46

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 .$$

• No. If $\{\}$ denote a set, then you're right that $$\{4m^2+(2n+1)^2\}_{m,n\in\mathbb{Z}_{\ge 0}}=$$ $$=\{4m^2+(2n+1)^2\}_{m,n\in\mathbb Z},$$ but $\{\}$ in this case denote a multiset, as currently mentioned in the OP post. Commented Sep 1, 2017 at 17:10