Maths Olympiad Prep

Library / /25 of 101

Number theory Difficulty 5.6 AIME, harder Prove it Estonia

Find all positive integers nn such that n!n! is not divisible by n2n^2.

Solutions — 2

Solution 1

For any prime pp, p2p!p^2 \nmid p! as prime pp occurs only once in the prime factorization of p!p!. Additionally, 42=164^2 = 16 does not divide 4!=244! = 24. We will show that n2n!n^2 \mid n! for all other positive integers nn. Let pp be a prime factor of nn, and kk the exponent of pp in the prime factorization of nn. If there exists a different prime factor qq of nn, then both pkp^k and pkqp^kq are in the set of integers from 1 to nn and hence p2kn!p^{2k} \mid n!. This holds for all prime factors pp of nn.

Thus n2n^2 divides n!n! for all nn with at least two distinct prime factors. Now consider the remaining integers n=pkn = p^k for prime pp. For k3k \ge 3 all three integers pp, pk1p^{k-1}, and pkp^k are distinct factors in n!n!, implying that p2k=n2p^{2k} = n^2 divides n!n!. For k=2k = 2 and p>2p > 2 the integers pp, 2p2p, and p2p^2 are distinct factors in n!n!, implying that p4=n2p^4 = n^2 divides n!n!.

Solution 2

We find all positive integers nn such that n(n1)!n \mid (n-1)!; obviously this condition is equivalent to that of the problem. For prime nn, no integer less than nn can have a prime factor nn and thus nn cannot divide (n1)!(n-1)!. For n=4=22n = 4 = 2^2, 4 does not divide (n1)!=6(n-1)! = 6. On the other hand, for n=p2n = p^2 where p>2p > 2 is prime, the integers pp and 2p2p are in the set of integers from 1 to n1n-1, implying p2=n(n1)!p^2 = n \mid (n-1)!. If nn is a cube or a higher power of some prime, or has at least two prime factors, then it obviously has a divisor dd such that 1<d<n1 < d < n and d2nd^2 \neq n (e.g. the smallest prime factor of nn). Hence dd and nd\frac{n}{d} are distinct positive integers less than nn and their product nn divides (n1)!(n-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.