Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are given three integers $a , b,$ and $c$ such that $a , b, c, a + b − c, a + c − b, b + c − a ,$ and $a + b + c$ are seven distinct primes. Let $d$ be the difference between the largest and smallest of these seven primes. Suppose that $800$ is an element in the set {$a + b, b + c, c + a $}. Determine the maximum possible value of $d$ . What I did: $a,b,c\geq 3$ (odd primes, if $a$ is even,then $a+b-c$ is even too and hence are not distinct ) $\implies a+b+c$ is the largest prime and WLOG, let $a$ be the smallest one.Then $b+c\geq a+b$ and $a+c$ implying $b+c\geq 800$.Since, $b+c-a\geq 0 \implies a\leq (b+c\geq 800)$.Here I am stuck, how to bound $a$(i don't know if that's necessary) and get the upper bound for $d$. Am i on the right track??

share|cite|improve this question
up vote 3 down vote accepted

It is clear that without loss of generality we can choose $a+b=800$, and again, as you suggest, we can try to maximize $b+c-a$ while minimizing $a$.

For the well definition of the problem we need $a\geq |b-c|$ and $c\leq a+b=800$. The two biggest primes smaller than 800 are (you can check on this list) $787$ and $797$, and their difference is $10$. So we need $a$ to be at least $10$ and such that its sum with $787$ or $797$ is $800$. This clearly suggests the following choice:

$$a=13, \qquad b=787, \qquad c=797.$$

Which leads to:

$$a+b-c=3, \qquad a+c-b=23, \qquad b+c-a=1571.$$

Again using the list above you can check that we have been lucky and those are all distinct primes. Then we have actually computed (not only bounded) the maximum vale $d$, which is:

$d = b+c-a -a = 1571-13= 1558.$

The maximality follows by construction.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.