TITLE: Integers represented by $x^2 + 3 y^2$ vs. integers represented by $x^2 + x y + y^2$.
QUESTION [7 upvotes]: 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!

REPLY [3 votes]: 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$