Maths Olympiad Prep

Library / /81 of 520

Number theory Difficulty 5.6 AIME, harder Find the answer

Find all natural numbers nn for which 1ϕ(n)+2ϕ(n)++nϕ(n)1^{\phi(n)}+2^{\phi(n)}+\ldots+n^{\phi(n)} is coprime with nn.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Consider the given expression (modp)(\bmod p) where pnp \mid n is a prime number. pnp1ϕ(n)p|n \Rightarrow p-1| \phi(n), thus for any kk that is not divisible by pp, one has kϕ(n)1(modp)k^{\phi(n)} \equiv 1(\bmod p). There are nnpn-\frac{n}{p} numbers among 1,2,,n1,2, \ldots, n that are not divisible by pp. Therefore

1ϕ(n)+2ϕ(n)++nϕ(n)np(modp) 1^{\phi(n)}+2^{\phi(n)}+\ldots+n^{\phi(n)} \equiv-\frac{n}{p} \quad(\bmod p)

If the given expression is coprime with nn, it is not divisible by pp, so pnpp2np \nmid \frac{n}{p} \Rightarrow p^{2} \nmid n. This is valid for all prime divisors pp of nn, thus nn must be square-free. On the other hand, if nn is square-free, one has p2npnpp^{2} \nmid n \Rightarrow p \nmid \frac{n}{p}, hence the given expression is not divisible by pp. Since this is valid for all prime divisors pp of nn, the given two numbers are indeed coprime.

The answer is square-free integers.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.