Find the sum of all prime numbers p that divides the digit 1 is repeated p times 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ⋯ 1 .
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 second equation should have RHS as 9 1 0 p − 1 . Also, it should be Fermat's Little Theorem, not Last (in your conclusion). Fermat's Last Theorem is a completely different theorem.
Here's how the Fermat's Little Theorem argument works.
We have, by FLT and basic modular arithmetic,
1 0 p ≡ 1 0 ( m o d p ) ⟹ 1 0 p − 1 ≡ 9 ( m o d p ) ⟹ 9 1 0 p − 1 ≡ 1 ( m o d p ) ∀ p : g cd ( p , 9 ) = 1
And the only prime for which g cd ( p , 9 ) = 1 is p = 3 . Check this case manually using the divisibility rule for 3 and you see that p = 3 indeed works and is hence the only prime solution.
The conclusion follows the same as in your solution.
You can use a similar approach to try out this proof problem (Q-4) here .
Log in to reply
Why does the greatest common divisor of p and 9 have to be 1 in order for that congruence to work?
Log in to reply
@Ραμών Αδάλια @Puneet Pinku, the reason for that is because, in modular arithmetic, division by a number x is well-defined (valid) for a congruence when x and the congruence modulus are coprime. You can see that this is true because modular multiplicative inverse of an element exists iff it's coprime with the modulus.
When they are not coprime, the division might result in an incorrect congruence. For example, consider 5 ≡ 1 5 ( m o d 1 0 ) which is true but division of both sides by 5 gives 1 ≡ 3 ( m o d 1 0 ) which is obviously false.
Another way you can see why they should be coprime is by means of the following theorem:
Theorem: Let a , b be two integers divisible by an integer x = 0 and let n be a positive integer. Then, the following congruence holds:
a ≡ b ( m o d n ) ⟺ a / x ≡ b / x ( m o d n / g cd ( x , n ) )
For our case, we need the modulus to be n , so we set g cd ( x , n ) = 1 , i.e., consider only those x 's which are coprime to n . For a proof of the above theorem, see this .
Just saw this post! You are right and I realised how messed up my solution is ... (Can't imagine how I put it as Fermat's Last Theorem instead of Little but I knew that haha.) Thank you for correcting me! :)
Why should the gcd of (p,9) be 1?
There are many primes that divide 111...1. For example: 3|111, 11|1111, 41|11111, 239|1111111, etc. Do these not matter?
Log in to reply
The problem says that p ∣ p 1 1 … 1 1 (notice the underbrace) , hence the number of 1 's in the corresponding repunit must be p too.
Only the case of p = 3 satisfies the problem criterions since 1 1 1 has 3 1's and 3 ∣ 1 1 1 . The rest of the cases you mentioned don't have the number of 1's in the corresponding repunit equal to p . For example, 1 1 ∣ 1 1 1 1 but 1 1 1 1 has 4 1's, not 11 1's.
agree that 3 works, but id it the only prime? doesn't 1 work as well? (1 is prime and divises itself, no?)
I have to say the meaning of the question was unclear until I read the answer. P isn't the number, and it's not the base in which the number is expressed, it's the number of digits in the number? I feel like I spent more time reading the question than was spent writing it, or at the least, not much effort would be required to phrase it clearly. Hopefully this app doesn't habitually waste people's time.
17 works as well? 17*653594771824183 = 11 111 111 111 111 111
Unless I messed up my long division?
Log in to reply
Yup, you messed up your long division. My calculator shows that,
1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ≈ 6 5 3 5 9 4 7 7 1 2 4 1 8 3 0 . 0 5 8 8 2 3 5 3
But 11 also satisfies.
Log in to reply
No it does not. The equation is asking a prime that divides perfectly the length of the number equal to p. 11 does not satisfy because:
11111111111 mod 11 ≠ 0. Notice the length p of the integer is 11 which is not dividing the number. Thus 3 is the only solution possible, by divisibility rule. Read posts by Prasun biswas who as explained it well above.
11 111 111 111 : 11 = 1 010 101 010 And 13 also works.
Log in to reply
11 does not satisfy. For numbers consisting only of one's eleven only divides them if there is an even number of ones. The equation is asking for numbers that evenly divide.
Log in to reply
This was a terribly worded question. I thought i was asking for the sum of primes from the set {1, 11, 111, 1111, etc} I have never seen the | notation like used in the problem. I came here to learn but frustrated by poorly worded problems
Let a be ( 1 1 1 . . . 1 ) . It's clear that a = a × 1 0 + 1 − 1 0 p where p is the number of digits 1 that build a .
Since 1 0 p ≡ 1 0 ( m o d p ) (for Fermat's Little Theorem), the following equation is true: 9 a + 1 = 1 0 p ≡ 1 0 ( m o d p )
We then can deduce that
9 ( a − 1 ) ≡ 0 ( m o d p )
For the zero-product property we have that p ∣ 9 ∨ p ∣ a − 1 .
If p ∣ a − 1 then clearly p ∤ a , so ∄ p such that p ∣ ( 1 1 1 . . . 1 ) and p ∣ ( 1 1 1 . . . 0 ) . Therefore p ∣ 9 : that is true only if p = 3 .
Now I only need to verify that it's actually true that 3 ∣ 1 1 1 , which it is. So the "sum" of all prime numbers such that p ∣ ( 1 1 1 . . . 1 ) is 3 .
Suppose p divides p 1 1 1 … 1 . Then p also divides p 9 9 9 … 9 = 1 0 p − 1 .
In other words 1 0 p − 1 ≡ 0 ( m o d p ) .
By Fermat's Little Theorem, we know 1 0 p ≡ 1 0 ( m o d p ) .
Therefore 9 ≡ 0 ( m o d p ) , which can only be true for p = 3 , if p is a prime.
Since 3 is a prime factor of 1 1 1 , the only prime number p such that p ∣ p 1 1 1 … 1 is p = 3 .
Thank you sir,thsi is much better neat and clean explanation
Problem Loading...
Note Loading...
Set Loading...
Edited Solution Intuition: p ( 1 1 1 … 1 ) = 1 0 p − 1 + 1 0 p − 2 + … + 1 0 + 1 Next notice: 1 0 p − 1 + 1 0 p − 2 + … + 1 0 + 1 = 9 1 0 p − 1 By Fermat's Little Theorem ( a p ≡ a ( m o d p ) ), we have 1 0 p − 1 ≡ 1 0 − 1 = 9 ( m o d p ) .
Then, it follows that: 9 1 0 p − 1 ≡ 1 ( m o d p ) ∀ p : g cd ( p , 9 ) = 1 .
The only possible prime that satisfies g cd ( p , 9 ) = 1 is 3 . Checking this case, we see that indeed 3 divides 1 1 1 and we are done!
Special thanks to @Prasun Biswas for pointing out the errors in my previous solution.