Let $\mathbb{Z}^+$ denote the set of positive integers, and let $P(x,y)=x^2+3xy+y^2$.
If $n\in\mathbb{Z}^+$, let $\delta(n)$ be the number of unordered pairs $(x,y)\in\mathbb{Z}^+\times\mathbb{Z}^+$ such that $P(x,y)=n$.
With the help of a computer program, I have verified that :
$\bullet$ $\delta(2299)=\delta(3509)=\delta(3751)=\delta(3971)=3$
$\bullet$ $\delta(n)=2$ for $n\in E_2$, with
$E_2=\{209, 319, 341, 451, 551, 589, 605, 649, 671, 779, 781, 836, 869, 899, 979, 1045, 1111, 1121, 1159, 1189, 1199, 1271, 1276 1331, 1349, 1364, 1441, 1501, 1529, 1595, 1639, 1661, 1691, 1705, 1711, 1769, 1804, 1805, 1829, 1881, 1891, 1919, 1969, 1991, 2059, 2071, 2101, 2189, 2201, 2204, 2255, 2291, 2321, 2356, 2419, 2420, 2449, 2489, 2501, 2519, 2581, 2596, 2629, 2641, 2651, 2684, 2755, 2759, 2761, 2831, 2869, 2871, 2911, 2929, 2945, 2959, 2981, 3069, 3091, 3116, 3124, 3131, 3161, 3239, 3245, 3344, 3355, 3379, 3401, 3421, 3439, 3476, 3596, 3599, 3629, 3641, 3649, 3781, 3799, 3839, 3895, 3905, 3916, 3949\}$
$\bullet$ $\delta(n)\in\{0;1\}$ for all other values of $n\leqslant4000$.
Using the identity
$$P(x,y)P(z,w)=P(yw-xz,yw+xz+3xw),$$
I managed to prove that $\limsup\limits_{n\rightarrow+\infty}\delta(n)=+\infty.$
but I am sure we can do much better. For example, is there a way to express $\delta(n)$ in terms of $n$ ?