= Solution
For an <odd prime> $p$, <Euler's criterion> states
$$
\boxed{a^{(p-1)/2}\equiv\left(\frac ap\right)\pmod p.}
$$
For $p\nmid a$, the <Legendre symbol> is $1$ for a <quadratic residue> and $-1$ for a <quadratic nonresidue>; if $p\mid a$, both sides are zero.
The product is a single power because the <arithmetic progression> of exponents has sum $2017\cdot2018/2$:
$$
\prod_{j=1}^{2017}2^j=2^{2017\cdot1009}.
$$
Since $2017\equiv1\pmod8$, the <second supplementary law for quadratic reciprocity> gives $(2/2017)=1$. Hence <Euler's criterion> gives $2^{1008}\equiv1\pmod{2017}$. Reduce the exponent using $1009=1008+1$ and $2017=2\cdot1008+1$:
$$
2^{2017\cdot1009}\equiv2^{2017}
=2(2^{1008})^2\equiv2\pmod{2017}.
$$
The least nonnegative <remainder> is therefore \b[$2$].
Back to article page