What is the smallest positive integer k , such that for every ordered pair of integers ( m , n ) , we have
4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 ∣ m n ( m k − n k ) ?
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.
Looking at this problem, (especially at the long number) one may feel overwhelmed and feel tempted to just skip this question. However, one idea that can be employed in number theory questions such as the above is the Fermat Little Theorem (FLT) : as follows --- especially when the question involves prime division and powers.
Let p be a prime and a be a positive integer relatively prime to p . Then a p − 1 ≡ 1 ( m o d p ) .
Case 1: Let m n divide the prime p 1 of 4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 .
Case 2: Let g cd ( m , p ) = 1 and g cd ( n , p ) = 1 , meaning that m and n are relatively prime to p . Thus, we can apply FLT here. In our question, observe that the largest prime of 4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 is 4 2 1 . Hence, for every ordered pair of integers ( m , n ) , m 4 2 1 − 1 ≡ n 4 2 1 − 1 ≡ 1 ( m o d 4 2 1 ) Hence, m 4 2 0 − n 4 2 0 ≡ 0 ( m o d 4 2 1 ) and this applies for all prime of 4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 .
Thus, the smallest k = 4 2 0
I don't think it is enough to use Fermat's little theorem.
You should also mention the fact that every prime has a primitive root, otherwise the answer would potentially be lower.
Nicely written.But pray tell me how a person is supposed to factorize the given number without a program.The question doesn't mention that we are allowed to use wolfram alpha.If we were allowed to use wolfram in every question,then some problems would be solvable in seconds.
Log in to reply
Thanks. I am not sure if there is a faster way but I just tried factorising it by trying all the primes. I first divide the number by 1 0 since it ends with a 0 , and then try on the other primes.
Log in to reply
I figured out by applying divisibility tricks myself that 2,3,5,7,11 are divisors of the given number.But then I was stuck.The divisibility test for 7 goes like this:
Take a large number like a b c d e f g h i j k l .The number is divisible by 7 if and only if
7 ∣ j k l − g h i + d e f − a b c
Here,take the number 4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 .Take groups of three starting from the right(like this: 4 4 6 ∣ 6 1 7 ∣ 9 9 1 ∣ 7 3 2 ∣ 2 2 2 ∣ 3 1 0 )
3 1 0 − 2 2 2 + 7 3 2 − 9 9 1 + 6 1 7 − 4 4 6 = 0
Hence the number is divisible by 7.Note that the number of digits of the number does not matter.For example,take the number 1 2 3 4 5 6 7 .Divide it into groups of 3 digits starting from the right,i.e. 1 ∣ 2 3 4 ∣ 5 6 7 .Now,do a successive addition-subtraction like this:
7 ∤ 5 6 7 − 2 3 4 + 1
Hence the number is not divisible by 7.
Log in to reply
@Rahul Saha – Yup I know these tests as well, but it would take around the same time as just trying to long divide the whole stuff. Just my opinion :)
Log in to reply
@Happy Melodies – I don't understand.How does simply adding and subtracting 3-digit numbers take the same time as long-division,unless I am extremely bad at long-division?If I remember right,it took me less than half a minute to complete the divisibility test for 7.
Btw,after I saw that the number is divisible by the first few consecutive primes,I thought that the number is the product of many consecutive primes.Little did I know that even the choice of the prime numbers is random.
I have to accept one thing. I did not factorize the number by myself. I checked up to 2,3,5,7,11,13 .. and when I checked with 17, not getting divisible. I gave up, and checked wolfram alpha. (I feel this should have been provided with the question)
Anyways,
446617991732222310 = 2 * 3 * 5 * 7 * 11 * 13 * 29 * 31 * 43 * 61 * 71 * 211 * 421
So, we have 13 prime factors
Now, a prime number, 'p' would leave a remainder of 1 when it divides m p − 1 , if 'm' and 'p' are relatively prime, by Fermat's little theorem. Same remainder would be left when 'p' divides n p − 1 , if 'p' and 'n' are relatively prime. So, if 'p' is relatively prime to both 'm' and 'n', then m p − 1 - n p − 1 should be div by 'p'.
Now, we have two cases:
Case 1: one of 'm' or 'n' is div by 'p', 'p' being one of the 13 prime factors of the number
Case 2: m p − 1 - n p − 1 is div by 'p'
Taking the worst case scenario (Case 2),
'k' should be a multiple of (each of the prime factors) - 1
that is, k = LCM (1,2,4,6,10,12,28,30,42,60,70,210,420) = 4 2 0
I am sorry, some unclaimed formatting I meant:
446617991732222310 = 2 X 3 X 5 X 7 X 11 X 13 X 29 X 31 X 43 X 61 X 71 X 211 X 421
The prime factorization of the huge divisor is 2 × 3 × 5 × 7 × 1 1 × 1 3 × 2 9 × 3 1 × 4 3 × 6 1 × 7 1 × 2 1 1 × 4 2 1 Firstly, we prove that when k=420, it fits the conditions. Consider all primes p less than or equal to 421. We just need to prove that the dividend m n ( m 4 2 0 − n 4 2 0 ) is a multiple of all such primes.
If m or n is divisible by p we are done. Otherwise, neither m nor n is divisible by p and we just need to prove that m 4 2 0 − n 4 2 0 is divisible by p .
Since m and p (and similarly, n and p are relatively prime, by Fermat's Little Theorem (which states that a p − 1 is congruent to 1 modulo p where p is prime and a is a positive integer relatively prime to p ), both m 4 2 0 and n 4 2 0 are congruent to 1 modulo p and their difference will thus be a multiple of p.
Now we prove that when k is less than 420 it does not satisfy the conditions.
Consider the case when n=1. Note that m n ( m k − n k ) = m ( m k − 1 ) after substituting m and n. As it is not necessary for m to be a multiple of 421, let's assume that m is not a multiple of 421. However, it is not necessary for m k − 1 to be a multiple of 421. Thus the dividend will not always be a multiple of 421, and will not be a multiple of that huge number. Thus 420 is the minimal value of k.
I suggest the following answer in scala:
scala> def f(k: Int, n: Int, m: Int) = (BigInt(m) BigInt(n) (BigInt(m).pow(k)-Bi gInt(n).pow(k))) scala> for(k <- 0 until 999; e = f(k, 3, 5) if e % BigInt("446617991732222310") == 0) yield k
returns (0, 420, 840) so the solution is 420
Problem Loading...
Note Loading...
Set Loading...
We factorise to get: 4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 = 2 × 3 × 5 × 7 × 1 1 × 1 3 × 2 9 × 3 1 × 4 3 × 6 1 × 7 1 × 2 1 1 × 4 2 1
We claim that m n ( m 4 2 0 − n 4 2 0 ) is divisible by each of these prime factors.
Let p be one of the prime factors. So one of the two cases occur:
Therefore, for all integers m & n , m n ( m 4 2 0 − n 4 2 0 ) is divisible by 4 4 6 6 1 7 9 9 1 7 3 2 2 2 2 3 1 0 ⇒ k = 4 2 0 .