Problem

Source: 2017 China TST 4 Problem 3

Tags: combinatorics, set theory, Quadratic Residues, China TST



Find the numbers of ordered array $(x_1,...,x_{100})$ that satisfies the following conditions: ($i$)$x_1,...,x_{100}\in\{1,2,..,2017\}$; ($ii$)$2017|x_1+...+x_{100}$; ($iii$)$2017|x_1^2+...+x_{100}^2$.