Conjectures and results on $x^2$ mod $p^2$ with $4p=x^2+dy^2$
  Given a squarefree positive integer $d$, we want to find integers (or rational numbers with denominators not divisible by large primes) $a_0,a_1,a_2,\ldots$ such that for sufficiently large primes $p$ we have $\sum_{k=0}^{p-1}a_k\equiv x^2-2p$ (mod $p^2$) if $4p=x^2+dy^2$ (and $4\nmid x$ if $d=1$), and $\sum_{k=0}^{p-1}a_k\equiv 0$ (mod $p^2$) if $(\frac{-d}p)=-1$. In this paper we give a survey of conjectures and results on this topic and point out the connection between this problem and series for $1/\pi$. 
Zhi-Wei Sun
math.NT math.CO