Doubly prime

For how many prime numbers p p is

2 p + p 2 2^p + p^2

also a prime number?


The answer is 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.

16 solutions

Daniel Chiu
Sep 29, 2013

Consider p > 3 p>3 . Then, p p is odd, and not a multiple of 3. Since p p is odd: 2 p ( 1 ) p 1 ( m o d 3 ) 2^p\equiv(-1)^p\equiv -1\pmod 3 Since x 2 0 , 1 ( m o d 3 ) x^2\equiv 0,1\pmod 3 for all integer x x , and p p is not a multiple of 3: p 2 1 ( m o d 3 ) p^2\equiv 1\pmod 3 Then, 2 p + p 2 1 + 1 0 ( m o d 3 ) 2^p+p^2\equiv -1+1\equiv 0\pmod 3 Since 2 p + p 2 > 3 2^p+p^2>3 , it cannot be prime. Now, we must try p = 2 , 3 p=2,3 .

If p = 2 p=2 , 2 2 + 2 2 = 8 2^2+2^2=8 , which is not prime.

If p = 3 p=3 , 2 3 + 3 2 = 17 2^3+3^2=17 , which is prime.

The answer is 1 \boxed{1} .

You could mention you used fermat's little theorem, I was a bit confused at that point. Very handy!

Jonathan Lowe - 7 years, 8 months ago

Log in to reply

Fermat's little theorem for p = 3 p=3 is pretty obvious (but very useful): if x x is not divisible by 3 , 3, then x 2 1 ( m o d 3 ) . x^2\equiv 1 \pmod 3. The easiest way to prove it is by squaring 1 1 and 1 -1 modulo 3 3 .

A little less known fact is that for all odd numbers x 2 1 ( m o d 8 ) x^2\equiv 1 \pmod 8 .

Alexander Borisov - 7 years, 8 months ago

Oh yes, sorry about that.

Daniel Chiu - 7 years, 8 months ago

how did u get 2^p=(-1)^p=-1(mod 3)

Cody Martin - 7 years, 8 months ago

Log in to reply

2 p ( 1 ) p ( m o d 3 ) 2^p\equiv (-1)^p\pmod 3 since 2 2 3 1 ( m o d 3 ) 2\equiv 2-3\equiv -1\pmod 3 .

( 1 ) p 1 ( m o d 3 ) (-1)^p\equiv -1\pmod 3 since p p is odd.

Daniel Chiu - 7 years, 8 months ago

and what about 1

Ankur Abhijeet - 7 years, 8 months ago

Log in to reply

p p has to be prime.

Daniel Chiu - 7 years, 8 months ago
Aditya Parson
Sep 29, 2013

The only such number is 3 3 .

Clearly, p = 2 p=2 doesn't work. And, p = 3 p=3 works.

Now apart from the aforesaid numbers none work:

Since p p is odd, 2 p 1 p 1 ( m o d 3 ) 2^p \equiv {-1}^p \equiv -1 \pmod{3}

And By Fermat's little Theorem p 2 1 ( m o d 3 ) p^2 \equiv 1 \pmod{3}

Therefore 2 p + p 2 0 ( m o d 3 ) 2^p + p^2 \equiv 0 \pmod{3}

So, the given expression is always divisible by 3 3 for all prime p > 3 p > 3 .

Great to see you active after a long while............

Nishant Sharma - 7 years, 8 months ago
Michael Tang
Sep 30, 2013
  • If p = 2 , p=2, then p 2 + 2 p = 8 , p^2 + 2^p = 8, which isn't prime.

  • If p = 3 , p=3, then p 2 + 2 p = 17 , p^2 + 2^p = 17, which is prime.

We now prove that no other primes p p will make 2 p + p 2 2^p + p^2 prime. First, note that p 1 ( m o d 2 ) , p \equiv 1 \pmod 2, since p p is prime and p 2. p \neq 2. Then, if we let p = 2 p 0 + 1 p = 2p_0+1 for some integer p 0 , p_0, we have 2 p = 2 2 p 0 + 1 = 4 p 0 2 1 2 = 2 ( m o d 3 ) . \begin{aligned} 2^p &= 2^{2p_0+1} \\ &= 4^{p_0} \cdot 2 \\ &\equiv 1 \cdot 2 = 2 \pmod 3. \end{aligned} Second, notice that p 1 , 1 ( m o d 3 ) , p \equiv 1, -1 \pmod 3, because p p is prime and p 3. p \neq 3. Therefore, p 2 1 ( m o d 3 ) . p^2 \equiv 1 \pmod 3. Then, 2 p + p 2 2 + 1 0 ( m o d 3 ) , 2^p + p^2 \equiv 2 + 1 \equiv 0 \pmod 3, which means that it cannot be prime.

Therefore, the only possible value of p p is p = 3 p = 3 ; there is only 1 \boxed 1 value of p . p.

(this from my observations)

when p = 2 p = 2 than 2 p + p 2 = 8 2^p + p^2 = 8 so it's not a prime. we know all prime numbers are odd except 2 2 so they can be expressed as p = 2 k + 1 p = 2k + 1 where k N k \in \mathbb{N} , than:

2 p + p 2 = 2 2 k + 1 + ( 2 k + 1 ) 2 2^p + p^2 = 2^{2k + 1} + (2k+1) ^2

2 p + p 2 = 2 2 k + 1 + 4 k 2 + 4 k + 1 ) 2^p + p^2 = 2^{2k + 1} + 4k^2 + 4k +1)

2 p + p 2 = 4 ( 2 2 k 1 + k 2 + k ) + 1 2^p + p^2 = 4(2^{2k - 1} + k^2 + k) +1

let 4 ( 2 2 k 1 + k 2 + k ) + 1 4(2^{2k - 1} + k^2 + k) +1 is prime \Rightarrow 4 ( 2 2 k 1 + k 2 + k + 1 ) \sqrt{4(2^{2k - 1} + k^2 + k} +1) is prime.

so by subtracting 1 1 this implies that 4 ( 2 2 k 1 + k 2 + k ) \sqrt{4(2^{2k - 1} + k^2 + k)} is prefect square than ( 2 2 k 1 + k 2 + k ) \sqrt{(2^{2k - 1} + k^2 + k)} is also a perfect square.

and this can't be only when k = 1 k = 1 so p = 2 × 1 + 1 = 3 p = 2 \times 1 + 1 = 3

Vincent Tandya
Sep 30, 2013

Consider 2 special cases: If p = 2 , 2 p + p 2 = 8 not a prime number. \text{If } p=2 \text{, } 2^p+p^2=8 \rightarrow \text{not a prime number.} If p = 3 , 2 p + p 2 = 17 prime number. \text{If } p=3 \text{, } 2^p+p^2=17 \rightarrow \text{prime number.}

For p > 3 p>3 , notice that 2 p 1 p m o d 3 1 m o d 3 2^p\equiv -1^p\mod 3 \equiv -1 \mod 3 (since p p is limited to odd numbers).

Now, look at the p 2 p^2 part. There are 2 cases to consider:

*Case 1: * p 1 m o d 3 p\equiv 1 \mod 3

Hence, p 2 1 2 m o d 3 1 m o d 3 p^2\equiv 1^2\mod 3\equiv 1 \mod 3

*Case 2: * p 2 m o d 3 1 m o d 3 p\equiv 2\mod 3\equiv -1\mod 3

Hence, p 2 ( 1 ) 2 m o d 3 1 m o d 3 p^2\equiv (-1)^2\mod 3 \equiv 1\mod 3

Therefore, either way, p 2 1 m o d 3 p^2 \equiv 1\mod 3 for p > 3 p>3 .

So, we can conclude that 2 p + p 2 1 + 1 m o d 3 0 m o d 3 2^p+p^2\equiv -1 + 1 \mod 3 \equiv 0\mod 3 .

Aha! That means, for p > 3 p>3 , 2 p + p 2 2^p+p^2 is always divisible by 3 3 , and therefore it isn't a prime number.

So, only 1 \boxed{1} value of p p satisfy the condition, which is 3 3 .

Eddie The Head
Mar 10, 2014

We know that a prime can be of the form 6 k + 1 6k+1 or of the form 6 k + 5 6k+5 .Also note that 2 2 k + 1 2 ( m o d 6 ) 2^{2k+1} \equiv 2 \pmod{6} and 2 2 k 4 ( m o d 6 ) 2^{2k} \equiv 4 \pmod{6} . Case 1. \textbf{Case 1.} If p is of the form 6 k + 1 6k+1 ,The 2 6 k + 1 + ( 6 k + 1 ) 2 3 ( m o d 6 ) 2^{6k+1}+(6k+1)^{2} \equiv 3 \pmod{6} and hence it cannot be a prime.

Case 2. \textbf{Case 2.} If p is of the form 6 k + 5 6k+5 ,The 2 6 k + 5 + ( 6 k + 5 ) 2 3 ( m o d 6 ) 2^{6k+5}+(6k+5)^{2} \equiv 3 \pmod{6} and hence it cannot be a prime.

Hence the only possible values of p that remain are 2,3,5 of which by substituting in the equation we find that 3 is the only permissible value. So the total number of solutions allowed is 1 \boxed{1} !

I usually use mod 6 to analyze problems concerning primes as well! For this problem, however, mod 3 provides an immediate solution. For p > 3 p>3 , since p p is odd, therefore 2 p 2 , p 2 1 2^p\equiv 2,p^2\equiv 1 , adding them gives a number divisible by 3, so only p = 3 p=3 works(2 obviously doesn't).

Xuming Liang - 7 years, 3 months ago

Log in to reply

@Xuming Liang : Yes, working in modulo 3 3 is better and quicker for this problem. By the way, how did you get so good in geometry? :)

Mursalin Habib - 7 years, 1 month ago
Wei Jie Tan
Oct 1, 2013

When p = 2 p = 2 ,

2 p + p 2 = 2 2 + 2 2 = 8 2^p + p^2 = 2^2 + 2^2 = 8

8 is not a prime, so p 2 p \neq 2

Since 2 is the only even prime, p p must be odd

Let p = 2 k + 1 p = 2k + 1

2 p = 2 2 k + 1 = 2 2 k 2 1 = 4 k 2 1 k 2 ( m o d 3 ) 2 ( m o d 3 ) 2^p = 2^{2k+1} = 2^{2k} * 2^1 = 4^k * 2 \equiv 1^k * 2 (mod 3) \equiv 2 (mod 3)

When p p is odd and p 1 ( m o d 3 ) p \equiv 1 (mod 3) ,

2 p + p 2 2 + 1 2 ( m o d 3 ) 0 ( m o d 3 ) 2^p + p^2 \equiv 2 + 1^2 (mod 3) \equiv 0 (mod 3)

When p p is odd and p 2 ( m o d 3 ) p \equiv 2 (mod 3) ,

2 p + p 2 2 + 2 2 ( m o d 3 ) 0 ( m o d 3 ) 2^p + p^2 \equiv 2 + 2^2 (mod 3) \equiv 0 (mod 3)

In these cases, the only way that 2 p + p 2 2^p + p^2 is a prime is when 2 p + p 2 = 3 2^p + p^2 = 3 as 3 is the only prime that is 0 (mod 3)

However, this is impossible as p > 2 p > 2 and 2 p + p 2 > 8 2^p + p^2 > 8

Hence, p 0 ( m o d 3 ) p \equiv 0 (mod 3)

So, p = 3 p = 3 as 3 is the only prime that is 0 (mod 3)

Hence there is only 1 answer

Emanuele Prati
Apr 24, 2019

Each prime p 5 p \ge 5 can be expressed as p = 6 k ± 1 p=6k \pm 1 where k k is a positive integer number. So modulo 6, p 1 p 1 5 p \equiv 1 \lor p \equiv -1 \equiv 5 . Case 1) If p 1 p \equiv 1 , in modulo 6 2 p + p 2 2 1 + 1 2 3 2^p + p^2 \equiv 2^1 +1^2 \equiv 3 ; the expression has remainder 3 when divided by 6 so it is divided by 3 so is not prime. Case 2) If p 1 5 p \equiv -1 \equiv 5 , in modulo 6 2 p + p 2 2 5 + ( 1 ) 2 32 + 1 3 2^p + p^2 \equiv 2^5 +(-1)^2 \equiv 32+1 \equiv 3 ; we can do the same reasoning done in Case 1 so also in this case the expression is multiple of 3. We just have to try p < 5 p<5 : if p = 2 p=2 , 2 p + p 2 = 2 2 + 2 2 = 8 2^p + p^2 = 2^2 +2^2 = 8 which is not prime; if p = 3 p=3 , 2 p + p 2 = 2 3 + 3 2 = 17 2^p + p^2 = 2^3 +3^2 = 17 which is prime. The solution is 1 \boxed{1} .

Curtis Clement
Mar 24, 2015

For primes: p 5 \ p \geq\ 5 the following applies: p 1 m o d ( 6 ) 2 p + p 2 2 + 1 3 m o d ( 6 ) p\equiv1 \ mod(6) \Rightarrow\ 2^p +p^2 \equiv 2+1 \equiv 3 mod(6) o r \ or p 5 m o d ( 6 ) 2 p + p 2 2 5 + 5 2 = 57 3 m o d ( 6 ) p\equiv5 \ mod(6) \Rightarrow\ 2^p +p^2 \equiv 2^5 +5^2 = 57 \equiv 3 mod(6) Now 2 can't produce a prime as even + even = even and 2 p + p 2 > 2 \ 2^{p} +p^{2} > 2 so we are left to test 3: 2 3 + 3 2 = 8 + 9 = 17 2^{3} +3^2 = 8+9 = 17 3 i s t h e o n l y s o l u t i o n \therefore\ 3 \ is \ the \ only \ solution

The only solution for p is 3

For p >3, the expression is divisible by 3.

Thats all I know

yea

math dude - 7 years, 2 months ago
Iitian Singh
Oct 4, 2013

only 3 in the possible number

Note that if p=2, 2 2 + 2 2 = 4 2^{2}+2^{2}=4 is not prime but if p=3, 2 3 + 3 2 = 17 2^{3}+3^{2}=17 is prime. So we first assume p 1 ( m o d 3 ) p \equiv 1 \pmod 3 . That gives because p is prime:

2 p + p 2 1 p + 1 2 0 ( m o d 3 ) 2^{p}+p^{2} \equiv -1^{p}+1^{2} \equiv 0 \pmod 3

So we first assume p 2 ( m o d 3 ) p \equiv 2 \pmod 3 . That gives because p is prime:

2 p + p 2 1 p + 2 2 4 1 = 3 0 ( m o d 3 ) 2^{p}+p^{2} \equiv -1^{p}+2^{2} \equiv 4-1=3 \equiv 0 \pmod 3

This shows that 3 divides 2 p + p 2 ( ) 2^{p}+p^{2} (*) so the only solution for ( ) (*) to be prime is if p=3. Hence the answer 1.

Andres Fabrega
Oct 3, 2013

First we try p = 2, and see that it doesn´t work. Then, consider the case where p is uneven. It´s clear (although it can be proven by induction), that 2^(2D+1) will always be congruent to 2 mod 3. Then, when p = 1 (mod 3), p^2= 1(mod 3), so the expression is = 0 (mod 3), so it´s not a prime. The same happens when p = 2 (mod 3). Now, when p = 0 (mod 3), the expression is =2(mod 3), so it´s a candidate for a prime. Since the only prime =0(mod 3 ) is 3 itself, we see that this value gives us a prime, the only solution, and we are done.

It is obvious that 2 is not a solution and 3 is solution.

Consider prime number p > 3 p>3 , we know that p 1 , 2 ( m o d 3 ) p \equiv 1,2 \pmod{3} .

Therefore, p 2 1 ( m o d 3 ) p^2 \equiv 1 \pmod{3} .

Moreover, p p is odd implies 2 p ( 1 ) p 1 ( m o d 3 ) 2^p \equiv (-1)^p \equiv -1 \pmod{3} .

In conclusion, 2 p + p 2 1 + ( 1 ) 0 ( m o d 3 ) 2^p+p^2 \equiv 1+(-1) \equiv 0 \pmod{3} is not prime number.

Hence there is the only one solution satisfying the conditions, that means the answer is 1.

Calinescu Vally
Sep 30, 2013

If we try some prime numbers we see that the majority of the sums are divisible by 3. So, we shall discuss in terms of multiples of 3. 1)We'll prove by induction that if p is odd, then 2^p is a multiple of 3+2(3k+2). For 2^1 we see that it's true; So if it is true for p it should be true for p+2 as well. (3k+2)2^2=12k+8=3(4k+2)+2=multiple of 3 +2, so that is true for all odd p. 2)We do the same for all even p. We now that 2^2=3k+1 (3k+1)2^2=12k+4=3(4k+1)+1=multiple of 3 +1.

Next we discuss p^2. Prime numbers can be 3k+1(ex.7) or 3k+2(ex.5). (3k+1)^2=9k^2+6k+1=3(3k^2+2k)+1=multiple of 3 +1 (3k+2)^2=9k^2+12k+4=3(3k^2+4k+1)+3=multiple of 3 +1

We know that all prime numbers except 2 are odd. All primes p(except 3) squared are of form 3k+1(we proved that earlier). and 2^p is of form 3k+2. So, when we sum them we get a multiple of 3, which is not prime. Now we have particular cases left: number 2 and number 3. 2: 2^2+4=8 which is not prime 3: 2^3+9=17 which is prime So we have only one prime that satisfies the conditions(number 3).

Good analysis!

Calvin Lin Staff - 6 years, 2 months ago
Vincent Huang
Sep 29, 2013

Solution: Obviously p is odd because p=2 doesn't yield a prime. Now we have $2^p + p^2 \equiv 1 + p^2 (mod 3)$ because p is odd. However, if p is not 3 then p is 1 or 2 mod 3, so $1 + p^2$ is divisible by 3 and not prime. Hence the only solution is p=3

You'd have to use \ ( \ ) \backslash( \quad \backslash) instead of $ $, to embed your Latex code.

Calvin Lin Staff - 7 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...