Must Have A Lot Of Factors

Define a cool number as a positive integer n 2 n \geq 2 that satisfies the following:

For all pairs of factors a , b a, b of n n satisfying gcd ( a , b ) = 1 \gcd (a,b)=1 , then a + b 1 a+b-1 is also a factor of n n .

Find the number of cool numbers under 1000.


The answer is 194.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Sharky Kesa
Aug 10, 2016

Let n = p 1 a 1 p 2 a 2 p k a k n=p_1^{a_1} p_2^{a_2} \ldots p_k^{a_k} . If a = p i a i a=p_i^{a_i} is the smallest prime power dividing n n (Given that p i a i n p_i^{a_i} \mid \mid n ), then b = n p i a i b=\dfrac {n}{p_i^{a_i}} . Note that these two numbers are co-prime. Thus, we have

p i a i + n p i a i 1 n p i a i + n p i a i 1 p i a i ( p i a i + n p i a i 1 ) p i a i + n p i a i 1 p i 2 a i + n p i a i p i a i + n p i a i 1 p i 2 a i p i a i p i a i + n p i a i 1 p i 2 a i p i a i n p i a i ( p i a i 1 ) 2 \begin{aligned} p_i^{a_i} + \dfrac {n}{p_i^{a_i}} - 1 &\mid n\\ p_i^{a_i} + \dfrac {n}{p_i^{a_i}} - 1 &\mid p_i^{a_i}\left ( p_i^{a_i} + \dfrac {n}{p_i^{a_i}} - 1 \right )\\ \implies p_i^{a_i} + \dfrac {n}{p_i^{a_i}} - 1 &\mid p_i^{2a_i} + n - p_i^{a_i}\\ \implies p_i^{a_i} + \dfrac {n}{p_i^{a_i}} - 1 &\mid p_i^{2a_i} - p_i^{a_i}\\ \implies p_i^{a_i} + \dfrac {n}{p_i^{a_i}} - 1 &\leq p_i^{2a_i} - p_i^{a_i}\\ \implies \dfrac {n}{p_i^{a_i}} &\leq (p_i^{a_i}-1)^2 \end{aligned}

If n n has three or more prime factors, choose 2 prime powers distinct from p i a i p_i^{a_i} (Call these two powers p x a x p_x^{a_x} and p y a y p_y^{a_y} .) We get the following:

p x a x p y a y n p i a i ( p i a i 1 ) 2 < p x a x p y a y p_x^{a_x} p_y^{a_y} \leq \dfrac {n}{p_i^{a_i}} \leq (p_i^{a_i}-1)^2 < p_x^{a_x} p_y^{a_y}

This is a contradiction, so n n has at most 2 prime factors.

Let n = p 1 a 1 p 2 a 2 n=p_1^{a_1} p_2^{a_2} . WLOG p 1 < p 2 p_1 < p_2 . We have as follows:

p 1 + p 2 1 n 1 + p 2 1 p 1 p 1 a 1 1 p 2 a 2 p 1 p 2 1 p 2 1 = k p 1 x \begin{aligned} p_1 + p_2 - 1 &\mid n\\ \implies 1+\dfrac {p_2-1}{p_1} &\mid p_1^{a_1-1}p_2^{a_2}\\ \implies p_1 &\mid p_2 - 1\\ \implies p_2 - 1 &= kp_1^x \end{aligned}

where p 1 x p 2 1 p_1^x \mid \mid p_2-1 . We will now consider three cases:

Case 1: a 1 > 1 a_1 > 1

Let a = p 1 2 a=p_1^2 , and b = p 2 b=p_2 . We have:

p 1 2 + p 2 1 n p 1 2 + k p 1 x n p 1 2 ( 1 + k p 1 x 2 ) n if x 2 p 2 1 + k p 1 x 2 n p 1 2 since gcd ( p 1 , 1 + k p 1 x 2 ) = 1 1 + k p 1 x 1 + k p 1 x 2 n p 1 2 \begin{aligned} p_1^2 + p_2 - 1 &\mid n\\ \implies p_1^2 + kp_1^x &\mid n\\ \implies p_1^2(1+kp_1^{x-2}) &\mid n \quad \text{ if } x \geq 2\\ \implies p_2 \mid 1+kp_1^{x-2} &\mid \dfrac {n}{p_1^2} \quad \text{since gcd}(p_1, 1+kp_1^{x-2})=1\\ \implies 1+kp_1^x \mid 1+kp_1^{x-2} &\mid \dfrac {n}{p_1^2} \end{aligned}

Which is a contradiction. Thus, x = 1 x=1 . From this, we get

p 1 2 + k p 1 n p 1 + k n p 2 p 1 + k n k p 1 + 1 p 1 + k k p 1 + 1 p 1 + k k p 1 k p 1 + 1 0 ( k 1 ) ( p 1 1 ) 0 k = 1 p 1 = 2 , p 2 = 3 n = 2 c 3 d 2 + 3 1 n 4 n \begin{aligned} p_1^2 + kp_1 &\mid n\\ \implies p_1+k &\mid n\\ \implies p_2 &\mid p_1 + k \mid n\\ \implies kp_1 + 1 &\mid p_1 + k\\ \implies kp_1 + 1 &\leq p_1 + k\\ \implies kp_1 -k - p_1 + 1 &\leq 0\\ \implies (k-1)(p_1-1) &\leq 0\\ \implies k&=1\\ \implies p_1=2&, p_2=3\\ \implies n=2^c 3^d\\ \implies 2+3-1 \mid n\\ \implies 4 \mid n \end{aligned}

If c 3 c \geq 3 , 8 + 3 1 n 10 n 8+3-1 \mid n \implies 10 \mid n , but 5 5 doesn't divide n n , which is a contradiction. Thus, c = 2 c=2 . Therefore, n = 4 × 3 d n=4\times 3^d . If d 2 d \geq 2 , 9 + 2 1 n 10 n 9+2-1 \mid n \implies 10 \mid n , but 5 5 doesn't divide n n . Thus, d = 1 d=1 . Therefore, n = 12 n=12 , which we verify below:

Factors of 12 12 are 1 , 2 , 3 , 4 , 6 , 12 1, 2, 3, 4, 6, 12 . Co-prime pairs are ( 1 , 1 ) (1, 1) , ( 1 , 2 ) (1, 2) , ( 1 , 3 ) (1, 3) , ( 1 , 4 ) (1, 4) , ( 1 , 6 ) (1, 6) , ( 1 , 12 ) (1, 12) , ( 2 , 3 ) (2, 3) , ( 3 , 4 ) (3, 4) , which yield a + b 1 a+b-1 as 1 , 2 , 3 , 4 , 6 , 12 , 4 , 6 1, 2, 3, 4, 6, 12, 4, 6 respectively, and these are all factors of 12 12 as well, so we're done in this case.

Case 2: n = p 1 p 2 a 2 n=p_1 p_2^{a_2} ( a 2 2 a_2 \geq 2 ) or n = p 1 p 2 n=p_1 p_2 .

If n = p 1 p 2 a 2 n=p_1 p_2^{a_2} ,

p 1 + p 2 a 2 1 p 1 p 2 a 2 p 1 1 p 2 a 2 + 1 p 1 p 2 a 2 p 1 2 \begin{aligned} p_1 + p_2^{a_2} - 1 &\mid p_1 p_2^{a_2}\\ \implies \dfrac {p_1 - 1}{p_2^{a_2}} + 1 &\mid p_1\\ \implies p_2^{a_2} &\mid p_1 - 2 \end{aligned}

But this cannot be true since p 1 < p 2 p_1 < p_2 by our WLOG assumption. Thus, a 2 ≱ 2 a_2 \not \geq 2 .

If n = p 1 p 2 n=p_1 p_2 ,

p 1 + p 2 1 n p 1 + p 2 1 = p 1 p 2 p 1 p 2 p 1 p 2 + 1 = 0 ( p 1 1 ) ( p 2 1 ) = 0 \begin{aligned} p_1 + p_2 - 1 &\mid n\\ \implies p_1 + p_2 - 1 &= p_1 p_2\\ \implies p_1 p_2 - p_1 - p_2 + 1 &= 0\\ \implies (p_1-1)(p_2-1) &= 0\\ \end{aligned}

But this cannot happen as p 1 , p 2 > 1 p_1, p_2 > 1 . Thus, n p 1 p 2 n \neq p_1 p_2 .

Case 3: n = p x n = p^x

This can be proven to be true. One of a a or b b must be 1, since all other factors are powers of p p . WLOG a = 1 a=1 . Thus, a + b 1 = b a+b-1 = b , and we already know b n b \mid n , so we are done. Thus, n = p x n=p^x is a solution.

Computing this, we get the number of satisfying solutions under 1000 is 194.

Salute to you!!
I gave up after concluding that there must be 168 solutions at least i.e. all the primes; I could not even think of any way to solve (and to be very honest, I am trying very hard to understand your solution too :P).
By the way, I have a question. Are you really 14 years of age?

Edit: 168 primes + 8 powers of 2 + 5 powers of 3 + 3 powers of 5 + 2 powers of 7+ 1 power of 11 + 1 power of 13 + 1 power of 17,19,23,29,31 each AND 12; these are the 194 solutions, right?

Yatin Khanna - 4 years, 10 months ago

Log in to reply

Yeah, I'm 14 years old, and these are indeed the 194 solutions. Thanks for the comments! :)

Sharky Kesa - 4 years, 10 months ago

Log in to reply

So, Self-study is the reason for your knowledge?

Yatin Khanna - 4 years, 10 months ago

Log in to reply

@Yatin Khanna Pretty much, along with invitation to the IMO training camps.

Sharky Kesa - 4 years, 10 months ago

Log in to reply

@Sharky Kesa Great! You can be another source of inspiration for me from now on because sometimes I feel ashamed of being 15; after looking at your questions and their solutions.

Yatin Khanna - 4 years, 10 months ago

Just before you conclude that n has at most 2 prime factors, where does the strict inequality come from?

Joe Mansley - 1 year, 10 months ago

Note that p i a i p_i^{a_i} is the smallest prime power dividing n n (e.g. if n = 2 3 × 3 × 5 n=2^3 \times 3 \times 5 , then p i = 3 , a i = 1 p_i = 3, a_i = 1 , etc.) so p i a i < p x a x p_i^{a_i} < p_x^{a_x} , and similar holds for y y . This gives ( p i a i 1 ) 2 < p x a x p y a y (p_i^{a_i} - 1)^2 < p_x^{a_x} p_y^{a_y} .

Sharky Kesa - 1 year, 9 months ago
Zk Lin
Aug 13, 2016

Case 1: n n is an odd number

Let n = a 1 p 1 a 2 p 2 a m p m n={a_{1}}^{p_{1}}{a_{2}}^{p_{2}}\cdots{a_{m}}^{p_{m}} be the prime factorization of n n . We will show that m 2 , 3 m \neq 2,3 .

Suppose that m = 2 m=2 , let n = a p 1 b p 2 n={a}^{p_{1}}{b}^{p_{2}} be the prime factorization of n n . We know that a + b 1 = a q 1 b q 2 a+b-1={a}^{q_{1}}{b}^{q_{2}} , where 0 q 1 p 1 , 0 q 2 p 2 0 \leq q_{1} \leq p_{1}, 0 \leq q_{2} \leq p_{2} .. We argue that one of q 1 q_{1} or q 2 = 0 q_{2}=0 . Suppose this is not the case, then a b 1 a |b-1 and b a 1 b |a-1 . WLOG, let a > b a>b , then this contradicts a b 1 a|b-1 since b 1 = k a b = k a + 1 > a b-1=ka \implies b=ka+1>a .

Without loss of generality, suppose that a q 1 , q 1 > 1 {a}^{q_{1}}, q_{1} > 1 is a factor of n n . Note that both a q 1 + b 1 a^{q_{1}}+b-1 and a q 1 {a}^{q_{1}} are factors of n n . From a + b 1 = a q 1 a+b-1={a}^{q_{1}} , rearrange to get b = a q 1 + 1 a b={a}^{q_{1}}+1-a . Write a q 1 + b 1 = 2 a q 1 a = a r 1 b r 2 {a}^{q_{1}}+b-1=2{a}^{q_{1}}-a={a}^{r_{1}}{b}^{r_{2}} . Note that if both r 1 , r 2 1 r_{1}, r_{2} \geq 1 , then a b 1 a|b-1 and b a q 1 1 b|a^{q_{1}}-1 . Note also that from 2 a q 1 a = a r 1 b r 2 2{a}^{q_{1}}-a={a}^{r_{1}}{b}^{r_{2}} , we have 2 a q 1 2 + 2 a = 2 ( b q ) + 2 a 2a^{q_{1}}-2+2-a=2(bq)+2-a being divisible by b b . This implies b a 2 b|a-2 . However, a b 1 a|b-1 implies b = k a + 1 > a b=ka+1>a , but b a 2 b|a-2 implies a = j b + 2 > b a=jb+2>b . This is clearly a contradiction, hence one of r 1 r_{1} or r 2 r_{2} must be 0 0 . In this case, obviously, r 2 = 0 r_{2}=0 . Division of the equation on both sides by a a yields 2 a q 1 1 1 = a r 1 1 2a^{q_{1}-1}-1=a^{r_{1}-1} . There is only 1 1 solution to this equation, that is q 1 = k 1 = 1 q_{1}=k_{1}=1 . However, this contradicts our assumption that q 1 > 1 q_{1}>1 . Hence, m 2 m \neq 2 .

Suppose that m = 3 m=3 , let n = a p 1 b p 2 c p 3 n=a^{p_{1}}b^{p_{2}}c^{p_{3}} be the prime factorization of n n , and a + b 1 = k c a+b-1=kc , which follows from above (Since m 2 m \neq 2 , a + b 1 a+b-1 must have odd factors which are not a a or b b ). Note that b + c 1 b+c-1 and a + c 1 a+c-1 are also factors of n n . Note that b + c 1 b+c-1 and a + c 1 a+c-1 are both not divisible by c c . Suppose for the sake of contradiction that b + c 1 b+c-1 is divisible by c c , then this implies b 1 b-1 is divisible by c c . However, from a + b 1 = k c a+b-1=kc , this implies a a is divisible by c c , which is a contradiction. The proof for a + c 1 a+c-1 is analogous.

b + c 1 b+c-1 must be divisible by a a or b b if we have m = 3 m=3 . Suppose that b + c 1 b+c-1 is divisible by a a , then a + c 1 a+c-1 is not divisible by a a . Suppose that a + c 1 a+c-1 is divisible by a a , then c 1 c-1 is divisible by a a , and this implies from b + c 1 = k a b+c-1=ka that b b is divisible by a a , clearly a contradiction. Therefore, we have the following system of equations:

a + b 1 = k c a+b-1=kc

b + c 1 = m a b+c-1=ma

a + c 1 = n b a+c-1=nb

which gives ( m + 1 ) a = ( k + 1 ) c = ( n + 1 ) b (m+1)a=(k+1)c=(n+1)b . Solving yields m + 1 = b c e , k + 1 = a b e , n + 1 = a c e m+1=bce, k+1=abe, n+1=ace . Upon substitution back into the original equation, we get a + b + c = a b c e + 1 a+b+c=abce+1 . There is no solution for this equation when a , b , c 3 a,b,c \geq 3 . The proof is left as an exercise to the readers.

Now, if we suppose that b + c 1 b+c-1 is divisible by b b , then a + c 1 a+c-1 is divisible by a a . The proof is analogous to the part where we assume b + c 1 b+c-1 to be divisible by a a . We have the following system of equations:

a + b 1 = k c a+b-1=kc

b + c 1 = l b b+c-1=lb

a + c 1 = m a a+c-1=ma

The system of equations imply that c 1 c-1 is divisible by both a a and b b . Write c = p a b + 1 c=pab+1 . Substitution into the first equation gives a + b 1 = k ( p a b + 1 ) = k p a b + k a+b-1=k(pab+1)=kpab+k . However, note that for a , b 3 a,b \geq 3 ,

k p a b + k > k p a b > a b > a + b > a + b 1 kpab+k>kpab>ab>a+b>a+b-1

so there is no solution to the equations above.

Having proven that m 2 , 3 m \neq 2,3 , we proceed to show that n > 1000 n>1000 for m 4 m \geq 4 since 3.5.7.11 = 1155 > 1000 3.5.7.11=1155>1000 . Therefore, m = 1 m=1 . It is easy to note that any numbers in the form of n = a p i n=a^{p_i} is indeed cool since the factors of n n are 1 , a , a 2 a p n 1,a,a^{2} \cdots a^{p_{n}} , of which only the pairs of factors ( 1 , a p i ) (1,a^{p_{i}}) meet the criteria of gcd ( a , b ) = 1 \gcd(a,b)=1 . But a + b 1 = 1 + a p i 1 = a p i a+b-1=1+a^{p_{i}}-1=a^{p_{i}} , and these are clearly factors of n n .

Case 2: n n is an even number.

We neglect the case where n n is a power of 2 2 , since these are obviously cool numbers. (Proof is analogous to our proof of n = a p i n=a^{p_{i}} as cool numbers). Therefore, we can assume that n n has the factors 2 2 and a a , where a a is odd.

Since a a is relatively prime to 2 2 , 2 a 2a is a factor of n n as well. By the definition of cool numbers, a + 2 1 = a + 1 a+2-1=a+1 is a factor as well. Since a a is relatively prime to a + 1 a+1 , a ( a + 1 ) a(a+1) is also a factor. Therefore, n n has the following factors: 1 , 2 , a , 1 + a , 2 a , a ( a + 1 ) 1,2,a,1+a,2a, a(a+1) .

The family of factors above is closed under the operation of a + b 1 a+b-1 as long as gcd ( a , b ) = 1 \gcd(a,b)=1 . This fulfills the condition of cool numbers above as long as the factors of a + 1 a+1 belong to the family above. In particular, since a + 1 a+1 is coprime with a a , a + 1 a+1 must only have 2 2 as its factor (besides 1 1 and itself). This leaves the only possibility, that is a + 1 = 4 a = 3 a+1=4 \implies a=3 . These factors define n n as 12 12 .

Now, suppose that a 3 a \neq 3 . If a + 1 a+1 is divisible by odd factors, then we are done. The proof follows from the part where we prove m 2 , 3 m \neq 2,3 . The proof still holds even when n n is even, so we can conclude that no such n n exists. If a + 1 a+1 is not divisible by any odd factors, it is a power of 2 2 . Since a + 1 4 a+1 \neq 4 , a + 1 a+1 must equal 2 n 2^{n} , where n 3 n \geq 3 . Thus, we have the following factors for n : 1 , 2 , 4 , 8 , a , a + 1 , 2 a n: 1,2,4,8,a,a+1,2a .

By definition of cool numbers, 4 + a 1 = a + 3 4+a-1=a+3 and 8 + a 1 = a + 7 8+a-1=a+7 are also factors. Suppose that gcd ( a , a + 3 ) = gcd ( a , 3 ) = 1 \gcd(a,a+3)=\gcd(a,3)=1 , then this implies a + 3 a+3 is a power of 2 2 . Since both a + 1 a+1 and a + 3 a+3 are powers of 2 2 , a = 1 a=1 but we know this is not the case. Suppose now that gcd ( a , a + 3 ) = 3 1 \gcd(a,a+3)=3 \neq 1 , then we know a = 3 n , n > 1 a=3^{n}, n>1 . Note that gcd ( a , a + 7 ) = gcd ( a , 7 ) = gcd ( 3 n , 7 ) = 1 \gcd(a,a+7)=\gcd(a,7)=\gcd(3^{n},7)=1 , so a + 7 a+7 is not divisible by 3 3 , hence a power of 2 2 . But now both a + 1 a+1 and a + 7 a+7 are powers of 2 2 , which is impossible. Our proof is complete. All cool numbers below 1000 1000 must be in the form n = a p i n=a^{p_{i}} with a a prime and p i > 0 p_{i}>0 , bar the exception of 12 12 .

A quick computation (with aid of a list of prime numbers under 1000 1000 ) shows that there are 194 \boxed{194} such numbers.

Great solution! +1 A slightly better solution is that you prove a general case for Case 1; that this is impossible for m > 3 m>3 .

Sharky Kesa - 4 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...