x = n number of 5’s 5 5 5 5 5 5 5 5 5 5 … 5 What is the minimum value of n such that x is a multiple of 2003?
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.
Your solution is wrong. e.g. x^2=1(modp) does not imply that x=1 (modp). This is a polynomial congruence which has 2 solutions.
Log in to reply
This can easily be shown by recollecting the derivation of Euler's theorem by leveraging Lagrange's theorem. Added details in the solution
Log in to reply
Your first statement that k divides 2002 is correct as the numbers <0,1,...,2002> form a group under multiplication so k divides 2002 by Lagrange's theorem. I do no understand how you can 'leverage ' this to conclude that 1001 is the solution.
However, my main question is, how do you know that this is the minimum n such that 10^n=1(mod 2003). You haven't ruled out 77 being a solution which is perfectly valid as it divides 2002.
You could say that 2003= 3(mod4) so -1 cannot be a quadratic residue and hence 10^1001=1(mod2003). However, this is not enough to assert that the answer is 1001.
Log in to reply
@Omkar Kamat – Simplified the solution.
I'm not sure what you mean. If I understand you correctly, you write that a k ≡ 1 ( m o d 2 0 0 3 ) with k ∣ 2 0 0 3 implies that a , a 2 , … , a k ≡ 1 ( m o d 2 0 0 3 ) . Do you mean with this that a ≡ 1 ( m o d 2 0 0 3 ) . Because I don't believe this is true. Can you explain it with more details?
Log in to reply
@Casper Putz – Simplified the solution.
It is easy to see that 5(10^(n)-1)=2003*9k where k is an integer. Hence, we must have that 10^(n) =1(mod2003) and 1(mod9) However, 10=1(mod9) so that is ok.
The Euler Totient function tells us that 10^2002=1(mod2003) as 2003 is a prime. Now if 10^n=1 (mod 2003), where n is the smallest integer for which this property is true, then n divides 2003. It easy to see that 10^1001=(((10)^10))^10)*10=1(mod2003).
Now 1001= 11 7 13. We can check that any proper divisor of 1001 does not give 10^n=1(mod2003). So the answer is 1001.
@Abhijit Bhattacharjee Can you expand a bit more on how you used Lagrange's theorem, please? How/why did you selective choose only some prime numbers for k?
Why the answer is not 12?I checked it using calculator.
Log in to reply
I doubt your calculator may be losing precision while dividing. It is worth noting that 2 0 0 3 5 5 5 5 5 5 5 5 5 5 5 5 = 2 7 7 3 6 1 7 3 5 2 0 0 3 3 5 0
I'll let someone else post the Number Theory solution.
In the meantime, we can quickly solve with code. It is good to be efficient by only keeping track of the remainders for n = 1 , 2 , 3 , … 5's, rather than actually creating the entire n digit number.
1 2 3 4 5 6 7 8 9 10 |
|
returns 1001.
Have a stab at generalization of this over here
1 2 3 4 5 |
|
The answer must be a divisor of ϕ ( 2 0 0 3 ) = 2 0 0 2 = 2 ⋅ 7 ⋅ 1 1 ⋅ 1 3 . That leaves in principle 16 possibilities: 1 , 2 , 7 , 1 1 , 1 3 , 1 4 , 2 2 , 2 6 , 7 7 , 9 1 , 1 4 3 , 1 5 4 , 1 8 2 , 2 8 6 , 1 0 0 1 , 2 0 0 2 .
We need the smallest of these values n for which 1 0 n ≡ 1 mod 2003.
I calculated the powers of 10, using 1 0 m + n = 1 0 m ⋅ 1 0 n mod 2 0 0 3 : 1 0 4 ≡ − 1 5 1 0 8 ≡ 2 2 5 1 0 1 6 ≡ 5 5 0 1 0 3 2 ≡ 4 7 1 0 6 4 ≡ 2 0 6 1 0 1 2 8 ≡ 3 7 3 1 0 2 5 6 ≡ 9 2 2 1 0 5 1 2 ≡ 8 1 2 1 0 7 ≡ − 9 7 9 1 0 1 4 ≡ − 9 9 6 1 0 7 7 ≡ − 8 7 1 0 1 5 4 ≡ − 4 4 3 1 0 1 1 ≡ 6 6 4 1 0 2 2 ≡ 2 3 6 1 0 1 4 3 ≡ 4 8 5 1 0 2 8 6 ≡ 8 7 4 1 0 1 0 0 1 ≡ 1 1 0 1 3 ≡ 3 0 1 1 0 2 6 ≡ 4 6 6 1 0 9 1 ≡ 5 2 3 1 0 1 8 2 ≡ − 8 8 2
(For instance, I calculated 1 0 1 0 0 1 as 1 0 5 1 2 ⋅ 1 0 2 5 6 ⋅ 1 0 1 2 8 ⋅ 1 0 6 4 ⋅ 1 0 3 2 ⋅ 1 0 8 ⋅ 1 0 1 .)
From 1 0 1 0 0 1 ≡ 1 mod 2003 it follows that 1 1 1 ⋯ 1 (1001 digits) is a multiple of 2003, and therefore so is 5 5 5 ⋯ 5 .
Do the division 1/2003. Period of repeating decimal digits is 1001. This is the required answer. How does it work?
1/n has a property that its period of terminating digits will be equal to k iff n | (999... k times) for smallest k.
Since 5 and 9 are coprime, we will get k for (5555... k times) also.
Problem Loading...
Note Loading...
Set Loading...
when checking for divisibility of n sequences of digits divisible by a prime number we can the sequence as a nth power of 10
5 5 5 5 5 5 . . . . ( n terms ) . . . 5 = 5 × 1 1 1 1 1 1 . . . . ( n terms ) . . . 1 = 9 5 × 9 × 1 1 1 1 1 1 . . . . ( n terms ) . . . 1 = 9 5 × 9 9 9 9 9 9 . . . . ( n terms ) . . . 9 ⇒ 9 5 × 9 9 9 9 9 9 . . . . ( n terms ) . . . 9 = 9 5 × ( 1 0 n − 1 )
So if 2 0 0 3 ∣ 5 5 5 5 5 5 . . . . ( n terms ) . . . 5 ⇒ 2 0 0 3 ∣ 1 0 n − 1
\Rightarrow 10^n (\mod 2003) \equiv 1 \tag{1}
The following is quoted from Wikipedia article on Euler's theorem Now, Lagrange's theorem states that
the order of any subgroup of a finite group divides the order of the entire group
Let 1 0 n = a and a ≡ 1 ( m o d 2 0 0 3 ) then a is one of the residual classes, and its powersa, a^2, .... a^k \equiv 1 (\mod n)\tag{2}
are a subgroup.
Now per Lagrange's theorem, k ∣ φ ( n ) .
So, k \in {1, 2, 7, 11, 13, 14, 22, 26, 77, 91, 143, 154, 182, 286, 1001, 2002} \tag{3}
The only number that has a power relationship with 2002 is 1001 so the smallest number that divides 2003 is 1001