Really! composite

What is the smallest positive integer n , n, such that 2 n ! 1 2^{n!}-1 is divisible by all odd primes p < 1000 p<1000 ?

Details and assumptions

You may use this List of 1000 Primes .


The answer is 491.

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.

5 solutions

Logan Dymond
Nov 10, 2013

Fermat's Little theorem tells us 2 p 1 1 m o d p 2^{p-1} \equiv 1 \mod p for all odd primes since no odd prime divides 2 2 . Raising each side to the k t h k^{th} power, we have 2 k ( p 1 ) 1 k 1 m o d p 2^{k(p-1)} \equiv 1^k \equiv 1 \mod p or 2 k ( p 1 ) 1 2^{k(p-1)}-1 is divisible by p p for all odd primes. Hence, for 2 n ! 1 2^{n!}-1 to be divisible by an odd prime p p , n ! n! must have a factor of p 1 p-1 .

Consider the set of all numbers which are 1 less than an odd prime p < 1000 p<1000 . Each of these numbers must divide n ! n! , so we proceed by factorizing them. Consulting the given list, the factorizations of the last numbers in this set are:

997 1 = 996 = 2 2 3 83 997-1=996=2^2*3*83

991 1 = 990 = 2 3 2 5 11 991-1=990=2*3^2*5*11

983 1 = 982 = 2 491 983-1=982=2*491

Since 491 491 is prime, for no m < 491 m<491 will m ! m! have a factor of 491 491 , so we need n 491 n\geq 491 . Note, all numbers of this set except for 996 996 , 990 990 , and 983 983 can be factorized into 2 q 2*q where q < 491 q<491 . By definition of factorial, we can find factors of 2 2 and q q in 491 ! 491! . We can also find factors of 2 2 2^2 , 3 2 3^2 , 5 5 , 11 11 , and 83 83 since they are each less than 491 491 . Thus, 2 491 ! 1 2^{491!}-1 is divisible by all odd primes p < 1000 p<1000 .

We have shown that n = 491 n=491 satisfies the conditions and is indeed the minimum, so our answer is 491 \boxed{491}

A small but important detail seems to be missing. Fermat's theorem only works one way: if p 1 p-1 divides n , n, then p p divides 2 n 1. 2^n-1. But the converse is not always true. For example, 2 35 1 2^{35}-1 is divisible by 31 31 even though 35 {35} is not divisible by 30 30 . So when you say that n ! n! must have a factor p 1 , p-1, it is actually not correct. How can you fix this?

Alexander Borisov - 7 years, 7 months ago

Log in to reply

I added it to the comment section of my solution. Essentially, if there existed a k k that was less than 491 491 such that 2 k 1 2^k - 1 was divisible by 491 491 , then k k would have to be a divisor of 491 491 , but the only divisors of 491 491 are 1 1 and 491 491 . It's clearly not 1 1 , so 491 491 is minimized. In technical terms,

O 983 ( 2 ) = 491 O_{983} (2) = 491 .

Michael Tong - 7 years, 7 months ago

Log in to reply

Yes, this is exactly right.

Alexander Borisov - 7 years, 7 months ago

Log in to reply

@Alexander Borisov Very nice observation. I was having a doubt about that, Thanks!

A Brilliant Member - 7 years, 6 months ago

We can prove that 491 is the smallest positive integer such that 983 983 divides 2 491 1 2^{491}-1 . If there exists a positive integer k k with k < 491 k < 491 then k = o r d ( 983 ) ( 2 ) k = ord_(983)(2) , therefore k k must divides 491 491 , but since 491 491 is a prime number, k k must be 1 1 . Obviously, we have 491 491 is our answer.

Cuong Doan - 7 years, 7 months ago

Carmichael function?

Nathan Weckwerth - 7 years, 7 months ago

Very clear. I did the same way but could not express it in proper words!

Vikram Waradpande - 7 years, 7 months ago

I do think you need to append a small thing- we need to show that, for example, there are not two factors of 251. I don't think it's that tough though. Nice proof!

Nathan Weckwerth - 7 years, 7 months ago

Log in to reply

Actually, I did address that issue, though not directly.

First note that only the maximum number of factors of a prime p p that appears in the set of numbers 1 less than a prime divisor is needed in our exponent. For example, if we want to find minimum k k such that 2 k 1 2^k-1 divides both 5 5 and 7 7 , we first look at the prime factorizations of 4 4 and 6 6 . We have 4 = 2 2 4=2^2 and 6 = 2 3 6=2*3 . Although we can see 3 factors of 2 2 , our k k only needs to have 2 factors of 2 2 since that will satisfy each divisibility condition separately. Thus, k = 2 2 3 = 12 k=2^2*3=12 , and we check that 2 12 1 = 4095 2^{12}-1=4095 is indeed divisible by 5 5 and 7 7 .

So how do we know that we've taken care of the maximum possible number of factors of each possible prime? Well, I didn't directly address that part, rather, I structured my solution in such a way that I didn't have to. The crucial line is:

Note, all numbers of this set except for 996 996 , 990 990 , and 983 983 can be factorized into 2 q 2*q where q < 491 q<491 . By definition of factorial, we can find factors of 2 2 and q q in 491 ! 491! .

I will explain this a little more thoroughly. We are looking at all of the odd primes. 1 less than an odd prime is even, so we can factor out a 2 2 and look at the rest, which I call q q . Let's expand 491 ! 491! . Since q < 491 q<491 , we can write

491 ! = 2 3 4 . . . ( q 1 ) q ( q + 1 ) . . . 490 491 491!=2*3*4*...*(q-1)*q*(q+1)*...*490*491

Thus 491 ! 491! has a factor of both 2 2 and q q . We've just shown that 491 ! 491! has a factor of each number in the set, and we didn't even factorize fully!

Logan Dymond - 7 years, 7 months ago

Wooh! I had to give up on this problem. Excellent solution! I would like it, though, if that block of text was a bit split up.

Tanishq Aggarwal - 7 years, 7 months ago
Daniel Liu
Nov 11, 2013

From Fermat's Little Theorem, a p 1 1 ( m o d p ) a^{p-1}\equiv 1\pmod{p} where p p is a prime and p ∤ a p\not |a .

Therefore, 2 p 1 1 0 ( m o d p ) 2^{p-1}-1\equiv 0\pmod{p} or equivalently, p 2 p 1 1 p|2^{p-1}-1 .

Now all we need to find is the largest possible prime factor of p 1 p-1 , with p p any prime under 1000 1000 .

Since 983 1 = 982 = 2 × 491 983-1=982=2\times 491 , and that 997 1 = 996 = 2 2 × 3 × 83 997-1=996=2^2\times3\times83 , then 491 491 must be the largest prime factor.

(This is because 2 p 1 2|p-1 for p 2 p\ne 2 , so the highest prime you can get is p 1 2 \dfrac{p-1}{2} .)

Therefore, the smallest n n can be is 491 \boxed{491} .

In addition, you also have to check the prime factorization of 990 990 , as I forgot. But it turns out there were no prime factors larger than 491.

Also, you would have t prove that there does not exist a prime q q such that q 2 > p q^2>p and q q appears more than once in the prime factorization of the product of all p 1 p-1 such that p < 1000 p<1000 .

Daniel Liu - 7 years, 7 months ago

oh my gat! cool solutipn

Daniel Wang - 7 years, 6 months ago

For all positive integers k k and n n , we define ord k ( n ) \text{ord}_k(n) to be the smallest positive integer m m such that k m 1 ( m o d n ) k^m \equiv 1 \pmod{n} .

Claim If, for some positive integers k , n , v k, n, v , k v 1 ( m o d n ) k^v \equiv 1 \pmod{n} , then v v must be a multiple of ord k ( n ) \text{ord}_k(n) .

Proof We write v = a × ord k ( n ) + b v= a \times \text{ord}_k(n) + b for some non negative integers a , b a, b such that 0 b ord k ( n ) 1 0 \leq b \leq \text{ord}_k(n)-1 by the division algorithm. Then, note that k v k a × ord k ( n ) + b ( k ord k ( n ) ) a × k b ( m o d n ) k^v \equiv k^{ a \times \text{ord}_k(n) + b} \equiv \left ( k^{\text{ord}_k(n)} \right ) ^a \times k^b \pmod{n} 1 × k b k b ( m o d n ) \equiv 1 \times k^b \equiv k^b \pmod{n} Since k v 1 ( m o d n ) k^v \equiv 1 \pmod{n} , we have k b 1 ( m o d n ) k^b \equiv 1 \pmod{n} . However, b > 0 b>0 contradicts the minimality of ord k ( n ) \text{ord}_k(n) , so we must have b = 0 b=0 . This implies ord k ( n ) v \text{ord}_k(n) \mid v . QED
Note that by Euler's theorem, for all co-prime k k and n n , k ϕ ( n ) 1 ( m o d n ) k^{\phi (n)} \equiv 1 \pmod{n} . From our first claim, it readily follows that ϕ ( n ) \phi (n) must be a multiple of ord k ( n ) \text{ord}_k(n) .
For all positive integers m m , let f ( m ) f(m) denote the largest prime divisor of ord 2 ( m ) \text{ord}_2(m) . Consider any odd prime p p within the range [ 1 , 1000 ] [1, 1000] . Since 2 n ! 1 ( m o d p ) 2^{n!} \equiv 1 \pmod{p} , n ! n! must be a multiple of ord 2 ( p ) \text{ord}_2(p) . For n ! n! to be a multiple of ord 2 ( p ) \text{ord}_2(p) , it must be a multiple of its greatest prime factor, i.e it must be a multiple of f ( p ) f(p) .
From our previous observations, our answer will be simply the largest value of f ( p ) f(p) , where p p ranges among all odd primes in the range [ 1 , 1000 ] [1, 1000] . Let's calculate ord 2 ( 983 ) \text{ord}_2(983) . Note that ϕ ( 983 ) = 982 = 2 × 491 \phi (983) = 982= 2 \times 491 , so we only have to check for 1 1 , 2 2 , 491 491 , and 982 982 . Checking it, we find out ord 2 ( 983 ) = 491 \text{ord}_2(983)= 491 . Again, since 491 491 is prime, we have f ( 983 ) = 491 f(983)= 491 .


The primes larger than 983 983 but less than 1000 1000 are 991 991 and 997 997 . Note that 991 1 ( m o d 3 ) 991 \equiv 1 \pmod{3} , so 3 991 1 3 \mid 991-1 , i.e. 3 ϕ ( 991 ) 3 \mid \phi(991) . It is now easy to see that f ( 991 ) 991 1 3 f(991) \leq \frac{991-1}{3} , which is obviously less than 491 491 . Similarly, we find out that f ( 997 ) < f ( 983 ) f(997)<f(983) . For all smaller odd primes p p , note that p 1 p-1 is even, so f ( p ) p 1 f(p)|p-1 , and hence f ( p ) p 1 2 < 983 1 2 = 491 f(p) \leq \frac{p-1}{2} < \frac{983-1}{2}= 491 We thus conclude the maximum value of f ( p ) f(p) is 491 491 , which is attained for p = 983 p= 983 . Our desired answer, hence, is 491 \boxed{491} .

I just noticed that my solution is slightly incomplete. However, I think it can be made correct.

Firstly, change the definition of f ( p ) f(p) as the largest number of the form q n q^n which divides ord 2 ( p ) \text{ord}_2(p) , where q q is a prime. The contradiction I showed for smaller primes doesn't work for primes of the form 2 n + 1 2^n+1 . Note that 2 n + 1 0 ( m o d 3 ) 2^n + 1 \equiv 0 \pmod{3} if n 1 ( m o d 2 ) n \equiv 1 \pmod{2} . So for 2 n + 1 2^n+1 to be prime, n n must be even. There exists no such even n n such that 491 < 2 n + 1 < 1000 491<2^n+1<1000 .

Sreejato Bhattacharya - 7 years, 7 months ago
Michael Tong
Nov 12, 2013

When I saw this problem, I immediately thought of Fermat's Little Theorem. This theorem states that a p 1 1 ( m o d p ) a^{p-1} \equiv 1 \pmod p , for a Z + a \in \mathbb{Z}^+ and prime p p .

Thus, if n ! n! is divisible by p 1 p - 1 , then 2 n ! 1 ( m o d p ) 2^{n!} \equiv 1 \pmod p since 2 n ! 2^{n!} is simply ( 2 p 1 ) k (2^{p - 1})^k for some positive integer k k , thus it is still congruent to 1 ( m o d p ) 1 \pmod p .

Immediately following, if n ! n! is divisible by every p 1 p - 1 for p < 1000 p < 1000 , then 2 n ! 1 0 ( m o d p ) 2^{n!} - 1 \equiv 0 \pmod p , i.e. it is divisible by all p < 1000 p < 1000 .

So, we just have to find the largest prime in the prime factorization of any p 1 p - 1 for p < 1000 p < 1000 . Checking the largest few, we quickly come to p 1 = 982 = 2 × 491 p - 1 = 982 = 2 \times 491 . So, 491 491 is the largest factor, thus 2 491 ! 1 2^{491!} - 1 is the smallest integer which is divisible by all odd primes p < 1000. p < 1000. \blacksquare

To prove that 2 491 ! 2^{491!} is truly minimized, we will show that there does not exist a k < 491 k < 491 such that 2 k 1 ( m o d 491 ) 2^k \equiv 1 \pmod {491} . Say there such a k k exists. Then, 2 k 2 n k 1 ( m o d 491 ) 2^k \equiv 2^nk \equiv 1 \pmod {491} for n Z + n \in \mathbb{Z}^+ .

However, the above statement implies that 491 = n k 491= nk since k < 491 k < 491 , which means that 491 491 is composite (since n , k > 1 n, k > 1 ). However, 491 491 is prime, a contradiction, thus n ! n! must have a factor of 491 491 , thus it is minimized.

Michael Tong - 7 years, 7 months ago

So, we just have to find the largest prime in the prime factorization of any p 1 p-1 for p < 1000 p < 1000 .

I disagree with this. A necessary condition for n ! n! to be a multiple of m m is that n n must be \geq the largest prime divisor of m m , but I'm afraid that's not a sufficient condition. The sufficient condition is that n n must be \geq the largest divisor of m m which is of the form q k q^k for some prime q q . An explicit counterexample of your claim:

Note that the largest prime divisor of 18 18 is 3 3 , but 18 ∤ 3 ! 18 \not \mid 3! .

Sreejato Bhattacharya - 7 years, 7 months ago

from Fermat's little theorem ,2^{p-1} is congruence 1 mod p from 983 is prime so 983 divide 2^{n!}-1 so 982 is divide n! so 491 is divide n! n>=491

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...