It is clear that a number can be represented as two sums of squares here. We have Cornacchia's algorithm to solve this problem efficiently. We also know how many solutions to this problem here.
My question is when a number can be represent as the $x^2+y^2+p(z^2+t^2)=M$ ($p$ is a prime, $x,y,z,t \in \mathbb{Z}$) and how many solutions to this. We know the answer when $M \le p$, but we have no ideal about $M>p$.