Find the number of ordered $64-$tuples $(x_0,x_1,…,x_{63})$ such that $2017\mid (x_0+x_1+2x_2+3x_3+\dots+63x_{63})$

combinatoricscontest-mathdivisibilityelementary-number-theorymodular arithmetic

Find the number of ordered $64-$tuples $(x_0,x_1,…,x_{63})$ such that $x_0,x_1,…,x_{63}$ are distinct elements of $\{1,2,…,2017\}$ and $2017\mid (x_0+x_1+2x_2+3x_3+\dots+63x_{63}).$

My first opinion would be to try out some options. I think modular arithmetic might be useful in simplifying this problem. If I set all the $x_i$'s to $1,$ I get that $x_0+x_1+2x_2+\dots+63x_{63}=1+63\cdot32$ and so it is a multiple of $2017.$ Now, I know I'll have to consider exactly which possibilities will work and find an efficient way to count each arrangement. For instance, another arrangement would involve $2015$ one's, one $2017,$ and one $2.$ And obviously if $2017$ one's works, then $2017$ $2017$'s works as well. Each time one adds $1$ to a term in the original set of $2017$ $x_i$'s equal to one, one must add $-1\pmod {2017}$ to another term to ensure that the sum is still divisible by $2017.$ However, one must also account for the different coefficients of the $x_i$'s.

Best Answer

This a Putnam B6 2017 question. https://kskedlaya.org/putnam-archive/2017s.pdf

Related Question