Determining $x$ or $y$ mod $p^2$ with $p=x^2+dy^2$
  Let $p$ be an odd prime and let $d\in\{2,3,7\}$. When $(\frac{-d}p)=1$ we can write $p=x^2+dy^2$ with $x,y\in\mathbb Z$; in this paper we aim at determining $x$ or $y$ modulo $p^2$. For example, when $p=x^2+3y^2$, we show that if $p\equiv x\equiv 1\pmod 4$ then $$\sum_{k=0}^{(p-1)/2}(3[3\mid k]-1)(2k+1)\frac{\binom{2k}k^2}{(-16)^k}\equiv\left(\frac2p\right)2x\pmod{p^2}$$ where $[3\mid k]$ takes $1$ or $0$ according as $3\mid k$ or not, and that if $-p\equiv y\equiv 1\pmod4$ then $$\sum_{k=0}^{(p-1)/2}\left(\frac k3\right)\frac{k\binom{2k}k^2}{(-16)^k} \equiv(-1)^{(p+1)/4}y\equiv\sum_{k=0}^{(p-1)/2}(1-3[3\mid k])\frac{k\binom{2k}k^2}{(-16)^k}\pmod{p^2}.$$ We also determine $$\sum_{k=0}^{p-1}\frac{k\binom{2k}k^3}{m^k}\sum_{k\le j<2k}\frac1j\quad \mbox{mod}\ p$$ for $m=1,-8,16,-64,256,-512,4096$. 
Zhi-Wei Sun
math.NT math.CO