******************* Fekete polynomials, quadratic residues, and arithmetic