Let $n$ natural number. Then prove there exists solutions for $a^2 + 3b^2 = n$ if and only if exists solutions for $x^2 + xy + y^2 = n$. a,b,x,y are integer numbers. First, if i guess there $a^2 + 3b^2 = n$ , then $a^2 + 2b^2 + b^2$, has $x^2 + xy + y^2 form$, then i guess there $a=x$, $b=y$ and $2b^2=xy$, then $2b=a$. I don´t really sure that this solve the first part. With the second part i tried something similar but i don´t arrive to the same result. 

Suppose that $n=x^2+xy+y^2$ for some integers $x$ and $y$.  This may be designated as a pair $\{x,y\}$ which is a solution for $n$.  Then:
$n=x^2+xy+y^2=(\frac{x-y}{2})^2+3(\frac{x+y}{2})^2$, eq. 1
If $x$ and $y$ are both even or both odd this represents an integer solution for $a$ and $b$.  If the parities are different, invoke the identity
$x^2+xy+y^2=(x+y)^2-x(x+y)+x^2$
to identify $\{-x,x+y\}$ as a second solution, and by symmetry $\{-y,x+y\}$ is a third solution.  With $x+y$ odd pick the solution out of these two where the other member is odd and apply eq. 1.
Now suppose that $n=a^2+3b^2$.  This is also $(b+a)^2+(b+a)(b-a)+(b-a)^2$ proving the converse claim.
