Integers represented by $x^2 + 3 y^2$ vs. integers represented by $x^2 + x y + y^2$.

Just to deal easily with parity, you can see that if $f(x,y)=x^2+xy+y^2$, then $$f(x,y)=f(y,x)=f(-x-y,y)=f(-x-y,x)=f(x,-x-y)=f(y,-x-y)$$

So you can always assume that $x$ is even in $f(x,y)$, because if it's not, just consider $f(y,x)$ or $f(-x-y,y)$ (and either $y$ or $-x-y$ is even).

So $g(x,y)=4x^2+2xy+y^2$ has the same image in $\mathbb Z^2$ than $f$

But as it was explained in previous comments/answers, $$g(x,y)=(x+y)^2+3x^2$$

And if $u=x+y$ and $v=x$ then $x=v$ and $y=u-v$ this is a reversible transformation, so $g$ and $h(u,v)=u^2+3v^2$ has the same image.


Others have already answered well; the principal form $x^2 + xy + k y^2$ always represents a superset of the numbers represented by $x^2 + (4k-1)y^2.$ For $k=1,$ the two sets agree. Same for $k = -1,$ so $x^2 + xy - y^2$ represents the same numbers as $x^2 - 5 y^2.$

It is always the case that $x^2 + xy + 2k y^2$ always represents the same ODD numbers represented by $x^2 + (8k-1)y^2.$ So, $x^2 + xy + 2y^2$ and $x^2 + 7 y^2$ represent the same odd numbers. Same with $x^2 + xy -4y^2$ and $x^2 - 17 y^2$


Hint

$$x^2+xy+y^2=(x+\frac{1}{2}y)^2+3 (\frac{y}{2})^2=(\frac{1}{2}x+y)^2+3 (\frac{x}{2})^2= (\frac{x-y}{2})^2+3(\frac{x+y}{2})^2$$

Split it in three cases by parity.

Backwards you need to do the back substitutions, i.e. denote the brackets on the RHS by $x',y'$ and solve for $x, y$. Then you get relations of the form $$x'^2+3y'^2= x^2+3y^2=( ... )^2+3 (..)^2$$