Originally Posted by

**Deadstar** Maple.

with(numtheory):

legendre(31,43);

I found the answer to be 1 though...

$\displaystyle \bigg{(} \frac{31}{43} \bigg{)} = \bigg{(} \frac{43}{31} \bigg{)} (-1)^{\tfrac{31-1}{2} \cdot \tfrac{43-1}{2}} = -\bigg{(} \frac{43}{31} \bigg{)}$

$\displaystyle = -\bigg{(} \frac{12}{31} \bigg{)}$

$\displaystyle = -\bigg{(} \frac{2^2}{31} \bigg{)} \cdot \bigg{(} \frac{3}{31} \bigg{)}$

$\displaystyle = -\bigg{(} \frac{3}{31} \bigg{)}$

$\displaystyle = -\bigg{(} \frac{31}{3} \bigg{)} (-1)^{\tfrac{31-1}{2} \cdot \tfrac{3-1}{2}}$

$\displaystyle = \bigg{(} \frac{31}{3} \bigg{)}$

$\displaystyle = \bigg{(} \frac{1}{3} \bigg{)} = 1$