Solution (source code)

= Solution

If the positive <odd integer> $n$ has <prime factorization>
$$
n=\prod_{r=1}^s p_r^{e_r},
$$
its <Jacobi symbol> is
$$
\left(\frac an\right)=\prod_{r=1}^s\left(\frac a{p_r}\right)^{e_r},
$$
where each factor is a <Legendre symbol>; by convention $(a/1)=1$. Thus the symbol is zero exactly when $\gcd(a,n)>1$.

The <quadratic reciprocity> law for the <Jacobi symbol> says that for coprime positive odd integers $m,n$,
$$
\boxed{\left(\frac mn\right)\left(\frac nm\right)=(-1)^{(m-1)(n-1)/4}.}
$$
To prove it, write $m=\prod_i p_i^{e_i}$ and $n=\prod_jq_j^{f_j}$. The <quadratic reciprocity> law for distinct odd primes states
$$
\left(\frac{p_i}{q_j}\right)\left(\frac{q_j}{p_i}\right)
=(-1)^{(p_i-1)(q_j-1)/4}.
$$
Multiplying this identity over $i,j$ with multiplicities $e_i f_j$ gives the required product of <Jacobi symbols>. Its sign exponent modulo two is
$$
\left(\sum_i e_i\frac{p_i-1}{2}\right)
\left(\sum_j f_j\frac{q_j-1}{2}\right)
\equiv \frac{m-1}{2}\frac{n-1}{2}\pmod2,
$$
because multiplication of odd integers adds the quantities $(r-1)/2$ modulo two. This proves the law.

For the requested value, two applications of reciprocity give
$$
\left(\frac{503}{2019}\right)
=-\left(\frac7{503}\right)
=\left(\frac6{7}\right)
=-1,
$$
since $2019\equiv7\pmod{503}$, $503\equiv6\pmod7$, and $6$ is a <quadratic nonresidue> modulo $7$.