Find the number of positive integers m ≤ 1 0 0 such that for at least 5 0 0 values of positive integers n , 1 ≤ n ≤ 1 0 0 0 , there exist a prime p and integers a and b such that ⎩ ⎪ ⎨ ⎪ ⎧ a n ≡ a m ≡ b ( m o d p ) b n ≡ a ( m o d p ) ( a 2 − a ) ( b 2 − b ) ≡ 0 ( m o d p )
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.
A tiny typo you have somewhere at the end, it should be: 4 6 7 + 3 0 = 4 9 7 < 5 0 0
Actually m can be 14, 34, 56, 64, 76, 86 and 94. So the correct answer is 57.
Log in to reply
Whoa! Missed it. :( In fact your claim is right (I wrote a python code to check it), the answer is indeed 5 7 . I'll launch a dispute to the Brilliant staff now. :)
Log in to reply
I have already done that.
Log in to reply
@Si Yu How – I've fixed this.
Si Yu, I do not see a dispute generated from you. Can you check if you are able to send a dispute for this problem?
Log in to reply
@Calvin Lin – I didn't see the dispute button so I sent an email to support@brilliant.org.
The conditions imply that a m n − 1 and a m − n are both congruent to 1 mod p . Let x be the order of a mod p . So x divides gcd ( m n − 1 , m − n ) . Note that this equals gcd ( m 2 − 1 , m − n ) . Conversely, if gcd ( m 2 − 1 , m − n ) = x > 1 , we can find p , a , b satisfying the conditions; just take p ≡ 1 mod x and let a be an element of multiplicative order x , and b ≡ a m .
So we must find all values of m such that the size of the set { n ∈ Z : 1 ≤ n ≤ 1 0 0 0 , g c d ( m 2 − 1 , m − n ) > 1 } is at least 500.
If m is odd, then this set is always big enough since all odd n are in it. If m is even, then a computer search seems to be the easiest way to proceed; I get { 1 4 , 3 4 , 5 6 , 6 4 , 7 6 , 8 6 , 9 4 } as the admissible even values. So the total number is 5 7 .
Problem Loading...
Note Loading...
Set Loading...
Claim If a , b , c , n are four natural numbers such that a b ≡ a c ≡ 1 ( m o d n ) , then a g cd ( b , c ) ≡ 1 ( m o d n ) .
Proof Let G = g cd ( b , c ) . By Bezouts's lemma, we can find two integers u and v such that b u + c v = G . Then, note that a G ≡ a b u + c v ≡ ( a b ) u × ( b c ) v ≡ 1 ( m o d n ) This proves our desired result. QED
Claim If p is a prime and q is a prime divisor of p − 1 , then we can find a positive integer a ≡ 1 ( m o d p ) such that a q ≡ 1 ( m o d p ) .
Proof Let f ( x ) = x q p − 1 − 1 . Consider the residues of f ( x ) ( m o d p ) . Since the degree of f ( x ) is q p − 1 , it can have at most q p − 1 roots. Again, note that q p − 1 < p − 1 . Then, there must exist an integer r such that p ∣ r , and r q p − 1 ≡ 1 ( m o d p ) . Take a = r q p − 1 . Then, note that a q ≡ r p − 1 ≡ 1 ( m o d p ) where the last step follows from Fermat's little theorem. This proves our desired result. QED We now go back to the main problem. Note that ( a 2 − a ) ( b 2 − b ) = a b ( a − 1 ) ( b − 1 ) Then, ( a 2 − a ) ( b 2 − b ) ≡ 0 ( m o d p ) simply means p divides neither of a , b , a − 1 , b − 1 . Since p ∣ a , g cd ( p , a ) = 1 . The first congruence yields: a n − m ≡ 1 ( m o d p ) Note that b n − m ≡ ( a m ) n − m ≡ ( a n − m ) m ≡ 1 ( m o d p ) Note that b n = b n − m × b m . The second congruence yields: b n − m × b m ≡ a ( m o d p ) ⟹ 1 × ( a m ) m ≡ a ( m o d p ) ⟹ a m 2 ≡ a ( m o d p ) Again, since g cd ( a , p ) = 1 , we can divide both sides by a to obtain: a m 2 − 1 ≡ 1 ( m o d p ) Now, note that if g cd ( n − m , m 2 − 1 ) = 1 , the first claim alongside the congruencies a n − m ≡ 1 ( m o d p ) and a m 2 − 1 ≡ 1 ( m o d p ) yields: a 1 ≡ 1 ( m o d p ) This is a contradiction, since the third condition states that p ∣ a − 1 .
So far, we have been able to prove that a necessary condition for the existence of such a ( a , b ) is g cd ( n − m , m 2 − 1 ) > 1 . We shall now prove that this is the sufficient condition.
Let q be a prime divisor of m 2 − 1 . Dirichlet's theorem states that there exists a prime p such that q ∣ p − 1 . From the second claim, we can find a positive integer a such that a ≡ 1 ( m o d p ) and a q ≡ 1 ( m o d p ) . Take b = a m . Note that if q ∣ m − 1 , b ≡ a m ≡ a m − 1 × a ≡ ( a q ) q m − 1 × a ≡ a ( m o d p ) Again, if q ∣ m + 1 , we have: b ≡ a m ≡ a a m + 1 ≡ a ( a q ) q m + 1 ≡ a 1 ( m o d p ) It is now obvious that a and b satisfy the mentioned conditions.
Conclusion
For each m , the number n satisfies the mentioned conditions iff m 2 − 1 and m − n share a common prime factor. We then have to find the number of positive integers m ≤ 1 0 0 such that there are strictly more than 4 9 9 values of n such that m − n and m 2 − 1 share a common prime factor.
Case 1 : m ≡ 1 ( m o d 2 )
Then, note that 2 ∣ m 2 − 1 . Take any odd n . Then, note that 2 ∣ m − n . So, for any odd n , the conditions will be satisfied. Since there are 5 0 0 odd integers from 1 to 1 0 0 , each odd choice of m will count in atleast 5 0 0 solutions for n . Since there are 5 0 even integers from 1 to 1 0 0 , this case produces 5 0 solutions.
Case 2 : m ≡ 0 ( m o d 2 )
Then, note that 2 ∤ m 2 − 1 . Let q 1 , q 2 , ⋯ , q k be the odd prime divisors of m 2 − 1 .First, note that for all q i , the number of multiples of q i in the range [ 1 , 1 0 0 0 ] is given by ⌊ q i 1 0 0 0 ⌋ ≤ q i 1 0 0 0
The number of positive integers ≤ 1 0 0 0 divisible by q 1 q 2 ⋯ q k is less than i = 1 ∑ k ⌊ q i 1 0 0 0 ⌋ ≤ 1 0 0 0 × ( i = 1 ∑ k q i 1 )
It then follows that if i = 1 ∑ k q i 1 < 2 1 , then the number of solutions for n < 1 0 0 0 will be < 5 0 0 .
Now, suppose 2 , 3 and some other prime ≥ 3 7 is in the set { q 1 , q 2 , ⋯ , q k } . The number of multiples of either 2 or 3 in the range [ 1 , 1 0 0 0 ] is given by (by PIE): ⌊ 2 1 0 0 0 ⌋ + ⌊ 3 1 0 0 0 ⌋ − ⌊ 1 5 1 0 0 0 ⌋ = 4 6 7 Since the other prime is ≥ 3 7 , the largest number of multiples it can have in the range [ 1 , 1 0 0 0 ] is ⌊ 3 7 1 0 0 0 ⌋ = 3 0 Note that 4 6 7 + 3 0 = 4 9 7 < 5 0 0 . This shows that if 2 , 3 , and some other prime ≥ 3 7 is in the prime factorization of m 2 − 1 , the number of solutions for n will be strictly less than 5 0 0 .
Since we are considering only even m , we can let m = 2 k , where k ranges through all integers from 1 to 5 0 . From the first two observations, we can rule out all k except 6 , 9 , 1 7 , 2 8 , 3 2 , 3 8 , 4 3 , 4 7 . We can now manually go through these 7 numbers. However, note that the number of multiples of either 3 , 5 , or 7 is given by : ⌊ 3 1 0 0 0 ⌋ + ⌊ 5 1 0 0 0 ⌋ + ⌊ 7 1 0 0 0 ⌋ − ⌊ 1 5 1 0 0 0 ⌋ − ⌊ 3 5 1 0 0 0 ⌋ − ⌊ 2 1 1 0 0 0 ⌋ + ⌊ 2 1 1 0 0 0 ⌋ = 5 4 3 > 5 0 0 This shows that k = 1 7 , 3 2 , and 3 8 works. We similarly calculate the number of multiples for the remaining four possibilities of k . Doing this, we can show that it is greater than 5 0 0 for k = 6 , 2 8 and 4 3 , but < 5 0 0 for 4 7 and 9 . Thus, this case produces 3 + 3 = 6 solutions in all.
Summing them up, the total number of possibilities for m is 5 0 + 6 = 5 6 .