This is probably quite naïve, maybe even stackexchange-worthy.

Consider a quadratic form such as $Q(x,y) = 3x^2+y^2$. We know that, for primes $p \equiv 1 \pmod{3}$, there exist integer solutions to $Q(x,y)=p$.

There are nontrivial algorithms to find such solutions $x,y$. But I am wondering: is there a "concise" formula to explicitly write down the solutions? I am willing to include characters in such a formula, if necessary.

I am not an expert, but algorithms I've found seem to use some guessing or, at best, iteration of some sequence of involutions.

Why do I care? Strange as it may sound, I am interested in cases where the solutions are themselves prime or one-off from a prime, and I suppose getting an explicit handle on solutions is my first attempt. I am not very optimistic, though.

Thank you in advance!