Prime, Prime, and Prime

p , q , p, q, and ( p q + q p ) (p^q+q^p) are all prime numbers. What is the largest possible sum of the three numbers: p + q + ( p q + q p ) ? p+q+(p^q+q^p) ?


The answer is 22.

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.

3 solutions

Áron Bán-Szabó
Jul 11, 2017

p p and q q can't be two odd numbers, because then p q + q p p^q+q^p would be an even number, greater than 2 2 , so not a prime. p = q = 2 p=q=2 is not a solution, so suppose p q p\geq q . Then q = 2 q=2 for sure. Now p 2 + 2 p p^2+2^p has to be a prime, where p is an odd prime. If we try with p = 3 p=3 , then 2 3 + 3 2 = 17 2^3+3^2=17 is a prime, so we get a solution. If we try with p = 5 p=5 , we get 2 5 + 5 2 = 57 2^5+5^2=57 is not a prime, since it is divisible for example with 3. If we try with p = 7 p=7 we get an other wrong solution, 2 7 + 7 2 2^7+7^2 is also divisible by 3 3 . The suspicion arises that the only solution is p = 3 p=3 , because the others are divisible by 3 3 . We will prove our notice!

Note that if k k is an odd integer, then k 2 1 m o d 3 k > 0 , 3 ∤ k k^2\equiv1 \ \mod3 \ \forall \ k>0, 3\not\mid k . So p 2 1 m o d 3 p^2\equiv1 \ \mod3 .

Since 2 p = 2 2 n 2 2^p=2^{2n}*2 and 4 1 m o d 3 2 2 m 1 m o d 3 m 0 4\equiv1 \ \mod3 \Rightarrow 2^{2m}\equiv1 \ \mod3 \ \forall \ m\geq0 , it is obvious that 2 p = 2 2 2 n 1 2 = 2 m o d 3 2^p=2*2^{2n}\equiv1*2=2 \ \mod3 .

So if p 3 p\neq3 , then 3 p q + q p 3\mid p^q+q^p .

Therefore the only solution is p = 3 , q = 2 p=3, q=2 (because p 0 p\geq0 ) and the answer is 22 \boxed{22} .

Why is k 2 1 m o d 3 k > 0 k^2 \equiv 1 \mod 3 \ \forall \ k > 0 ? This is not the case for k = 9 k = 9 . In fact, k 2 0 m o d 3 k = 3 m m N k^2 \equiv 0 \mod 3 \ \forall \ k = 3m \ \forall \ m \in \mathbb{N} . Other than that, nice observation/conjecture and proof to back it up!

Zach Abueg - 3 years, 11 months ago

Log in to reply

I think he ment an odd, prime integer.

Peter van der Linden - 3 years, 11 months ago

Log in to reply

Perhaps so. Thanks Peter!

Zach Abueg - 3 years, 11 months ago

Log in to reply

@Zach Abueg It can be proven using Fermat's little theorem .

Andrei Stoenica - 3 years, 10 months ago

but hasn't he mentioned that 0 , 3 ∤ k 0,3 \not\mid k ?

Vilakshan Gupta - 3 years, 10 months ago

Why you check only for divisibility by 3.it may happen that(p^2+2^p) can be divided by some other integer.

Sum Pan - 3 years, 10 months ago

Log in to reply

It's not about whether it is divisible by some other specific prime number. You just have to prove that if it's divisible by 3, then it's no longer a prime number.

Pi Han Goh - 3 years, 10 months ago

(p^q + q^p) will always be divided by another integer as well, by definition - but after p=3, it is always divisible by 3

Katherine barker - 3 years, 10 months ago
Relue Tamref
Jul 21, 2017

First we nottice that p , q p,q can't be odd simultaneously, but both of them have to be prime so p = 2 p=2 (if we choosed q = 2 q=2 this wouldn't change because of the problem symmetry)

Analysing the expression 2 q + q 2 2^{q} + q^{2} we can see that q = 3 q=3 is a solution since the sum gives us 17 17 , my hypothesis by looking at the other sums that q q is prime it's that this is the only solution, so i have to prove it. We can see that q 2 1 m o d 3 q^{2} \equiv 1 \mod 3 by Fermat's Little Theorem if q q is not a multiple of 3, analysing the term 2 q 2^{q} (Note that q haves to be odd) we can see that 2 q 1 m o d 3 2^{q} \equiv -1 \mod 3 so 2 q + q 2 ( 1 ) + ( 1 ) m o d 3 2^{q} + q^{2} \equiv (-1) + (1) \mod 3 if q q is odd and not a multiple of 3 3 so all other primes that aren't 3 3 won't work, so answer is 2 + 3 + 2 3 + 3 2 = 22 2 + 3 + 2^{3} + 3^{2} = 22

0 is the answer or infinity.

Dain E - 3 years, 10 months ago

Log in to reply

Can you explain why 0 is the answer?

Pi Han Goh - 3 years, 10 months ago

0 is not the answer neither infinity, but what i showed it's that the only possible case it's where q is a multiple of 3 because if q is not multiple of 3 p + q + p^q + q^p would be divisible by 3, and the problem states that q haves to be prime therefore q=3.

Relue Tamref - 3 years, 10 months ago
Aviel Livay
Jul 22, 2017

The answer is 22.

Why?

Well first of all - in order for p q + q p p^q + q^p to be a prime number, it must be odd.

It follows that either p or q must be even and the only even prime that I know of is 2. so we are actually asked here what is the largest 2 q + q 2 2^q + q^2 that is prime where q is of course prime. the truth is that very fast (q>3) this 2 q + q 2 2^q + q^2 is becoming always divisible by 3....

How do I know?

Well let's start with the easy part - let's focus on 2 q 2^q .
I shall prove by induction that 2 q 2 m o d 3 2^q\equiv\ 2 \ mod \ 3 . Starting with q=1 we can see that indeed 2 1 = 2 2^1=2 . Now suppose that we proved that 2 q 2 m o d 3 2^q\equiv2 \ mod\ 3 so the next one would be q+2 because q is obviously odd... and for 2 q + 2 2 m o d 3 2^{q+2}\equiv2 \ mod\ 3 we actually have 2 q + 2 4 2 q 4 2 8 2 m o d 3 2^{q+2}\equiv4*2^q\equiv4*2\equiv8\equiv2 \ mod\ 3

Now for the tougher part... - how do I know that q 2 1 m o d 3 q^2\equiv1\ mod\ 3 ? Well every integer can be one of the following: 6 k 1 6k-1 , 6 k 6k , 6 k + 1 6k+1 , 6 k + 2 6k+2 , 6 k + 3 6k+3 or 6 k + 4 6k+4 . Of these: 6 k 6k is divisible by 6 6 k + 2 6k+2 is divisible by 2 6 k + 3 6k+3 is divisible by 3 6 k + 4 6k+4 is divisible by 2

So a prime number greater equal 6 can only be either 6 k 1 6k-1 or 6 k + 1 6k+1 .

Now squaring this we get ( 6 k + 1 ) 2 36 k 2 + 12 k + 1 1 m o d 6 (6k+1)^2 \equiv 36k^2+12k +1 \equiv 1\ mod\ 6 .

and ( 6 k 1 ) 2 36 k 2 12 k + 1 1 m o d 6 (6k-1)^2 \equiv 36k^2-12k +1 \equiv 1\ mod\ 6 .

In other words a square of a prime number has modulo 1 when divided by 6.

or in other other words a square of a prime number has a modulo 1 when divided by 3. which means q 2 1 m o d 3 q^2\equiv1\ mod\ 3 with one exception... - for the prime number 2

So to sum it up: 2 q + q 2 2 + 1 3 0 m o d 3 2^q + q^2\ \equiv\ 2 + 1\ \equiv\ 3\ \equiv 0\ mod\ 3

Now as explained above the exception is with numbers smaller than 6:

for q=5 we get p q + q p = 2 5 + 5 2 = 57 p^q+q^p=2^5+5^2=57 which is not a prime.

q=4 is not prime.

for q=3 we get p q + q p = 2 3 + 3 2 = 17 p^q+q^p=2^3+3^2=17 which is a prime and is the largest we can get.

So we are looking for p + q + p q + q p = 2 + 3 + 2 3 + 3 2 = 22 p + q + p^q + q^p = 2 + 3 + 2^3 + 3^2 = \boxed{22}

This is a long, yet very elementary solution. Very easy to understand.

A few pointers: You can apply Fermat's little theorem to simplify your work. And have you heard of quotient remainder theorem?

Pi Han Goh - 3 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...