Solution (source code)

= Solution

For odd $m,n$,
$$
\frac{mn-1}2-\frac{m-1}2-\frac{n-1}2
=\frac{(m-1)(n-1)}2
$$
is even. Induction over the prime factors of $b$, repeated according to multiplicity, therefore gives
$$
\frac{b-1}2\equiv\sum_{j=1}^r\frac{p_j-1}2\pmod2.
$$
Using the supplementary law for each <Legendre symbol> in the definition of the <Jacobi symbol>,
$$
\left(\frac{-1}b\right)=\prod_j(-1)^{(p_j-1)/2}
=\boxed{(-1)^{(b-1)/2}}.
$$
For $b=1$, the empty product and the displayed expression are both $1$.