Let be a positive integer. We say that a positive integer is -good if is divisible by for all positive integers with . Suppose is a positive integer such that is -good, but is not -good. Prove that is prime.
, 2020
Solutions — 2
Solution 1
We first show that is -good iff is even and for all primes . Suppose there is a prime with , take . Then there exist positive integers such that . Take large enough (so that ) and let , then . Let . Since , divides , so , hence . Since , does not divide , thus is not -good.
On the other hand, if for all prime , then is coprime to . divides iff . Easy to check that . Thus we know that is -good iff is even.
This completes the claim.
Back to the problem, suppose is -good, then is even and for all primes . Since is not -good, we must have is prime.
Solution 2
First, we show the only if part of the claim in Solution 1. Suppose that we have a prime with . Suppose the digit of the expansion of in base is nonzero. Since , can find such that the digit of is and the digit of is 0. Thus, and by Lucas' theorem. Thus, is not -good.
Now we show that if is -good but is not, then there must be a prime dividing for some , which also divides . Indeed, the ratio between and is . By -good property, choose so that and , which means that the given ratio must not be . So cannot be coprime to . Since for all primes , these condition force that either or to be a prime.
By choosing a prime (by Dirichlet's theorem), easy to check that must be even. So cannot be prime.