Maths Olympiad Prep

Library / /4 of 12

Number theory Difficulty 5.0 AIME Prove it Bulgaria

Let n3n \ge 3 be a positive integer and let
S={kN:(k,n)=(k+1,n),1kn1}. S = \{k \in \mathbb{N} : (k, n) = (k + 1, n), 1 \le k \le n - 1\}.

Find the remainder of kSk\prod_{k \in S} k divided by nn.

Solution

It is easy to see that (k,n)=(k+1,n)=1(k, n) = (k + 1, n) = 1. Then for any kSk \in S there exists a unique k1{1,2,,n}k_1 \in \{1, 2, \dots, n\} such that (k1,n)=1(k_1, n) = 1 and kk11(modn)k k_1 \equiv 1 \pmod{n}. Since k1+1k1(k+1)(modn)k_1 + 1 \equiv k_1(k + 1) \pmod{n}, then (k1+1,n)=1(k_1 + 1, n) = 1, i.e. k1Sk_1 \in S. Moreover, (k1)(k1+1)kk1(modn)(k-1)(k_1+1) \equiv k-k_1 \pmod{n} implies that kk1k \neq k_1 if k1k \neq 1. Then the numbers from S{1}S \setminus \{1\} can be divided into different pairs of the form (k,k1)(k, k_1) and hence the wanted remainder is 1.

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

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.