MathLabs

Problem 2

Let nn and kk be relatively prime positive integers with k<nk < n. The set M={1,2,…,n−1}M = \{1, 2, \ldots, n-1\} is colored so that each number is either blue or white, subject to: (i) for each i∈Mi \in M, the numbers ii and n−in-i have the same color; and (ii) for each i∈Mi \in M with i≠ki \ne k, the numbers ii and ∣i−k∣|i-k| have the same color. Prove that all the numbers in MM must have the same color.
Step 1 of 5: The multiples of kk permute MM
In plain words

Multiplying by kk modulo nn just relabels the numbers 1,…,n−11,\dots,n-1 in a new order, like shuffling a deck without losing or duplicating any card, precisely because kk shares no common factor with nn.

{k,2k,…,(n−1)k}≡{1,2,…,n−1}(modn)\{k,2k,\dots,(n-1)k\} \equiv \{1,2,\dots,n-1\} \pmod n
Detailed analysis

Since gcd⁡(n,k)=1\gcd(n,k)=1, multiplication by kk is a bijection on residues mod nn; write rir_i for the representative of ik mod nik\bmod n lying in {1,…,n−1}\{1,\dots,n-1\} (nonzero because 0<i<n0<i<n and gcd⁡(k,n)=1\gcd(k,n)=1 force ik≢0ik\not\equiv0). As ii ranges over 1,…,n−11,\dots,n-1, the values rir_i run through all of MM exactly once, in some order.