Solution (source code)

= Solution

The quadratic form factors as a sum of two squares:
$$
5x^2+16xy+13y^2
=(x+2y)^2+(2x+3y)^2.
$$
The change of variables
$$
u=x+2y,
\qquad
v=2x+3y
$$
has determinant $-1$, so its matrix is a <unimodular matrix> and it maps $\mathbb Z^2$ bijectively to itself. The original equation is therefore equivalent to
$$
u^2+v^2=365.
$$
The <sum of two squares theorem> also decides this systematically: $365=5\cdot73$, and every prime factor congruent to $3$ modulo $4$ occurs to an even power, vacuously here. Thus $365$ is a sum of two integer squares. Explicitly,
$$
365=2^2+19^2.
$$
Inverting the change of variables gives, for example, $(x,y)=(32,-15)$. Consequently
$$
\boxed{5x^2+16xy+13y^2=365\text{ has integer solutions}.}
$$
This is the <unimodular reduction of a discriminant-minus-four form to two squares>.