https://notesread.com/legendre-symbol-number-theory/