Find all natural integers $m, n$ such that $m, 2+m, 2^n+m, 2+2^n+m$ are all prime numbers
Problem
Source: Mexico Regional Olympiad
Tags: number theory
26.09.2015 22:13
Redacted because OP said square numbers..l I was wondering why that was in High School Olympiad when I solved it in 3 minutes and I didn't dven make AIME
27.09.2015 16:07
Sorry. Already corrected!
27.09.2015 17:13
by calculation (m,n) is (3,5) and (3,7)
27.09.2015 18:58
How do you solve this?
27.09.2015 21:00
I´m really sorry about the couple of mistakes in the problem. Already corrected once again. Now Easy to verify that $2^n+m$ doesn´t work for $m=3$ and $n=7$
27.09.2015 21:22
Dang it this problem is so much easier than the last one So clearly we just consider each term mod 3 First case: n is even Note that if $n$ is even we have that $2^n + m \equiv m+1 \pmod{3}$. Then, we would have $m \equiv m \pmod{3}, 2^n+m \equiv m+1 \pmod{3}, m+2 \equiv m+2 \pmod{3}$ and clearly one of those must be a multiple of 3. Thus, this is only possible if one of $m, 2+m, 2^n+m$ is equal to 3. Notice that if $m=3$ then $2^n+5 \equiv 0 \pmod{3}$ and it is also clearly greater than 3 and thus not prime. Also, $2+m = 3 \implies m=1$ but m must be prime so that's not be possible. Thus $2^n+m = 3$. But since $2^n,m \ge 2$ that is also not possible. Thus there are no solutions for $n$ even. If $n$ is odd then $2+2^n+m \equiv m+4 \equiv m+1 \pmod{3}$. Then we have again that one of $m,2+m,2+2^n+m$ has to be equal to 3. From before, we know that $m, m+2 \neq 3$. So $2+2^n+m = 3$ or $2^n + m = 1$ which is also clearly impossible Thus there are no solutions EDIT: darn bad
27.09.2015 22:03
But for $m=3$ and $n=1$ all these numbers are prime
27.09.2015 22:07
$m=3, n=3$ also works
27.09.2015 22:17
The problem is when in the second case you say "from before, we know $m \ne 3$." This is wrong because you could only eliminate the case $m=3$ before by using that $n$ is even. If $n$ is odd, there is no contradiction which is clear from the obvious examples $n=1, n=3$ given above. We shall look for all answers in this case i.e. we need to find all $n$ such that $2^n+3$ and $2^n+5$ are both prime. Clearly, $n \le 3$ implies $n=1$ or $n=3$ which are both solutions. Assume now $n \ge 4$. Then both of the numbers are greater than 7 and hence can't be divisible by 7. But this implies $2^n \equiv 1 \mod 7$ i.e. $3 \nmid n$. Hence $n=3k$ and we have $8^k+3, 8^k+5$ both prime. Since $5 \nmid 8^k+3$ we conclude that $k$ must not be $3 \mod 4$ and hence (since odd) we conclude $k \equiv 1 \mod 4$. But now it is clear that $13 \mid 8^k+5$ which implies $k=1$ and hence $n=3$ contradicting $n \ge 4$. Thus, there are no more solutions except from $n=1, n=3$ in the case $m=3$. Edit: Thanks for your correction, garmel7!
27.09.2015 22:46
How did you get this : But this implies $2^n \equiv 1 \mod 7$ ? I didn't understand it well .
27.09.2015 22:49
john10 wrote: How did you get this : But this implies $2^n \equiv 1 \mod 7$ ? I didn't understand it well . The only possible values of $2^n \mod 7$ are $1,2,4$. If $2^n \equiv 2 \mod 7$ then $7 \mid 2^n+5$. If $2^n \equiv 4 \mod 7$ then $7 \mid 2^n+3$. Since both of the numbers are not divisible by 7 we conclude that the third case i.e. $2^n \equiv 1 \mod 7$ must occur.
27.09.2015 22:50
THanks
28.09.2015 00:26
Tintarn wrote: . But now it is clear that $13 \nmid 8^k+5$ which implies $k=1$ and hence $n=3$ contradicting $n \ge 4$. Thus, there are no more solutions except from $n=1, n=3$ in the case $m=3$. Sorry tintarn ,i didn't understand how you conclude that 13 doesn't divide them because using mod 13 i found n must be 3 mod 12 which doesn't make n not divisble by 3 for n bigger than 3.
28.09.2015 00:31
@Garmel7 , I think that Tintarn made a Latex mistake , he mean $13$ divides $ 8^k +5 $ The same thing with $3$ divides $n$
28.09.2015 00:39
Why those are the only ? The only possible values of $2^n \mod 7$ are $1,2,4$.
28.09.2015 00:44
yassino wrote: The only possible values of $2^n \mod 7$ are $1,2,4$. Try it. For n=0 it's 1 mod 7. For n =1 it's 2 mod 7. For n=2 it's 4 mod 7. For n=3 it's 1 mod 7. each time, we multiple by 2 because 2=2 mod 7
28.09.2015 00:49
You 're right , we try mod 3 , and it's obvious ...
28.09.2015 00:53
@john10, i understand now why, after using mod 13 we have just 9 mod 13 to tale care of. I forgot that with mod 4, we took care of 5 mod 12(which is'´t useful) and 9 mod 12. Anyway, thanks
28.09.2015 02:42
I think the main idea of this exercice is to find some prime numbers for wich 2^k is congruent to 1 and then the rest is easy
28.09.2015 07:37
Since I spent quite a bit of time last night trying to solve the previous posted problem, which instead of the third prime being $2^n + m$ was in fact $2n+m$, I feel obliged to post my solution to this problem. After trying for numbers $m=5$ and $m=11$ and a few small $n$, you start to feel that $m=3$ is important. So taking modulo $3$ is quite natural. And it proves helpful. By assuming $m>3$, we have that based on the first two conditions, $m \equiv 2 \pmod 3$. Now, we know $2^n + m > 3$, and is not congruent to $0 \pmod{3}$... But can $2^n + m \equiv 2 \pmod{3}$? No, because $m \equiv 2 \pmod{3}$ would imply that $2^n$ was a multiple of $3$, thus $2^n + m \equiv 1 \pmod{3}$. Similarly, because $m+2 \equiv 1 \pmod{3}$ we infer that $2^n + 2 + m \equiv 2 \pmod{3}$. The contradiction lies in the fact that upon subtraction of the two results, $2 \equiv 1 \pmod{3}$. Hence, $m=3$. Next, we need to find two primes $2^n + 3, 2^n + 5$. When $n=1$, we have a solution set, so assume $n>1$. Why not re-try our modulo $3$ argument and see how it goes? $2^n + 5 \equiv 0 \pmod 3 \implies 2^{n-1} \equiv -1 \pmod{3}$ which means $n$ is even. Hence, for $2^n+5$ to be potentially prime, we need $n$ to be odd. Probably, modulo $3$ wont take us much further. But, after trying $n=5, n=7$, we notice $2^n + 3 = 35$ and $2^n + 5 = 133 = 7 \cdot 19$. Modulo $7$ seems useful. Indeed, the residues of powers of $2$ modulo $7$ are $1, 2, 4$, and quickly we can rule out $2 \; (2+5=7)$ and $4 \; (4+3=7)$ as being possible residues (Assuming $n>1$ of course). We are left with $2^n \equiv 1 \pmod{7} \implies n \equiv 0 \pmod{3}$. So modulo $3$ kinda did help again. Hence $n \equiv 3 \pmod{6} \implies n = 3 + 6k$. Hence $2^{6k} \cdot 2^3 + 3$ and $2^{6k} \cdot 2^3 + 5$ should be primes. Notice that $2^6 = 64 = 5 \cdot 13 - 1 \equiv -1 \pmod{5}$ and also $\equiv -1 \pmod{13}$. Hence we have two cases: $k \equiv 1 \pmod{2} \implies 2^{6k} \cdot 8 + 3 \equiv -8 + 3 \equiv 0 \pmod{5}$. $k \equiv 0 \pmod{2} \implies 2^{6k} \cdot 8 + 5 \equiv 2^{12k'} \cdot 8 + 5 \equiv 8+5 \equiv 0 \pmod{13}$. The first doesn't work, because $2^{6} \cdot 8 + 3 >>> 5$. The second does, and gives $n = 6 \cdot 0 + 3 = 3$. Hence, our solution set is $(m, n) = (3, 1)$ and $(3, 3)$.