4. Given the quadratic function $y=a x^{2}+13 x$ passes through two lattice points (points with integer coordinates) in the first quadrant, and their y-coordinates are both prime numbers. Then $a=$ $\qquad$ -
4. -6 .

Let the lattice point satisfying the given conditions be $(m, n)$.
Then $n=a m^{2}+13 m=m(a m+13)$.
Since $n$ is a prime number, we have $m_{1}=1$ and $a m_{1}+13$ is a prime number, or $a m_{2}+13=1$ and $m_{2}$ is a prime number.

Therefore, $m_{1}=1$ and $a+13$ is a prime number, and $a m_{2}=-12=-2 \times 2 \times 3$ and $m_{2}$ is a prime number.
Thus, $a=-6$ satisfies the conditions.