The desired count is 1953!2016!−63!⋅2016, which we compute using the principle of inclusion-exclusion. As in A2, we use the fact that 2017 is prime; this means that we can do linear algebra over the field \mathbb{F}_{2017}. In particular, every nonzero homogeneous linear equation in n variables over \mathbb{F}_{2017}hasexactly2017^{n-1}solutions.For\piapartitionof\{0,\dots,63\},let|\pi|denotethenumberofdistinctpartsof\pi,Let\pi_0denotethepartitionof\{0,\dots,63\}into64singletonparts.Let\pi_1denotethepartitionof\{0,\dots,63\}intoone64−elementpart.For\pi, \sigmatwopartitionsof\{0,\dots,63\},write\pi | \sigmaif\piisarefinementof\sigma(thatis,everypartin\sigmaisaunionofpartsin\pi).Byinductionon|\pi|,wemayconstructacollectionofintegers\mu_\pi,oneforeach\pi, with the properties that \[ \sum_{\pi | \sigma} \mu_\pi = \begin{cases} 1 & \sigma = \pi_0 \\ 0 & \sigma \neq \pi_0 \end{cases}. \] Define the sequence c_0, \dots, c_{63}bysettingc_0 = 1andc_i = ifori>1.LetN_\pibethenumberofordered64−tuples(x_0,\dots,x_{63})ofelementsofF2017 such that xi=xj whenever i and j belong to the same part and ∑i=063cixi is divisible by 2017. Then Nπ equals 2017∣π∣−1 unless for each part S of π, the sum ∑i∈Sci vanishes; in that case, Nπ instead equals 2017∣π∣. Since c0,…,c63 are positive integers which sum to 1+263⋅64=2017, the second outcome only occurs for π=π1. By inclusion-exclusion, the desired count may be written as π∑μπNπ=2016⋅μπ1+π∑μπ2017∣π∣−1. Similarly, the number of ordered 64-tuples with no repeated elements may be written as 64!(642017)=π∑μπ2017∣π∣. The desired quantity may thus be written as 1953!2016!+2016μπ1. It remains to compute μπ1. We adopt an approach suggested by David Savitt: apply inclusion-exclusion to count distinct 64-tuples in an \emph{arbitrary} set A. As above, this yields ∣A∣(∣A∣−1)⋯(∣A∣−63)=π∑μπ∣A∣∣π∣. Viewing both sides as polynomials in ∣A∣ and comparing coefficients in degree 1 yields μπ=−63! and thus the claimed answer.