Maths Olympiad Prep

Track / Stage 5 / 26 of 400 #626 of 1964

Problem 626

AIME late
Number theory Difficulty 5.0 Prove it Taiwan IMO Selection Camp · Taiwan · 2023

Find all positive integers nn satisfying both of the following conditions simultaneously:
(a) the number of positive divisors of nn is not a multiple of 8;
(b) for all integers xx, we have
xnxmodn. x^n \equiv x \mod n.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

The answer is n=1n=1 or any prime. We break this down into the following four steps.

1. nn has no square factor

Proof: If p2np^2|n, take x=px=p, then p2xp^2 \nmid x but p2pp2=xp^2|p^{p^2} = x, a contradiction.

2. n=1,pn=1, p or pqpq, where pp and qq are primes

Proof: Since nn has no square factor, nn must be of the form p1p2pmp_1p_2\cdots p_m, hence the number of its divisors is 2m2^m. But since the number of its divisors is not divisible by 8, we must have m<3m<3, as claimed.

3. nn cannot be of the form pqpq

Proof: Without loss of generality assume p<qp < q, and take xx to be a primitive root of qq (that is, the smallest positive integer dd such that adamodna^d \equiv a \mod n). Based on xnxmodqx^n \equiv x \mod q, by minimality, we must have q1n1q-1|n-1, hence
q1n1=pq1=p(q1)+(q1)q1p1, q-1|n-1 = pq-1 = p(q-1) + (q-1) \Rightarrow q-1|p-1,
which contradicts the assumption that p<qp < q.

4. Both n=1n=1 and n=pn=p satisfy the conditions of the problem

Proof: n=1n=1 is obvious, and n=pn=p is Fermat's Little Theorem.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from zh; metadata (topic, difficulty, ordering) added by this project.