  The polynomials $d_n(x)$ are defined by \begin{align*} d_n(x) &=
\sum_{k=0}^n{n\choose k}{x\choose k}2^k. \end{align*} We prove that, for any
prime $p$, the following congruences hold modulo $p$: \begin{align*}
\sum_{k=0}^{p-1}\frac{{2k\choose k}}{4^k} d_k\left(-\frac{1}{4}\right)^2
&\equiv \begin{cases} 2(-1)^{\frac{p-1}{4}}x,&\text{if $p=x^2+y^2$ with
$x\equiv 1\pmod{4}$,} 0,&\text{if $p\equiv 3\pmod{4}$,} \end{cases} [5pt]
\sum_{k=0}^{p-1}\frac{{2k\choose k}}{4^k} d_k\left(-\frac{1}{6}\right)^2
&\equiv 0, \quad\text{if $p>3$,} [5pt] \sum_{k=0}^{p-1}\frac{{2k\choose
k}}{4^k} d_k\left(\frac{1}{4}\right)^2 &\equiv \begin{cases} 0,&\text{if
$p\equiv 1\pmod{4}$,} (-1)^{\frac{p+1}{4}}{\frac{p-1}{2}\choose
\frac{p-3}{4}},&\text{if $p\equiv 3\pmod{4}$.} \end{cases}
\sum_{k=0}^{p-1}\frac{{2k\choose k}}{4^k} d_k\left(\frac{1}{6}\right)^2 &\equiv
0, \quad\text{if $p>5$.} \end{align*} The $p\equiv 3\pmod{4}$ case of the first
one confirms a conjecture of Z.-W. Sun, while the second one confirms a special
case of another conjecture of Z.-W. Sun.
