For some fixed $n$ define the quadratic form $Q(x,y) = x^2 + n y^2.$
I think that if $Q$ represents $m$ in two different ways then $m$ is composite.
I can prove this for $n$ prime. I was hoping someone could give me a hint towards proving this result for general $n$? Also would be interested in generalizations if any are known! Thanks a lot.