A number of the form 1 0 n − 1 = n times 9 9 9 9 . . . 9 , where n is a positive integer, will never be divisible by 2 or 5 .
Are there any other prime numbers that numbers of this form are never divisible by ?
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.
What about a prime number infinitely close to infinity?
Log in to reply
Infinity is always infinitely far away.
A prime number infinitely close to infinity is also infinitely far from infinity, so every prime fits this definition.
The correct answer is yes. As the problem is stated, primes larger than 10^n - 1 are not excluded.
Log in to reply
Yes, but there's no prime p larger than all possible 10^n - 1, which is what the problem states.
Why there must be two of them being congruent under modulo p?
Log in to reply
Yes, please, explain or point to some other resource
Log in to reply
Because you have p+1 integers, and there are exactly p integers modulo p. So 2 must be congruent by the pigeon hole principle https://en.m.wikipedia.org/wiki/Pigeonhole_principle
There are exactly p congruence classes modulo p. For instance, if p=7, these congruence classes can be denoted by 0,1,2,3,4,5,6. If I give you p+1 integers, then, obviously, at least 2 of them have to belong to the same congruence class because there are only p "pigeon holes" (=congruence classes) to put the p+1 "pigeons" (=integers) in to, so at least one "pigeon hole" contains at least 2 integers.
What goes wrong here if p =2 or 5?
Log in to reply
All of the number end in 9 and so they are never divisible by 2 or 5
When we subtract 10^b-1 from 10^a-1, we get a number of the form 99..9900..00, which must be a multiple of p. When p is neither 2 nor 5, the final zeroes can be removed.
Great solution, one of those times number theory shows its beauty, thanks! Small suggestion: you don't have to use contradiction since you don't use the initial assumption anywhere in the proof. "Let prime p != 2, 5 ... <proof> ... 10^{a-b} - 1 will be multiple of p" is a tad cleaner.
Log in to reply
Thanks! Not realize of it, I think I should change my habit....
Why must 2 of them be congruent under modulo p?
Log in to reply
Let's say p = 7 , then the series we take is 9 , 9 9 , 9 9 9 , 9 9 9 9 , 9 9 9 9 9 , 9 9 9 9 9 9 , 9 9 9 9 9 9 9 , 9 9 9 9 9 9 9 9 , use these eight numbers divided by 7 , you will get eight numbers which is varies between 0 to 6 only, two of them must be the same.
What is happening? I chose 'no' but then it saysd I viewed the solution!
Brilliant staff, help!
I don’t understand “but since p is not equal to 2,5 then we cancel all of the zeroed behind 9’s”
Log in to reply
If the number is 9 9 . . . 9 9 9 0 0 0 . . . 0 0 , the number is equal to 9 9 . . . 9 9 9 × 1 0 b . This number must be divisible by p , but the prime factors of 1 0 b are just 2 and 5 . Since we already said p is not 2 or 5 , we can "cancel out" the 1 0 b and focus on the 9 9 . . . 9 9 9 part which must be divisible by p to make the whole number divisible by p .
The numbers of those form are never divisible by 7 I think
Log in to reply
We can find a number divisible by 7 . The argument implies the answer must be less than 1 0 8 − 1 , and testing shows 7 1 0 6 − 1 = 1 4 2 8 5 7 .
So answer must be YES right
Log in to reply
No. The answer would be YES if there isn't a value in the form 1 0 n − 1 which is divisible by p , but there always is, so the answer is NO.
By Fermat's Little Theorem , if p is a prime that doesn't divide 1 0 , then p divides 1 0 p − 1 − 1
Remark: The problem has changed both in problem text and answer type since I posted this solution. The previous sentence is actually the complete solution for the current form (as a "featured problem"). I've left the rest of my solution below unedited, but it is unnecessary for the current form.
This covers all primes other than 2 , 5 . For these two primes p ∈ { 2 , 5 } , we note that the p divides 1 0 n (since n ≥ 1 ), so p divides 1 0 n − 1 ⟺ p divides − 1 but since no prime divides − 1 , we conclude neither 2 nor 5 is a factor of 1 0 n − 1 for any n ≥ 1 .
Their product, and therefore the answer to the problem, is 2 × 5 = 1 0
(gonna go post a problem about this...)
The last digit of any prime (other than 2 or 5 ) will cycle through all ten digits in some order repeatedly, with every tenth ending number being 0 .
This means we can take any number x n , add to it q × p where p is the prime in question and q is a positive integer less than 1 0 , and produce a number such that x n + p q = 1 0 x n + 1 + 9
For example, where p = 9 7 : 6 7 9 + 9 7 × 6 0 = 6 4 9 9 6 4 9 9 + 9 7 × 5 0 0 = 5 4 9 9 9
In these cases, x 1 = 6 7 , x 2 = 6 4 , x 3 = 5 4 .
Let's assume there is some prime number which causes the value of x to loop, and so would never produce a number 1 0 y − 1 with this method:
Such a loop would produce the situation x + p Q = 1 0 y x + 1 0 y − 1 , where Q is the sum of all q within a loop, and y is some amount of 9 s. (e.g. 1 3 + p Q = 1 3 9 . . . 9 9 9 )
However, as x must be a multiple of p , we know that x + p Q is a multiple of p , as is 1 0 y x . For the equation to balance, 1 0 y − 1 must also be a multiple of p , and thus, even if a prime number loops using this method, it will still be a divisor of a number with the form 1 0 y − 1 .
Why would x have to be odd? Take p=41, q=9, then x=36...
Log in to reply
You need to make x odd in order to continue producing 9s. you can't multiply 36 by an integer to end it in 9, so 9 is not a viable value for q in that situation. Instead, 19 would be used: p=41, q=19, x=77.
Log in to reply
Right. So you're saying for any "odd number not ending in 5" there would exist a multiplicand (q) that would give an odd x... And i suppose that x would also need to not end in 5.
Well, if this can be proven, that's one less drawback... Good luck. :-)
But how can numbers of 999...9 (n times) form be divisible be 7?
Log in to reply
999999 = 7 * 142857 (and 999999999999 = 7 * 142857142857, etc)... Because 7 divides 111111. ;-)
Also, this can be seen from the fact that dividing by 7 can give rational numbers with recurring decimals, and the length of the repeated portion is 6: 7 1 = 0 . 1 4 2 8 5 7 1 4 2 8 5 7 1 4 . . . Expressing this equality in equivalent terms, we get 7 1 = 9 9 9 9 9 9 1 4 2 8 5 7 so 999999=7*142857.
Log in to reply
So, what is the answer to any 10 ^n - 1 divided by 7? Or, what number with all 9's can be divided by 7? Your theory may be mathematically correct, but not functionally correct.
Log in to reply
@Norm Worthy – Oh Bother, when n=13 it works, Darn.
Log in to reply
@Norm Worthy
–
Make that n=12.
10^12 - 1 = 999999999
(10^12 - 1) / 7 = 142857142857
Log in to reply
@Norm Worthy – Well... yeah. Did you miss the first line of my reply? I showed that n=6 and n=12 both work. :-)
Okay I have no idea what I was thinking when I wrote this because this makes no sense.
Log in to reply
Heh, well it makes a little bit of sense, trying to go for an induction solution... A nice approach, but i'm not sure it can really work, due to 2 reasons : the next step might have (as i said in my 1st comment) an even number, which can never be a factor of some 9-only number ; and i think this process doesn't necessarily get smaller numbers for later steps, which would be pretty much a requirement for being able to use an inductive reasoning. :-|
I figured out what I was thinking, so I've rewritten this to actually make sense.
It's much easier than it seems.
When you factorize 10 into prime numbers you get 5 × 2 . If you raise 10 to the nth power and you factorize it too, you get 5 n × 2 n .
However, we are subtracting 1 from 1 0 n . This means, that we are only 1 unit away to be able to factorize the number by 2. Similarly, we are only 1 unit away to be able to factorize the number by 5. However, the number isn't away a fixed number from being able to be divisible by any other number different to 2 and 5.
So 1 0 n isn't divisible FOR SURE for both 2 and 5. Therefore, 1 0 n might be divisible by any other prime number.
Your last line needs 10^n - 1 where you've typed 10^n.
Roses are red,
Violets are blue,
Let's say "yes" is false
And therefore "no" is true
:)
Consider 1 / p for prime p = 2 , 5 . The decimal expansion of this repeats after n digits for some integer n since all rational fractions have a repeating decimal expansion.
Thus 1 0 n ∗ 1 / p − 1 / p is an integer so p divides 1 0 n − 1 .
We can go further using Fermat's little theorem to show n = p-1 is one possible value but other people have discussed this already.
N nhhhnnmnhnnhnnjn
To be divisible by 2 last digit should be multiple of 2.
Hence, 2 cannot divide (10^n-1)
To be divisible by 5 last digit should be 5.
Hence, 5 cannot divide (10^n-1)
Product of 2 numbers = 2 " 5 = 10
Nice solution, however, you applied the wrong operator to the two numbers, I asked for the product!
Log in to reply
also, part of the solution that I would like to see is proof of why there are no other numbers
Given a prime number p different from 2 and 5. We want to find a solution to 10^{n-1} =0 /) (mod p) or \(10^n =1 (mod p). Since p is coprime to 10, we know that 10 is not zero mod p. By Fermats little theorem we have 1 0 p − 1 = 1 (mod p).
Problem Loading...
Note Loading...
Set Loading...
Let's use the Pigeonhole Theorem to solve this.
Assume p = 2 , 5 is a prime, then consider a series:
9 , 9 9 , 9 9 9 , … , p + 1 times 9 9 9 . . . 9 9
We can always find two numbers congruent under modulo p , say that is a times 9 9 9 . . . 9 9 ≡ b times 9 9 9 . . . 9 9 ( m o d p )
WLOG, assume a > b , then we have a times 9 9 9 . . . 9 9 − b times 9 9 9 . . . 9 9 ≡ 0 ( m o d p )
So this number, which has ( a − b ) 9 's in front and followed by b 0 's, is divisible by p , but since p is not equal to 2 , 5 , then we can cancel all of the zeros behind 9 's, so ( a − b ) times 9 9 9 . . . 9 9 = 1 0 a − b − 1 will be the multiple of p , hence proved.