Find all primes $p$ such that $p+2$ and $p^2+2p-8$ are also primes.
Problem
Source: Albanian National Math Olympiad 2012
Tags: modular arithmetic, number theory, primes
01.04.2012 15:41
$p=3$ ...! if $p=6k+1$ than $p+2$ isn't prime if $p=6k-1$ than $p^2 +2p-8$ isn't prime
01.04.2012 17:16
Let $p + 1 = q$; then $q^2 - 9 = (q + 3)(q - 3)$ is prime. $q - 3 = 1 \Longrightarrow 3, 5, 7$, $\boxed{p = 3}$ I think this should be moved to the Inequalities forum. It's most definitely not Number Theory. April Fool's Day!
06.04.2012 09:40
mhet49 wrote: Find all primes $p$ such that $p+2$ and $p^2+2p-8$ are also primes. $p^2+2p-8=(p-2)(p+4)$, we have $p-2=1\Longleftrightarrow p=3$. Conversely, if $p=3$, then we have $p+2=5,\ p^2+2p-8=7.$
13.05.2012 14:24
If $p \equiv 1 \pmod 3$, then $p+2$ is not prime; if $p \equiv -1 \pmod 3$ then $p^2+2p-8$ is not prime. The only case left is $p=3$, which works.
15.09.2012 14:03
If $ p=2 $ then $ p+2=4 $ and $ p^{2}+2p-8=0 $. So $ p=2 $ is not a solution. If $ p=3 $ then $ p+2=2 $ and $ p^{2}+2p-8=0 $. So $ p=3 $ is a solution. Now, assume $ p> 3 $, so $ p $ is odd. We consider two cases : - Case 1 : $ p\equiv 1 (mod3) $ So $ p+2\equiv 0(mod3) $ , contradiction. - Case 2 : $ p\equiv 2(mod3) $ So $ 2p\equiv 1(mod3) $, and we know that $ p^{2}\equiv 1(mod3) $ because $ p $ is odd. So $ p^{2}+2p-8\equiv 0(mod3) $ , contradiction again. Thus $ p=3 $ is the only solution.
27.02.2015 05:38
Let $q$ be a prime such that $p^{2}+2p-8=q\Longleftrightarrow \left ( p+1 \right )^{2}=q+9$. Applying modulo $q$ we see that either $p+1\equiv 3\pmod {q}$ or $p+1\equiv -3\pmod {q}$. The former lead us to $p\equiv 2\pmod {q}$, so there exists an integer $k$ such that $p=kq+2$. Hence $\left ( kq+3 \right )^{2}=q+9$ $k^2q^2+6kq+9=q+9$ $k^2q+6k=1$ Therefore $k\mid 1$, so either $k=1$ or $k=-1$. If $k=1$ then $q+6=1$, consequently $q=-5$ and $p=-3$. But $p=-3$ does not satisfy the first condition. If $k=-1$ then $q-6=1$, consequently $q=7$ and $p=-5$. This one satisfies the two conditions and so $p=-5$ is a possible solution. Now let's see what happens if $p+1\equiv -3\pmod {q}\Longleftrightarrow p\equiv -4\pmod {q}$. There exists an integer $h$ such that $p=qh-4$, so $\left ( qh-3 \right )^{2}=q+9$ $qh^2-6h=1$ Therefore, either $h=1$ or $h=-1$. If $h=1$ then $q=7$ and $p=3$, which is a possible solution. If $h=-1$ then $q=-5$ and $p=1$, which is not prime. We conclude that the only solutions are $p=-5$ and $p=3$.
28.02.2015 00:43
Let $p+2=x$. We then must find a prime $x$ such that $x-2$ is prime and $(x+2)(x-4)$ is prime as well. It is obvious that $x=5$ is the only such prime that works; hence, $\boxed{p=3}$.
03.03.2015 23:57
This problem is too easy... $p^2 + 2p -8 = (p-1)(p+5)$ is prime. Because $p$ is prime too so $2\mid p-1$. $\Longrightarrow$ $\boxed{p = 3}$
19.07.2015 23:49
This problem is definitely easy. If $p \equiv 2 (mod 3)$ then $p^{2}+2p-8 \equiv 0 (mod 3)$ so it is not prime (because it is greater than 3). If $p \equiv 1 (mod 3)$ then $p+2 \equiv 0 (mod 3)$ so $p+2=3$ hence $p=1$, which doesn't work. So $p \equiv 0 (mod 3)$ hence $\fbox{p=3}$. Finally, we check that when $p=3$, $p+2$ and $p^{2}+2p-8$ are prime. Indeed, $p+2=5$ and $p^{2}+2p-8=7$.
16.04.2016 23:07
mihajlon wrote: This problem is too easy... $p^2 + 2p -8 = (p-1)(p+5)$ is prime. Because $p$ is prime too so $2\mid p-1$. $\Longrightarrow$ $\boxed{p = 3}$ (p-1)(p-5) isn't p^2+2p-8
20.04.2016 06:17
for both p+2 and [p^2]+[2*p]- 8 to be primes, the either factors of [p^2]+[2*p]- 8 has to be 1. since one value is negative .......... hence the other factor p-2 must be 1. therefore........... p=3.
13.09.2016 23:27
23.01.2017 19:58
$p$ = $3$. Solution- $p^2$ + $2p$ - $8$ = ($p$+$4$)($p$-$2$). Since $p^2$ + $2p$ - $8$ is a prime, So, one of $p$+$4$, $p$-$2$ is equal to ±$1$. We find that $p$-$2$ = $1$ (since $p$>$0$), or, $p$ = $3$.
24.01.2017 05:03
Taking $p^2+2p-8 = (p+1)^2-9$ works too $(p+1+3)(p+1-3) \rightarrow p-2=1$ done
12.04.2017 17:20
21.07.2017 20:42
p^2 +2p -8 = (p+4)(p-2), which is a prime number only if p-2=1. So, p = 3 is the only solution.
20.12.2017 18:31
mhet49 wrote: Find all primes $p$ such that $p+2$ and $p^2+2p-8$ are also primes. 3
17.03.2018 11:56
$p^2+2p-8=p^2+4p-2p-8=p(p+4)-2(p+4)=(p-2)(p+4)$ This number is prime and $p+4>p-2$ so $p-2\ge1$. If $p-2>1$ Then $p-2$ is a prime or a composite number and $p+4$ is a prime or composite number and for sure $(p-2)(p+4)$ is a composite number. Contradiction. So $p-2=1\iff p=3$. We have to check if this number satisfies the assumptions. $p+2=5$ is a prime, $p=3$ is a prime and $p^2+2p-8=7$ is a prime Indeed $p=3$
11.08.2018 05:24
$P^{2}+2P-8=(P-2)(P+4)$ $\Longrightarrow P=3$ is only possibility And putting $P=3$ $P+2=5$ is a prime and $P^{2}+2P-8=7$ is also a prime $\therefore$ $\boxed{P=3}$ is only solution
01.11.2018 23:55
Divide in $3$ cases: If $p = 3k$, implies $p = 3$, which is solution. If $p = 3k+1$, so $p+2 = 3k+3$, and isn't prime, (or $k = 0$, then $p = 1$, not prime). $CONTRADICTION!$ If $p = 3k+2$, so $p^2 + 2p - 8 = 9k^2 + 42k$, then $3$ divides a prime different from $3$, (or $k = 0$ and $p = 2$, so $p+2 = 4$, which isn't prime). $CONTRADICTION!$ Thus $p = 3$ is unique solution.
26.12.2018 12:10
The prime number must be in the form of $3k-1$ now $p^2+2p-8=9(k^2-1)$ which is a composite number, a contradiction So the only such prime number is $3$
06.01.2019 07:38
Notice that $p^2 + 2p - 8 = (p-2)(p+4)$. Then p must be greater than $5$. Now check the cases $:-D$
28.10.2019 18:35
SOLUTION Note that $p^2-2p-8=(p-1)^2-9=(p-2)(p+4)$. In order for $(p-2)(p-4)$ not to be prime, we must have that $p-2=0,1$ or $p+4=0,1$. If $p-2=0$, then $p^2-2p-8=0$, and $0$ isn't a prime. If $p-2=1$, $p=3$ and $p^2-2p-8=7$, which is also prime. If $p+4=0$, $p^2-2p-8=(p-1)^2-9 = 0$, which is not prime. If $p+4=1$, then $p=-3$ and $p^2-2p-8=(p-1)^2-9$ is negative and therefore not prime. Hence, our only solution is $\boxed{p=3}$.
28.10.2019 22:02
Another approach would be by checking that if $p$ is greater that $3$, then mods gives us that $p^2+2p-8$ or $p+2$ is prime. So we check for $p=3$ and less and we find $p=3$.
19.03.2020 23:55
Ok, let's write $p^2+2p-8$ = $p^2+2p+1-9$ = $(p+1)^2-3^2$ = $(p+1-3)(p+1+3)$ = $(p-2)(p+4)$ This can be prime number if and only if $p-2=1$ or $p+4=1$ $p=3$ or $p=-3$. p is also natural, so only solution is $p=3$.
27.11.2020 16:38
mhet49 wrote: Find all primes $p$ such that $p+2$ and $p^2+2p-8$ are also primes. p^2 + 2p -8 = (p-2)(p+4) Therefore p-2 =1 It implies p=3
01.12.2020 06:55
Only $p=3$ works. It is easy to check. To show that it's the only solution, observe that $p^2+2p-8=(p+4)(p-2)$. Hence, in order for it to be prime, one factor must equal 1. If $p+4=1$, then $p$ is negative and we don't have a solution. If $p-2=1$, then $p=3$. Checking this value of $p$, it works so we are done.
01.12.2020 08:55
mhet49 wrote: Find all primes $p$ such that $p+2$ and $p^2+2p-8$ are also primes. $mod 3$ kills it case 1 : $p \equiv 0 (mod 3) \implies p = 3 , p + 2 = 5$ and $p^2+2p-8 =7$ all of them works ! case 2 : $p \equiv 1 (mod 3) \implies p + 2 \equiv 3 (mod 3) \implies p + 2 = 3 \implies p = 1$ (not a prime) case 3 : $p \equiv -1 (mod 3) \implies p^2+2p-8 \equiv -9 \equiv 0 (mod 3) \implies p^2+2p-8 = 3$ (not an integer) hence $p = 3$ is our only solution $\blacksquare$
03.02.2021 17:14
$p^2+4p-8=(p+4)(p-2)=$prime Hence $p=3$ and as $p+2=3+3=5,p+4=3+4=7$ is also prime So $p=3$ is only solution.
06.02.2021 13:04
this problem seems too easy to be a MO problem imo, grade 6 problem in my country If p = 1 (mod 3) then 3 | p+2, which is clearly a contradiction If p = 2 (mod 3), then 3 | p^2 + 2p - 8, which is also a contradiction So 3|p, which means p=3 P.S: I'm not allowed to use Latex as I'm a new user tho.
06.02.2021 13:54
Fairly straightforward
15.05.2021 03:01
mhet49 wrote: Find all primes $p$ such that $p+2$ and $p^2+2p-8$ are also primes. Let $q=p+2$ and $r=p^2+2p-8$. We will use $\pmod 3$ and we assume that $p \ne 3$ Primes can be $p \equiv \pm 1 \pmod 3$ If $p \equiv 1 \pmod 3$ $$q=p+2 \equiv 0 \pmod 3 \implies q=1 \; \text{contradiction!!}$$If $p \equiv -1 \pmod 3$ $$r=p^2+2p-8 \equiv 0 \pmod 3 \implies r=3 \implies 11=p(p+2) \; \text{contradiction!!}$$Then $p=3$, $q=5$ and $r=7$ works thus $p=3$ is the only solution. Thus we are done
07.10.2021 10:24
Split p^2+2p-8 such that it forms two factors, (p+4) and p-2). For it to be prime, either p+4=1 or p-2=1 C-1 C-2 p+4=1 p-2=1 => p=-3 =>p=3 HENCE p=3
16.12.2021 21:40
p^2 + 2p - 8 is prime ---> (p - 2)(p + 4) is prime so one should be 1. obviously it's p - 2 so p = 3. for p = 3 both p+2 and p^2 + 2p - 8 are prime.
12.12.2022 05:48
Just $\mod 3$ Claim: $p=3$ is the only solution. It is easy to check that this works. Proof: Assume that a prime $p > 3$ satisfies the condition. Obviously, $p \equiv 1, 2 \mod 3$. If $p \equiv 1 \mod 3$, $p+2$ is divisible by $3$. Similarly, if $p \equiv 2 \mod 3$, $p^2 - 2p + 8 = (p+1)^2 - 1 \equiv 0 \mod 3$. Therefore, any $p>3$ cannot possibly satisfy the condition, and we are done. $\blacksquare$
25.08.2023 00:47
Is this a joke? We claim that $\boxed{3}$, is the only solution. If $p \equiv 1\pmod{3}$, then, $p+2$, is not prime. If $p \equiv 2\pmod{3}$, then $p^2+2p-8$, is divisible by $3$, hence, $p \equiv 0\pmod{3}$, but the only prime, is $3$, and $3$, works. $\square$
23.10.2023 05:49
P^2 + 4P -2P - 8 => (P-2)(P+4) Where either of the factors has to be 1, so (P-2)=1 => P=3; [Since P > 0] Hence, P+2 = 5 ; P^2 + 4P -2P - 8 = 7;
02.04.2024 03:57
We note that: \[p^2+2p+8 = (p+1)^2-3^2 = (p-2)(p+4)\]but this is a prime number, so $p-2,p+4\in \{1,q\}$,Since $p+4\geq 6$ so $p-2 = 1\rightarrow p = 3 $ So, $p+2 = 5$ , and $p^2+2p-8 = 7$. Therefore $p = 3$, As desired.
27.11.2024 09:22
1) p=6k+1: p+2=6k+3=3(2k+1) It is not a prime number. 2) p=6k-1: p^2 +2p -8 =36k^2 -12k+1+12k-2-8 =36k^2-9=9(4k^2-1) It is not a prime number. ∴p=3
28.11.2024 14:31
If $p \ne 3$, then $p \equiv -1 \pmod{6}$, so $$p^2 + 2p - 8 \equiv 1-2-8 \equiv 3 \pmod{6} \implies 3 \mid p^2+2p-8, $$impossible for $p \ge 5$. Therefore $\boxed{p = 3}$, which works. $\square$
29.11.2024 19:39
A quick solution : $p^2+2p-8=(p-2)(p+4)$ There are only 2 cases where it's a prime number : Case 1 : $p-2=1$ and $p+4$ is prime Then : $p=3$ is a solution because : $p+2=5$ and $p+4=7$ , both being prime Case 2 : $p-2$ is prime and $p+4=1$ Then : $p=-3$ Absurde Thus the only solution is $p=3$