= Solution
At every good prime we have $p\ne2$. After removing any even p-adic valuation in the parameter as in part (a), use a smooth reduction $y^2=x^3-d^2x$ with $d\in\mathbb F_p^\times$. Let $\chi$ be the <Legendre symbol>, extended by $\chi(0)=0$. Counting the two, one or zero y-values above each x gives
$$
\#\widetilde E_D(\mathbb F_p)=p+1+\sum_{x\in\mathbb F_p}\chi(x^3-d^2x),\qquad
a_p=-\sum_x\chi(x^3-d^2x).
$$
If $p\equiv3\pmod4$, then $\chi(-1)=-1$. The terms for $x$ and $-x$ cancel, including zeros, because the cubic is odd. Hence $a_p=0$.
For the converse, the four distinct points $O,(0,0),(d,0),(-d,0)$ form the full rational <2-torsion> subgroup of the reduced curve. Its group order is therefore divisible by four. If $p\equiv1\pmod4$, zero trace would give group order $p+1\equiv2\pmod4$, a contradiction. Consequently
$$
\boxed{a_p=0\iff p\equiv3\pmod4.}
$$
This is the <vanishing trace criterion for a congruent number curve>. The <Hasse theorem for elliptic curves> states
$$
\boxed{|a_p|\leq2\sqrt p.}
$$
For good primes that divide a nonsquarefree displayed parameter, the tilde denotes the smooth reduction of a minimal model, not the singular special fibre of that nonminimal equation.
Back to article page