<s>[INST] Integers represented by $x^2 + 3 y^2$ vs. integers represented by $x^2 + x y + y^2$. How does one show that the quadratic forms $x^2 + 3 y^2$ and $x^2 + x y + y^2$ represent the same set of integers? 
I think  it relates to a classical result of Euler about primes of form $6k+1$. In fact  a positive integer $n$ is of the form $x^2 + 3 y^2$ if and only if the the primes $\equiv -1 \mod 3$ have an even exponent in $n$. Similarly for $x^2 + x y + y^2$.
However somebody told me that this  can be shown without  so much number theoretical background. Any ideas would be appreciated!
 [/INST] 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$$
</s>