TITLE: Primes and $x^2+2y^2+4z^2$
QUESTION [15 upvotes]: A few months ago, I have asked a question about primes represented by ternary quadratic forms. I got two wonderful answers, which showed me how the theory was way richer and more complex that I naively expected from the case of binary forms. I
 was also given a lot of references
to read. They were interesting but unfortunately I got submerged by the amount of theory to learn and by other things to do, and I still don't have a clear overview of how the theory works.
I hope it is not abusing the patience of the readers of this site, and in particular of the experts in that theory, to come back again with a new question, this time 
by stating a very specific result that I have obtained as a by-product of some study of modular forms, and to ask
whether this theorem can be proved using the general theory of ternary quadratic forms (which I very much believe), and if it can, how?

Proposition : a prime $p$ is represented an odd number of times by the form $x^2+2y^2+4z^2$,
  with $x,y,z$ odd positive integers, if and only if $p \equiv 7 \pmod{16}$

I hope the answer will lead me to the part of this large theory I need to learn to understand better this kind of questions (I have (infinitely) many results of the above type, and I'd like to understand how they fit in the general theory) . Also, if someone finds an elementary argument for proving the proposition, I'd be quite interested too.

REPLY [5 votes]: Here's a simpler argument. We may assume p is 7 mod 8. Let N be the number of triples of squares (r,s,u) with r+2s+4u=p. We will show that N is odd if p is 7 mod 16 and even if p is 15 mod 16. Let M be (1/64)(the number of representations of p by xx+yy+zz+tt). Jacobi's 4 square theorem (which has elementary proofs using quaternions for example) shows that M=(p+1)/8. So it suffices to show that M and N have the same parity. Now if p=xx+yy+zz+tt, then just one of x,y,z,t is even. So M=(1/16)(the number of representations of p by xx+yy+zz+4tt). In other words, M is the number of ordered quadruples of squares (r,s,t,u) with r+s+t+4u=p. Now the involution (r,s,t,u)-->(r,t,s,u) on this set of quadruples has the N fixed points (r,s,s,u), giving the result.