Maths Olympiad Prep

Library / HMMT February /192 of 1302

HMMT February

Number theory Difficulty 4.9 AIME Find the answer

Determine the number of integers 2≤n≤20162 \leq n \leq 2016 such that nn−1n^{n}-1 is divisible by 2,3,5,72,3,5,7.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Only n≡1( mod 210)n \equiv 1(\bmod 210) work. Proof: we require gcd⁡(n,210)=1\operatorname{gcd}(n, 210)=1. Note that ∀p≤7\forall p \leq 7 the order of nn ( mod p)(\bmod p) divides p−1p-1, hence is relatively prime to any p≤7p \leq 7. So nn≡1( mod p)⟺n≡1( mod p)n^{n} \equiv 1(\bmod p) \Longleftrightarrow n \equiv 1(\bmod p) for each of these pp.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.