For how many prime numbers p is
2 p + p 2
also a prime number?
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.
You could mention you used fermat's little theorem, I was a bit confused at that point. Very handy!
Log in to reply
Fermat's little theorem for p = 3 is pretty obvious (but very useful): if x is not divisible by 3 , then x 2 ≡ 1 ( m o d 3 ) . The easiest way to prove it is by squaring 1 and − 1 modulo 3 .
A little less known fact is that for all odd numbers x 2 ≡ 1 ( m o d 8 ) .
Oh yes, sorry about that.
how did u get 2^p=(-1)^p=-1(mod 3)
Log in to reply
2 p ≡ ( − 1 ) p ( m o d 3 ) since 2 ≡ 2 − 3 ≡ − 1 ( m o d 3 ) .
( − 1 ) p ≡ − 1 ( m o d 3 ) since p is odd.
and what about 1
The only such number is 3 .
Clearly, p = 2 doesn't work. And, p = 3 works.
Now apart from the aforesaid numbers none work:
Since p is odd, 2 p ≡ − 1 p ≡ − 1 ( m o d 3 )
And By Fermat's little Theorem p 2 ≡ 1 ( m o d 3 )
Therefore 2 p + p 2 ≡ 0 ( m o d 3 )
So, the given expression is always divisible by 3 for all prime p > 3 .
Great to see you active after a long while............
If p = 2 , then p 2 + 2 p = 8 , which isn't prime.
If p = 3 , then p 2 + 2 p = 1 7 , which is prime.
We now prove that no other primes p will make 2 p + p 2 prime. First, note that p ≡ 1 ( m o d 2 ) , since p is prime and p = 2 . Then, if we let p = 2 p 0 + 1 for some integer p 0 , we have 2 p = 2 2 p 0 + 1 = 4 p 0 ⋅ 2 ≡ 1 ⋅ 2 = 2 ( m o d 3 ) . Second, notice that p ≡ 1 , − 1 ( m o d 3 ) , because p is prime and p = 3 . Therefore, p 2 ≡ 1 ( m o d 3 ) . Then, 2 p + p 2 ≡ 2 + 1 ≡ 0 ( m o d 3 ) , which means that it cannot be prime.
Therefore, the only possible value of p is p = 3 ; there is only 1 value of p .
(this from my observations)
when p = 2 than 2 p + p 2 = 8 so it's not a prime. we know all prime numbers are odd except 2 so they can be expressed as p = 2 k + 1 where k ∈ N , than:
2 p + p 2 = 2 2 k + 1 + ( 2 k + 1 ) 2
2 p + p 2 = 2 2 k + 1 + 4 k 2 + 4 k + 1 )
2 p + p 2 = 4 ( 2 2 k − 1 + k 2 + k ) + 1
let 4 ( 2 2 k − 1 + k 2 + k ) + 1 is prime ⇒ 4 ( 2 2 k − 1 + k 2 + k + 1 ) is prime.
so by subtracting 1 this implies that 4 ( 2 2 k − 1 + k 2 + k ) is prefect square than ( 2 2 k − 1 + k 2 + k ) is also a perfect square.
and this can't be only when k = 1 so p = 2 × 1 + 1 = 3
Consider 2 special cases: If p = 2 , 2 p + p 2 = 8 → not a prime number. If p = 3 , 2 p + p 2 = 1 7 → prime number.
For p > 3 , notice that 2 p ≡ − 1 p m o d 3 ≡ − 1 m o d 3 (since p is limited to odd numbers).
Now, look at the p 2 part. There are 2 cases to consider:
*Case 1: * p ≡ 1 m o d 3
Hence, p 2 ≡ 1 2 m o d 3 ≡ 1 m o d 3
*Case 2: * p ≡ 2 m o d 3 ≡ − 1 m o d 3
Hence, p 2 ≡ ( − 1 ) 2 m o d 3 ≡ 1 m o d 3
Therefore, either way, p 2 ≡ 1 m o d 3 for p > 3 .
So, we can conclude that 2 p + p 2 ≡ − 1 + 1 m o d 3 ≡ 0 m o d 3 .
Aha! That means, for p > 3 , 2 p + p 2 is always divisible by 3 , and therefore it isn't a prime number.
So, only 1 value of p satisfy the condition, which is 3 .
We know that a prime can be of the form 6 k + 1 or of the form 6 k + 5 .Also note that 2 2 k + 1 ≡ 2 ( m o d 6 ) and 2 2 k ≡ 4 ( m o d 6 ) . Case 1. If p is of the form 6 k + 1 ,The 2 6 k + 1 + ( 6 k + 1 ) 2 ≡ 3 ( m o d 6 ) and hence it cannot be a prime.
Case 2. If p is of the form 6 k + 5 ,The 2 6 k + 5 + ( 6 k + 5 ) 2 ≡ 3 ( m o d 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 !
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 , since p is odd, therefore 2 p ≡ 2 , p 2 ≡ 1 , adding them gives a number divisible by 3, so only p = 3 works(2 obviously doesn't).
Log in to reply
@Xuming Liang : Yes, working in modulo 3 is better and quicker for this problem. By the way, how did you get so good in geometry? :)
When p = 2 ,
2 p + p 2 = 2 2 + 2 2 = 8
8 is not a prime, so p = 2
Since 2 is the only even prime, p must be odd
Let p = 2 k + 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 )
When p is odd and p ≡ 1 ( m o d 3 ) ,
2 p + p 2 ≡ 2 + 1 2 ( m o d 3 ) ≡ 0 ( m o d 3 )
When p is odd and p ≡ 2 ( m o d 3 ) ,
2 p + p 2 ≡ 2 + 2 2 ( m o d 3 ) ≡ 0 ( m o d 3 )
In these cases, the only way that 2 p + p 2 is a prime is when 2 p + p 2 = 3 as 3 is the only prime that is 0 (mod 3)
However, this is impossible as p > 2 and 2 p + p 2 > 8
Hence, p ≡ 0 ( m o d 3 )
So, p = 3 as 3 is the only prime that is 0 (mod 3)
Hence there is only 1 answer
Each prime p ≥ 5 can be expressed as p = 6 k ± 1 where k is a positive integer number. So modulo 6, p ≡ 1 ∨ p ≡ − 1 ≡ 5 . Case 1) If p ≡ 1 , in modulo 6 2 p + p 2 ≡ 2 1 + 1 2 ≡ 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 , in modulo 6 2 p + p 2 ≡ 2 5 + ( − 1 ) 2 ≡ 3 2 + 1 ≡ 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 : if p = 2 , 2 p + p 2 = 2 2 + 2 2 = 8 which is not prime; if p = 3 , 2 p + p 2 = 2 3 + 3 2 = 1 7 which is prime. The solution is 1 .
For primes: p ≥ 5 the following applies: p ≡ 1 m o d ( 6 ) ⇒ 2 p + p 2 ≡ 2 + 1 ≡ 3 m o d ( 6 ) o r p ≡ 5 m o d ( 6 ) ⇒ 2 p + p 2 ≡ 2 5 + 5 2 = 5 7 ≡ 3 m o d ( 6 ) Now 2 can't produce a prime as even + even = even and 2 p + p 2 > 2 so we are left to test 3: 2 3 + 3 2 = 8 + 9 = 1 7 ∴ 3 i s t h e o n l y s o l u t i o n
The only solution for p is 3
For p >3, the expression is divisible by 3.
Thats all I know
yea
only 3 in the possible number
Note that if p=2, 2 2 + 2 2 = 4 is not prime but if p=3, 2 3 + 3 2 = 1 7 is prime. So we first assume p ≡ 1 ( m o d 3 ) . That gives because p is prime:
2 p + p 2 ≡ − 1 p + 1 2 ≡ 0 ( m o d 3 )
So we first assume p ≡ 2 ( m o d 3 ) . That gives because p is prime:
2 p + p 2 ≡ − 1 p + 2 2 ≡ 4 − 1 = 3 ≡ 0 ( m o d 3 )
This shows that 3 divides 2 p + p 2 ( ∗ ) so the only solution for ( ∗ ) to be prime is if p=3. Hence the answer 1.
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 , we know that p ≡ 1 , 2 ( m o d 3 ) .
Therefore, p 2 ≡ 1 ( m o d 3 ) .
Moreover, p is odd implies 2 p ≡ ( − 1 ) p ≡ − 1 ( m o d 3 ) .
In conclusion, 2 p + p 2 ≡ 1 + ( − 1 ) ≡ 0 ( m o d 3 ) is not prime number.
Hence there is the only one solution satisfying the conditions, that means the answer is 1.
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).
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
Problem Loading...
Note Loading...
Set Loading...
Consider p > 3 . Then, p is odd, and not a multiple of 3. Since p is odd: 2 p ≡ ( − 1 ) p ≡ − 1 ( m o d 3 ) Since x 2 ≡ 0 , 1 ( m o d 3 ) for all integer x , and p is not a multiple of 3: p 2 ≡ 1 ( m o d 3 ) Then, 2 p + p 2 ≡ − 1 + 1 ≡ 0 ( m o d 3 ) Since 2 p + p 2 > 3 , it cannot be prime. Now, we must try p = 2 , 3 .
If p = 2 , 2 2 + 2 2 = 8 , which is not prime.
If p = 3 , 2 3 + 3 2 = 1 7 , which is prime.
The answer is 1 .