# Cohen-Lenstra heuristics and the negative Pell equation

# Cohen-Lenstra heuristics and the negative Pell equation

For a squarefree integer $d$ we ask, if the negative Pell equation $x2-dy2 = -1$ is solvable over the integers. By easy considerations we see that in this case $d>0$ and that all odd prime divisors of $d$ are congruent to 1 modulo 4. Now we call a $d$ special, if it satisfies those two conditions. We are able to prove that for a positive density of special $d$ we can solve the negative Pell equation. Furthermore there is a positive density of special $d$, where the negative Pell equation cannot be solved. This result gives a big support to a conjecture of Stevenhagen who predicts those densities.The problem is related to the behaviour of the ordinary and narrow class group of the corresponding quadratic number field. The asymptotic behaviour of those class groups is predicted by the Cohen-Lenstra heuristics. We are able to prove those conjectures for the $4$-rank.