Skip to main content

2011 AIME II Problem 14

Problem 14 of 15HarderNumber TheoryCombinatorics

There are NN permutations (a1,a2,…,a30)(a_1, a_2, \ldots, a_{30}) of 1,1, 2,2, …,\ldots, 3030 such that for m∈{2,3,5},m \in \{2, 3, 5\}, mm divides an+m−ana_{n+m} - a_n for all integers nn with 1≤n<n+m≤30.1 \le n \lt n + m \le 30. Find the remainder when NN is divided by 1000.1000.

Your answer

Integer from 0 to 999
Show solution

Solution

For each m∈{2,3,5},m \in \{2, 3, 5\}, the condition an+m≡an(modm)a_{n+m} \equiv a_n \pmod{m} means the residue of ana_n modulo mm depends only on n mod m,n \bmod m, defining a map σm\sigma_m from residues to residues. Each residue class of positions has 30m\frac{30}{m} members, and so does each residue class of values; if σm\sigma_m sent two position classes to the same value class, that class’s 30m\frac{30}{m} values would have to fill 60m\frac{60}{m} positions, which is impossible. So each σm\sigma_m is a permutation of the residues modulo m.m. Conversely, by the Chinese remainder theorem each position n∈{1,…,30}n \in \{1, \ldots, 30\} corresponds to a unique triple (n mod 2, n mod 3, n mod 5),(n \bmod 2,\, n \bmod 3,\, n \bmod 5), and likewise for values. Any choice of permutations (σ2,σ3,σ5)(\sigma_2, \sigma_3, \sigma_5) therefore determines a unique valid permutation of 1,…,30,1, \ldots, 30, sending the position triple to the prescribed value triple. Hence N=2!⋅3!⋅5!=1440,N = 2! \cdot 3! \cdot 5! = 1440, and the remainder upon division by 10001000 is 440.440.
AoPS wiki

Tagged: Chinese Remainder Theorem · modular arithmetic · permutations

More practice