This discussion board is a place to discuss our Daily Challenges and the math and science
related to those challenges. Explanations are more than just a solution — they should
explain the steps and thinking strategies that you used to obtain the solution. Comments
should further the discussion of math and science.
When posting on Brilliant:
Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.
Markdown
Appears as
*italics* or _italics_
italics
**bold** or __bold__
bold
- bulleted - list
bulleted
list
1. numbered 2. list
numbered
list
Note: you must add a full line of space before and after lists for them to show up correctly
# I indented these lines
# 4 spaces, and now they show
# up as a code block.
print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.
print "hello world"
Math
Appears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3
2×3
2^{34}
234
a_{i-1}
ai−1
\frac{2}{3}
32
\sqrt{2}
2
\sum_{i=1}^3
∑i=13
\sin \theta
sinθ
\boxed{123}
123
Comments
ASSUMPTION*→p2 doesn't divide (2p−1−1).
Then we have:
p(2p−1−1)=p2x2⇒(2p−1−1)=px2
Let p=2
(22−1−1)=2x2⇒x2=21→ Absurd!
Then p>2 and MCD(2,p)=1. We are in the hypotesis of the Fermat's Little Theorem!
So (2p−1−1)≡0(modp)
p is an odd prime number so (p−1) is even and we can decompose (2p−1−1) as a difference of squares:
(22p−1−1)(22p−1+1)=px2
The two factors of the LHS are two consecutive odd numbers so they are coprime. It follows that, if p divides one of the two factors, the other one must be a perfect square.
An odd perfect square is always ≡1(mod4).
(22p−1−1)≡1(mod4) only if 22p−1=2⇒p=3 which is a solution.
From now on p>3 and then:
(22p−1−1)≡3(mod4) and (22p−1+1)≡1(mod4)
So it must be (22p−1+1)=y2⇒22p−1=(y−1)(y+1)
(y−1) and (y+1) must be power of 2 whose difference is 2 and the only possible case is 21=2 and 22=4 which we obtain for y=3. Then we have:
22p−1=(3−1)(3+1)=8⇒p=7 which is the second solution.
This shows that there are only two solutions: p=3 and p=7.
It only remains to prove the ASSUMPTION* at the beginning but I have to think about it. If someone has some ideas please write them down.
Prime numbers p for which p2 divides 2p−1−1 are called Wieferich primes. There are only two small(ish) Wieferich primes: 1093 and 3511. The next biggest one, if it exists, is at least 1015, I read.
If p is not a Wieferich prime, then k=2, and your argument finishes things off.
If p=1093 then, since 10932 divides 21092−1, but 10933 does not, we must have k=3. But 3 divides 21092−1, and 27 does not, so this is not possible.
If p=3511 then, since 35112 divides 23510−1, but 35113 does not, we must have k=3. But 31=25−1 divides 23510−1, and 313 does not, so this is not possible.
Thus, unless p is truly enormous Wieferich prime, the only possibilities are p=3,7. Perhaps it is possible to have a general argument like the specific ones I gave for the small Wieferich primes to cope with the case of any larger ones. I will need to think about that.
This proof was made by Fabrizio B. I only helped him to formalize and write it down.
We have to find all primes p such as p(2p−1−1)=qk with p prime and q and k positive integers (k>1).
We can rewrite the expression as p(2p−1−1)=pknk⇒(2p−1−1)=pk−1nk.
Let p=2→(22−1−1)=2k−1nk=1 but k>1→ Absurd!
Then p>2: p is an odd prime number so (p−1) is even and we can decompose (2p−1−1) as a difference of squares:
(22p−1−1)(22p−1+1)=pk−1nk
The two factors of the LHS are two consecutive odd numbers so they are coprime and taking into account that (22p−1−1)<(22p−1+1) there are three possible cases:
[1]: (22p−1−1)=1 and (22p−1+1)=pk−1nk.
From the first equation we obtain p=3 which is the first solution. From now on, p>3
Let nk=xkyk with MCD(x,y)=1
[2]: (22p−1−1)=xk and (22p−1+1)=ykpk−1
[2a]: k is even: xk is a perfect square then it is ≡1(mod4), but (22p−1−1)≡3(mod4) for p>3→ Absurd!
[2b]: k is odd: (xk+1)=(x+1)(xk−1−xk−2+...−x+1)=22p−1. Since p>3 we have that 22p−1>2 so the RHS is even and doesn't have odd factors in his factorization. Then the factors of LHS must both be even. Then (x+1)≡0(mod2): the expression (xk−1−xk−2+...−x+1) has an odd number of odd factors so it is odd → Absurd!
[3]: (22p−1−1)=ykpk−1 and (22p−1+1)=xk
[3a]: k is even: from the second equation (xk/2−1)(xk/2+1)=22p−1→(xk/2−1) and (xk/2+1) must be powers of 2 whose difference is 2 and the only possible case is 2 and 4 which we obtain from x=3 and k=2. Then 22p−1=8→p=7 which is the second solution.
[3b]: k is odd: (xk−1)=(x−1)(xk−1+xk−2+...+x+1)=22p−1. Then (as in 2b) it must be (x−1)≡0(mod2) and the expression (xk−1+xk−2+...+x+1) has an odd number of odd factors so it is odd → Absurd!
This shows that the only solutions are p=3 and p=7. I hope the proof works this time!
Ciao.
EDITED 2b: Calvin, could you please tell me the other steps which don't work? thanks
@Sebastiano R
–
This is a good start, and I would encourage you to review this proof for clarity and content. There are slight gaps still, like that pointed out by Mark, and another in case 2b, as you have to show that the factor is not 1, which is a power of 2.
You can do better to highlight the important steps of your argument, and choosing the way to present the cases. E.g. given the slight hiccup of 2b, it is better to present case 3 before case 2.
@Sebastiano R
–
There are more cases than this. The most general decomposition is
221(p−1)−ε=pak−1uk221(p−1)+ε=vk
where ε=±1. While it is possible to reduce these more general options to your three, at the time you introduce these as the possible cases, the fact that a more general decomposition is not possible is not yet obvious.
@Mark Hennings
–
While I agree that you gave the general decomposition form, observe that the important contradiction that was achieved was in showing that there is no solutions to
221(p−1)+ϵ=vk.
This is true by Mihailescu's theorem on consecutive perfect powers, which was the nuclear bomb that I referred to. There exists a more elementary method, which was the parity argument that was laid out.
@Calvin Lin
–
Mihailescu's theorem, or his proof of a much older conjecture, is a mere 11 years old. As someone who has never been a Number Theorist, I cannot hope to keep track of every research development that recent (nobody can without the benefit of a university paying for access to the journals). There is nothing wrong with finding the "more elementary method" here!
I regret that you have not commented on my posted solution of this problem, which predates Sebastiano's.
@Mark Hennings
–
I regret that I have limited resources to work with, and hence cannot write a verbal response to every single solution or discussion that is presented. In fact, more often that not, the fact that I didn't respond indicates that your statements are (mostly) right. I chose to respond to Sebastiano, as that allowed me to point out parts of his proof that could be cleaned up / presented better.
I think that you misinterpreted what I meant. I am (almost always) in favor of finding the elementary method, especially given that this was a Bulgarian olympiad problem. This is why in my previous comment, I stated that I only had a nuclear bomb and then edited it later to say that I found an elementary approach. I personally have not reviewed Mihailescu's theorem, so I do not know the depth of understanding required.
The first statement is true for all p>2 by Fermat's Little Theorem. The second statement seems to never be true, and I can't seem to be able to figure out why. If it is, in fact, never true, it clearly shows that k = 2. Then it remains to find for which promes p there is an integer x such that 2p−1−1=p⋅x2. These primes are the ones sought in the problem. My conjecture is that the only pairs (p,x) are (3,1),(7,3), but again, I have no proof of this. Hopefully this comment gives someone a push to make a better one with some actual math.
Good work. Sometimes my hints are cryptic. The second statement actually is possible (Gasp!) , so it's good that you can't figure out a proof. See Mark's comment below.
Wieferich primes are one of my favorite counter examples of using small cases. That is why my first hint was written as such.
The proof has been slightly amended to allow for the possibility that x has p as a repeated factor.
Suppose that p is prime and p(2p−1−1)=xk for some integer x and some integer k≥2. Certainly p≥3 is odd. Since their difference is 2 and they are both odd, the numbers 221(p−1)−1 and 221(p−1)+1 are coprime. By considering the various prime factors of x, we deduce that we must be able to write
221(p−1)−ε=pak−1uk221(p−1)+ε=vk
for some ε∈{−1,1}, some integer a≥1 and odd positive integers u,v, where u,v,p are pairwise coprime.
If k is odd then
221(p−1)=vk−ε=vk−εk=(v−ε)j=0∑k−1vjεk−1−j=(v−ε)A
Thus v−ε=2m for some 0≤m≤21(p−1). Thus we deduce that vjεk−1−j≡εk−1=1 modulo 2m for all 0≤j≤k−1, and hence
A=j=0∑k−1vjεk−1−j≡k(2m)
If m≥1, this implies that A is odd. Since A divides 221(p−1), this implies that A=1, and hence vk−ε=v−ε. Since k≥3 we deduce that v=1. Since 221(p−1)+ε=vk=1, we deduce that ε=−1 and that p=3. But then 3ak−1uk=2, so that a=k=1 and u=2. This does not work, so we must have m=0, so that v−ε=1. Thus we deduce that v=2, which cannot happen. This case is impossible.
If k=2m is even and ε=1, then 221(p−1)=v2m−1=(vm−1)(vm+1), so that vm−1 and vm+1 are powers of 2 which differ by 2. Thus vm−1=2 and vm+1=4, so that v=3 and m=1, so that k=2. But then 221(p−1)=8, so that p=7. This works with a=u=1.
If k=2m is even and ε=−1 then vk≡1 modulo 8, and 221(p−1)=vk+1≡2 modulo 8. Thus we deduce that 221(p−1)=2, and hence p=3. In this case k=2. Again we have a=u=1.
Thus the only possible solutions are with k=2, and they are p=3,7.
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
ASSUMPTION* →p2 doesn't divide (2p−1−1).
Then we have:
p(2p−1−1)=p2x2⇒(2p−1−1)=px2
Let p=2
(22−1−1)=2x2⇒x2=21→ Absurd!
Then p>2 and MCD(2,p)=1. We are in the hypotesis of the Fermat's Little Theorem!
So (2p−1−1)≡0(modp)
p is an odd prime number so (p−1) is even and we can decompose (2p−1−1) as a difference of squares:
(22p−1−1)(22p−1+1)=px2
The two factors of the LHS are two consecutive odd numbers so they are coprime. It follows that, if p divides one of the two factors, the other one must be a perfect square.
An odd perfect square is always ≡1(mod4).
(22p−1−1)≡1(mod4) only if 22p−1=2⇒p=3 which is a solution.
From now on p>3 and then: (22p−1−1)≡3(mod4) and (22p−1+1)≡1(mod4)
So it must be (22p−1+1)=y2⇒22p−1=(y−1)(y+1)
(y−1) and (y+1) must be power of 2 whose difference is 2 and the only possible case is 21=2 and 22=4 which we obtain for y=3. Then we have:
22p−1=(3−1)(3+1)=8⇒p=7 which is the second solution.
This shows that there are only two solutions: p=3 and p=7.
It only remains to prove the ASSUMPTION* at the beginning but I have to think about it. If someone has some ideas please write them down.
Ciao.
Log in to reply
Prime numbers p for which p2 divides 2p−1−1 are called Wieferich primes. There are only two small(ish) Wieferich primes: 1093 and 3511. The next biggest one, if it exists, is at least 1015, I read.
If p is not a Wieferich prime, then k=2, and your argument finishes things off.
If p=1093 then, since 10932 divides 21092−1, but 10933 does not, we must have k=3. But 3 divides 21092−1, and 27 does not, so this is not possible.
If p=3511 then, since 35112 divides 23510−1, but 35113 does not, we must have k=3. But 31=25−1 divides 23510−1, and 313 does not, so this is not possible.
Thus, unless p is truly enormous Wieferich prime, the only possibilities are p=3,7. Perhaps it is possible to have a general argument like the specific ones I gave for the small Wieferich primes to cope with the case of any larger ones. I will need to think about that.
Great approach. I prefer to think of it as that you done the case of k=2.
Now do the case of k≥3. As a hint, I used a nuclear bomb to solve the problem. I believe that less powerful weaponry will work though.
Edit: I found a method that uses elementary number theory.
Log in to reply
This proof was made by Fabrizio B. I only helped him to formalize and write it down.
We have to find all primes p such as p(2p−1−1)=qk with p prime and q and k positive integers (k>1).
We can rewrite the expression as p(2p−1−1)=pknk⇒(2p−1−1)=pk−1nk.
Let p=2→(22−1−1)=2k−1nk=1 but k>1→ Absurd!
Then p>2: p is an odd prime number so (p−1) is even and we can decompose (2p−1−1) as a difference of squares:
(22p−1−1)(22p−1+1)=pk−1nk
The two factors of the LHS are two consecutive odd numbers so they are coprime and taking into account that (22p−1−1)<(22p−1+1) there are three possible cases:
[1]: (22p−1−1)=1 and (22p−1+1)=pk−1nk.
From the first equation we obtain p=3 which is the first solution. From now on, p>3
Let nk=xkyk with MCD(x,y)=1
[2]: (22p−1−1)=xk and (22p−1+1)=ykpk−1
[2a]: k is even: xk is a perfect square then it is ≡1(mod4), but (22p−1−1)≡3(mod4) for p>3→ Absurd!
[2b]: k is odd: (xk+1)=(x+1)(xk−1−xk−2+...−x+1)=22p−1. Since p>3 we have that 22p−1>2 so the RHS is even and doesn't have odd factors in his factorization. Then the factors of LHS must both be even. Then (x+1)≡0(mod2): the expression (xk−1−xk−2+...−x+1) has an odd number of odd factors so it is odd → Absurd!
[3]: (22p−1−1)=ykpk−1 and (22p−1+1)=xk
[3a]: k is even: from the second equation (xk/2−1)(xk/2+1)=22p−1→(xk/2−1) and (xk/2+1) must be powers of 2 whose difference is 2 and the only possible case is 2 and 4 which we obtain from x=3 and k=2. Then 22p−1=8→p=7 which is the second solution.
[3b]: k is odd: (xk−1)=(x−1)(xk−1+xk−2+...+x+1)=22p−1. Then (as in 2b) it must be (x−1)≡0(mod2) and the expression (xk−1+xk−2+...+x+1) has an odd number of odd factors so it is odd → Absurd!
This shows that the only solutions are p=3 and p=7. I hope the proof works this time!
Ciao.
EDITED 2b: Calvin, could you please tell me the other steps which don't work? thanks
Log in to reply
You can do better to highlight the important steps of your argument, and choosing the way to present the cases. E.g. given the slight hiccup of 2b, it is better to present case 3 before case 2.
221(p−1)−ε=pak−1uk221(p−1)+ε=vk where ε=±1. While it is possible to reduce these more general options to your three, at the time you introduce these as the possible cases, the fact that a more general decomposition is not possible is not yet obvious.
There are more cases than this. The most general decomposition isLog in to reply
221(p−1)+ϵ=vk.
This is true by Mihailescu's theorem on consecutive perfect powers, which was the nuclear bomb that I referred to. There exists a more elementary method, which was the parity argument that was laid out.
Log in to reply
I regret that you have not commented on my posted solution of this problem, which predates Sebastiano's.
Log in to reply
I think that you misinterpreted what I meant. I am (almost always) in favor of finding the elementary method, especially given that this was a Bulgarian olympiad problem. This is why in my previous comment, I stated that I only had a nuclear bomb and then edited it later to say that I found an elementary approach. I personally have not reviewed Mihailescu's theorem, so I do not know the depth of understanding required.
Judging from the indicated interest but lack of comments, I'd drop some hints.
Hint: Is it possible that p∣2p−1−1? Is it possible that p2∣(2p−1−1)?
Hint: Greedy Calvinosaurus Dinosaur.
Log in to reply
The first statement is true for all p>2 by Fermat's Little Theorem. The second statement seems to never be true, and I can't seem to be able to figure out why. If it is, in fact, never true, it clearly shows that k = 2. Then it remains to find for which promes p there is an integer x such that 2p−1−1=p⋅x2. These primes are the ones sought in the problem. My conjecture is that the only pairs (p,x) are (3,1),(7,3), but again, I have no proof of this. Hopefully this comment gives someone a push to make a better one with some actual math.
Log in to reply
Good work. Sometimes my hints are cryptic. The second statement actually is possible (Gasp!) , so it's good that you can't figure out a proof. See Mark's comment below.
Wieferich primes are one of my favorite counter examples of using small cases. That is why my first hint was written as such.
Not a Wieferich prime in sight ...
The proof has been slightly amended to allow for the possibility that x has p as a repeated factor.
Suppose that p is prime and p(2p−1−1)=xk for some integer x and some integer k≥2. Certainly p≥3 is odd. Since their difference is 2 and they are both odd, the numbers 221(p−1)−1 and 221(p−1)+1 are coprime. By considering the various prime factors of x, we deduce that we must be able to write 221(p−1)−ε=pak−1uk221(p−1)+ε=vk for some ε∈{−1,1}, some integer a≥1 and odd positive integers u,v, where u,v,p are pairwise coprime.
If k is odd then 221(p−1)=vk−ε=vk−εk=(v−ε)j=0∑k−1vjεk−1−j=(v−ε)A Thus v−ε=2m for some 0≤m≤21(p−1). Thus we deduce that vjεk−1−j≡εk−1=1 modulo 2m for all 0≤j≤k−1, and hence A=j=0∑k−1vjεk−1−j≡k(2m) If m≥1, this implies that A is odd. Since A divides 221(p−1), this implies that A=1, and hence vk−ε=v−ε. Since k≥3 we deduce that v=1. Since 221(p−1)+ε=vk=1, we deduce that ε=−1 and that p=3. But then 3ak−1uk=2, so that a=k=1 and u=2. This does not work, so we must have m=0, so that v−ε=1. Thus we deduce that v=2, which cannot happen. This case is impossible.
If k=2m is even and ε=1, then 221(p−1)=v2m−1=(vm−1)(vm+1), so that vm−1 and vm+1 are powers of 2 which differ by 2. Thus vm−1=2 and vm+1=4, so that v=3 and m=1, so that k=2. But then 221(p−1)=8, so that p=7. This works with a=u=1.
If k=2m is even and ε=−1 then vk≡1 modulo 8, and 221(p−1)=vk+1≡2 modulo 8. Thus we deduce that 221(p−1)=2, and hence p=3. In this case k=2. Again we have a=u=1.
Thus the only possible solutions are with k=2, and they are p=3,7.
the values of p can be 3 and 7
nice