# Representing primes explicitly with binary quadratic forms

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.

• For sums of two squares, one can in fact make one of the variables $x$ or $y$ be a prime. This is a beautiful result of Fouvry and Iwaniec see their paper Gaussian Primes in Acta Arithmetica. matwbn.icm.edu.pl/ksiazki/aa/aa79/aa7935.pdf – Lucia Jan 9 '14 at 19:16
It is known that for odd primes $p\equiv 1\pmod{3}$, there is a unique way of writing $4p = L^2 + 27M^2$, where $L\equiv 1\pmod{3}$. Jacobi showed that $L$ is the least absolute residue of $-\binom{2f}{f}$ modulo $p$, where $f:= \frac{p-1}{3}$. To take the example of $p=73$, we have $$4 \cdot 73 = 7^2 + 27\cdot 3^2,$$ which is consistent with $-\binom{48}{24} \equiv 7\pmod{73}$.