Olympiad Maths Prep

Track / Stage 7 / 193 of 300 #1593 of 2000

Problem 1593

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.4 Prove it

Two positive integers aa and bb are prime-related if a=pba=p b or b=pab=p a for some prime pp. Find all positive integers nn, such that nn has at least three divisors, and all the divisors can be arranged without repetition in a circle so that any two adjacent divisors are prime-related.

Note that 1 and nn are included as divisors.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solutions — 2

Solution 1

We say that a positive integer is good if it has the given property. Let n n be a good number, and let d1,d2,,dk d_{1}, d_{2}, \ldots, d_{k} be the divisors of n n in the circle, in that order. Then for all 1ik,di+1/di 1 \leq i \leq k, d_{i+1} / d_{i} (taking the indices modulo k k ) is equal to either pi p_{i} or 1/pi 1 / p_{i} for some prime pi p_{i} . In other words, di+1/di=piϵi d_{i+1} / d_{i} = p_{i}^{\epsilon_{i}} , where ϵi{1,1} \epsilon_{i} \in \{1, -1\} . Then

p1ϵ1p2ϵ2pkϵk=d2d1d3d2d1dk=1 p_{1}^{\epsilon_{1}} p_{2}^{\epsilon_{2}} \cdots p_{k}^{\epsilon_{k}} = \frac{d_{2}}{d_{1}} \cdot \frac{d_{3}}{d_{2}} \cdots \frac{d_{1}}{d_{k}} = 1

For the product p1ϵ1p2ϵ2pkϵk p_{1}^{\epsilon_{1}} p_{2}^{\epsilon_{2}} \cdots p_{k}^{\epsilon_{k}} to equal 1, any prime factor p p must be paired with a factor of 1/p 1 / p , and vice versa, so k k (the number of divisors of n n ) must be even. Hence, n n cannot be a perfect square.

Furthermore, n n cannot be the power of a prime (including a prime itself), because 1 always is a divisor of n n , and if n n is a power of a prime, then the only divisor that can go next to 1 is the prime itself.

Now, let n=paqb n = p^{a} q^{b} , where p p and q q are distinct primes, and a a is odd. We write the divisors of n n in a grid as follows: In the first row, write the numbers 1,q,q2,,qb 1, q, q^{2}, \ldots, q^{b} . In the next row, write the numbers p,pq,pq2,,pqb p, p q, p q^{2}, \ldots, p q^{b} , and so on. The number of rows in the grid, a+1 a+1 , is even. Note that if two squares are adjacent vertically or horizontally, then their corresponding numbers are prime-related. We start with the square with a 1 in the upper-left corner. We then move right along the first row, move down along the last column, move left along the last row, then zig-zag row by row, passing through every square, until we land on the square with a p p . The following diagram gives the path for a=3 a=3 and b=5 b=5 :

!

Thus, we can write the divisors encountered on this path in a circle, so n=paqb n = p^{a} q^{b} is good.

Next, assume that n n is a good number. Let d1,d2,,dk d_{1}, d_{2}, \ldots, d_{k} be the divisors of n n in the circle, in that order. Let p p be a prime that does not divide n n . We claim that npe n \cdot p^{e} is also a good number. We arrange the divisors of npe n \cdot p^{e} that are not divisors of n n in a grid as follows:

d1pd1p2d1ped2pd2p2d2pedkpdkp2dkpe \begin{array}{cccc} d_{1} p & d_{1} p^{2} & \ldots & d_{1} p^{e} \\ d_{2} p & d_{2} p^{2} & \ldots & d_{2} p^{e} \\ \vdots & \vdots & \ddots & \vdots \\ d_{k} p & d_{k} p^{2} & \ldots & d_{k} p^{e} \end{array}

Note that if two squares are adjacent vertically or horizontally, then their corresponding numbers are prime-related. Also, k k (the number of rows) is the number of factors of n n , which must be even (since n n is good). Hence, we can use the same path described above, which starts at d1p d_{1} p and ends at d2p d_{2} p . Since d1 d_{1} and d2 d_{2} are adjacent divisors in the circle for n n , we can insert all the divisors in the grid above between d1 d_{1} and d2 d_{2} , to obtain a circle for npe n \cdot p^{e} .

Finally, let n n be a positive integer that is neither a perfect square nor a power of a prime. Let the prime factorization of n n be

n=p1e1p2e2ptet n = p_{1}^{e_{1}} p_{2}^{e_{2}} \cdots p_{t}^{e_{t}}

Since n n is not the power of a prime, t2 t \geq 2 . Also, since n n is not a perfect square, at least one exponent ei e_{i} is odd. Without loss of generality, assume that e1 e_{1} is odd. Then from our work above, p1e1p2e2 p_{1}^{e_{1}} p_{2}^{e_{2}} is good, so p1e1p2e2p3e3 p_{1}^{e_{1}} p_{2}^{e_{2}} p_{3}^{e_{3}} is good, and so on, until n=p1e1p2e2ptet n = p_{1}^{e_{1}} p_{2}^{e_{2}} \cdots p_{t}^{e_{t}} is good.

Therefore, a positive integer n n has the given property if and only if it is neither a perfect square nor a power of a prime.

Solution 2

To solve the problem, we need to find all positive integers n n such that n n has at least three divisors, and all the divisors can be arranged in a circle so that any two adjacent divisors are prime-related.

1. Prime Power Case:
- If n n is a prime power, say n=pk n = p^k where p p is a prime and k1 k \geq 1 , then the divisors of n n are 1,p,p2,,pk 1, p, p^2, \ldots, p^k .
- For n n to have at least three divisors, k2 k \geq 2 .
- However, in this case, 1 1 and p p must be adjacent, and p p and p2 p^2 must be adjacent. But 1 1 and p2 p^2 are not prime-related, so n n cannot be a prime power.

2. Perfect Square Case:
- If n n is a perfect square, say n=m2 n = m^2 , then n n has an odd number of divisors.
- Consider the sum of the exponents of the primes in the prime factorization of a number. Each move (from one divisor to the next) changes the parity of this sum.
- Starting from 1 1 and ending at 1 1 after an odd number of moves implies that the parity of the sum of the exponents changes an odd number of times, which is a contradiction.
- Therefore, n n cannot be a perfect square.

3. General Case:
- We claim that integers n n with at least three prime factors work.
- Consider n=paqb n = p^a q^b where p p and q q are primes and a,b1 a, b \geq 1 .
- Assume b b is odd. We can construct a sequence of divisors as follows:
1,q,pq,p2q,,pa1q,q2pa1,q2pa2,,pq2,q2,q3,q3p,,qb,qbp,qbp2,,qbpa1 1, q, pq, p^2q, \ldots, p^{a-1}q, q^2p^{a-1}, q^2p^{a-2}, \ldots, pq^2, q^2, q^3, q^3p, \ldots, q^b, q^bp, q^bp^2, \ldots, q^bp^{a-1}
- This sequence maintains the condition that any two adjacent divisors are prime-related.
- The remaining divisors are of the form pi p^i and paqj p^a q^j for 1jb 1 \leq j \leq b . We attach the following string:
paqb,paqb1,,paq,pa,pa1,pa2,,p p^a q^b, p^a q^{b-1}, \ldots, p^a q, p^a, p^{a-1}, p^{a-2}, \ldots, p
- This construction works for n=paqb n = p^a q^b .

4. Inductive Step:
- Assume that for n=i=1k1piai n = \prod_{i=1}^{k-1} p_i^{a_i} , there is a valid construction.
- For n=i=1k+1piai n' = \prod_{i=1}^{k+1} p_i^{a_i} , consider the sequence:
b1,b2,,bl,pbl,p,bl1,,pb3,pb2,p2b2,p2b3,,p2bl, b_1, b_2, \ldots, b_l, p b_l, p, b_{l-1}, \ldots, p b_3, p b_2, p^2 b_2, p^2 b_3, \ldots, p^2 b_l, \ldots
- If ak+1 a_{k+1} is even, the sequence ends with pak+1bl p^{a_{k+1}} b_l . If ak+1 a_{k+1} is odd, it ends with pak+1b2 p^{a_{k+1}} b_2 .
- Add the following string:
pak+1b1,pak+11b1,,p2b1,pb1 p^{a_{k+1}} b_1, p^{a_{k+1}-1} b_1, \ldots, p^2 b_1, p b_1
- This construction works, and every number which is not a square or a prime power works.

\blacksquare

The final answer is all positive integers n \boxed{ n } that are not prime powers or perfect squares.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.