Subscribe via feed.

Yet another prime problem

Posted by Chris on August 10, 2012 – 3:23 pm

Find three different prime numbers between 10 and 99, where the average of any two is a prime and the average of all three is a prime.

Obviously no computers and minimal trial and errror only.


This post is under “MathsChallenge” and has 15 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

15 Responds so far- Add one»

  1. 1. Kali Prasad Tripathy Said:

    Average of any two is a prime is not possible as 2 numbers both being odd average is even and hence cannot be prime

  2. 2. Kali Prasad Tripathy Said:

    stupid of me > I took sum as average

    all the numbers have to be of the form 6m+ 1 or 6m- 1

    we can see the list and find the value

  3. 3. slavy Said:

    Hi, everybody! I’m still alive :) Even though we have only 21 prime numbers to check, I believe I managed to shoot the poor pigeon with an elephant gun, so good luck to the other hunters :) Apart from that, I apologize for the lack of interest my account indicated recently, I guess I was just drinking too much…

  4. 4. Chris Said:

    Hi slavy. I’m so pleased to see you back. It’s been very quiet here, especially over the last few weeks/months.

  5. 5. Vedsar Kushwaha Said:

    i just checked all the combinations, but didn’t found that any two combinations out of three gets their average as a prime number.

  6. 6. Chris Said:

    Hi Vedsar, there definitely is such a combination.

  7. 7. Wizard of Oz Said:

    I figure that to get a prime average the primes have to be a multiple of 4 apart, and greater than 4, i.e the gap has to be 8, 12, 16, etc. This gives us a few shorter subsets of the 21 primes within which all three candidate primes have to lie.

    We can then eliminate combinations ending in 0 or 5 as their averages cannot be prime.

    This still leaves a lot of tedious trial and error checking which I don’t have the time to do.

  8. 8. Kali Prasad Tripathy Said:

    I tried the combination as follows.

    All the numbers have to be of the same form that is all 6n+1 or all 6n-1.

    This is so because 6n+1 and 6m-1 have average 3(n+m) which is not a prime

    this I took to reduce the number of test cases.

    Now without loss of generality we can choose the 2 numbers and their mean to be taking

    a, a + 6n, a + 12n, all 3 are primes ( a and a + 12n are numbers and a+6n is mean we choose this because average should be 6 or a multiple)

    the next number has to be of the form a + 12m

    now (a+12n + a + 12m)/2 = a + 6(m+n)

    and (a+ a + 12n + a + 12m)/3 = a + 4(m+n)

    for this one to be prime m+n should be divisible by 3 else this shall not be of the form a+ 6k where k is a number

    so the 3 numbers we get are ( with 4 means)

    a, a + 12n, a + 24n ( a+ 6n, a + 18n, a+ 12n, a + 12n)

    we need 5 numbers a, a+ 6n , a + 12n , a + 18n , a + 24 n

    Tried the cases but did not find a solution

    so take a, a + 12 n, a + 60n( a+ 6n, a+ 36n, a + 30n, a + 24n)

    Tried this case did not find a solution

    may be I missed some thing

  9. 9. Chris Said:

    Hi all. Without giving anything away about the method, I can say that the three primes are 11, 47 and 71 and that is the only possible set of primes that satisfy the problem. Just as Kali said, they are all of the same form and a multiple of 12 apart. In fact they’re of the 6n – 1 form.

    I’ll come clean, I don’t know how to do it. That’s very embarrassing, because the last time it was posted (years ago), (Anonymous)Cam answered it and I saw and understood his working. All I remember is that he used modulo arithmetic. Cam’s answer has vanished.

    Because of what slavy has written, I suspect he has another method than the one that Cam posted.

  10. 10. Kali Prasad Tripathy Said:

    Now I see where I had a problem . I was having a mental block the 3rd term being divisible by 3 it should be a + 60n but what if n is a multiple of 3 then it could be a + 20n ( it shall be multiple of 6). ( this may give a solution : a posssibility- Here it does because we know then ans )

    so we have a, a + 12n , a + 20n with n multiple of 3

    or a , a + 36m, a + 60m

    and the 4 means are a+ 18m, a + 30m, a + 48m , a + 32m

    now m has to be 1 other wise a + 60m > 100

    now we need to have a of the form 6n-1 else a + 32 is not prime

    we need to check for the numbers a = 6n-1 and a < 40

    a = 11 gives 11, 47, 71 are the values and the means are 29, 41, 59 and 43 are the means

    so original solution is 11,47,71.

    This part was missed by me.

  11. 11. AnonymousCam Said:

    I guess that’s my cue to offer my approach….

    Here’s our primes:
    11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,

    since the avg of all 3 must be an integer the sum mod 3 must be = 0
    (i.e. it must be divisible by 3) none of the individual digits can be
    0 mod 3 (as they are prime and >3)
    So their sum is
    (3a+r1)+(3b+r2)+(3c+r3) =3(a+b+c)+(r1+r2+r3)
    r1+r2+r3 is only a multiple of 3 if they are all 1 or 2
    so we can group the primes by those with n mod 3=1, and those with n mod 3=2
    11,17,23,29,41,47,53,59,71,83,89
    13,19,31,37,43,61,67,73,79,97

    now we can’t have the average of the sum being even either
    Sum of any two can’t be =2*2k= 4k where k is an integer
    so the sum mod 4 can not be 0
    being odd the numbers are either 1 mod 4 or 3 mod 4.
    1+1 mod 4 is fine, 3+3 mod 4 is fine but 1+3 mod 4 =0
    so we must seperate the groups into 1 mod 4 and 3 mod 4

    11,23,47,59,71,83
    17,29,41,53,89
    19,31,43,67,79
    13,37,61,73,97

    now we know that the avg of the sum must be prime, so we can’t have the sum of two of
    the primes end with a 0, because the average would end with a 5 or 0 which couldn’t be prime

    so 1s and 9s must be seperated
    11,23,47,71,83
    23,47,59,83

    17,41,53
    17,29,53,89

    31,43,67
    19,43,67,79

    13,37,61,73,97

    and 3s and 7s must be seperated
    11,23,71,83
    11,47,71

    23,59,83
    47,59

    41,53
    17,41

    29,53,89
    17,29,89

    31,43
    31,67

    19,43,79
    19,67,79

    13,61,73
    37,61,97

    obviously we can get rid of the groups with less than 3 primes

    11,23,71,83
    11,47,71
    23,59,83
    29,53,89
    17,29,89
    19,43,79
    19,67,79
    13,61,73
    37,61,97

    we could also take the mod 9 of the groups to ensure that we don’t have a group with sum mod 9=0
    because it’s average would be divisible by 3, but at this point we may as well just test the ones
    we have left

    11,23,71 (x+y)/2=34/2=17, (x+z)/2=82/2=41, (y+z)/2=94/2=47, (x+y+z)/3=105/3=35 not prime
    11,23,83 (x+y)/2=34/2=17, (x+z)/2=94/2=47, (y+z)/2=106/2=53, (x+y+z)/3=117/3=39 not prime
    11,47,71 (x+y)/2=58/2=29, (x+z)/2=82/2=41, (y+z)/2=118/2=59, (x+y+z)/3=129/3=43 prime !!!
    23,59,83 (x+y)/2=82/2=41, (x+z)/2=106/2=53, (y+z)/2=142/2=71, (x+y+z)/3=165/3=55 not prime
    29,53,89 (x+y)/2=82/2=41, (x+z)/2=118/2=59, (y+z)/2=142/2=71, (x+y+z)/3=171/3=57 not prime
    17,29,89 (x+y)/2=46/2=23, (x+z)/2=106/2=53, (y+z)/2=101/2=59, (x+y+z)/3=135/3=45 not prime
    19,43,79 (x+y)/2=62/2=31, (x+z)/2=98/2=49, not prime
    19,67,79 (x+y)/2=86/2=43, (x+z)/2=98/2=49, not prime
    13,61,73 (x+y)/2=74/2=37, (x+z)/2=86/2=43, (y+z)/2=134/2=67, (x+y+z)/3=147/3=49 not prime
    37,61,97 (x+y)/2=98/2=49, not prime

    So 11,47,71 is the only group of primes that meets our criteria.

    Hopefully that makes sense

  12. 12. AnonymousCam Said:

    I forgot to mention 11,23,71,83 can be split up into two
    groups 11,23,71 and 11,23,83, since the primes can’t be consecutive (the average must be prime too and fall somewhere in between)

  13. 13. slavy Said:

    I didn’t check all the details in the Cam’s solution, but I agree with it, in general. My arguments are slightly different, so let me state my solution. I repeat some of the facts already established by others so that the solution is complete and self-explanatory.

    In the problem we have not 3 but 7 prime numbers between 11 and 99, which is 33% of all primes there. Any pair of numbers, with its average in the middle form a 3-term arithmetic progression, so unless the step size is divisible by 3, exactly one of the members will be itself divisible by 3. Similar for mod 2. Hence all the step sizes are divisible by 2*3=6 and we have prime numbers p, p+6a, p+12a, p+12a+6b, p+12a+12b, p+6a+6b, and p+8a+4b. Moreover, the triple we want to find is (p,p+12a,p+12a+12b), thus all the primes are comparable mod 12. As Cam already pointed out, the 4 groups mod 12 are

    11,23,47,59,71,83
    17,29,41,53,89
    19,31,43,67,79
    13,37,61,73,97

    Since the largest 2-digit prime number is 97, while the smallest one is 11, we derive that a+b is not larger than (97-11)/12, i.e., 8. Note that a cannot be the same as b, since then we obtain a 5-term arithmetic progression, and as before we deduce that a=b is divisible by 5, thus a+b is at least 10 which is a contradiction. Also, a and b cannot be simultaneously even, since then all the 7 numbers are congruent mod 12, while none of the 4 groups mod 12 above is that large. We will prove that a+b=5.

    First, consider a+b=7. There is only one case, namely (13,97) for the smallest, largest prime number, respectively. Their average is divisible by 5 and is not prime. For a+b=6 we have two options: (11,83) and (17,89). It is easy to check that they both lead to nothing. The computations are faster if one uses some of the remarks above, since only the cases a=1 b=5 and a=5 b=1 should be checked. So far we derived that a+b is at most 5.

    Now, we use mod 5 arguments to obtain that a+b should be divisible by 5, hence be exactly 5. Neither a nor b can be zero, so both of them are also smaller than 5 and not divisible by it. The seven primes are congruent p + (0,a,2a,+/-(2a+b),a+b,2(a+b)) mod 5. Assume that 2a+b=0 mod 5. Then b=3a mod 5, and (0,a,2a,a+b=4a,2(a+b)=3a) form a complete residue system, a contradiction. Now, if we assume that a+b is not divisible by 5, it is easy to verify that (0,a,2a,2a+b,a+b) form another complete residue system. Therefore a+b=5. The remaining cases are not so many and can be attacked one by one.

  14. 14. Chris Said:

    Hi all. I’m sorry that I’ve been slow at acknowledging your work. I’m helping my dad move house – what a nightmare.

    I’m too tired to follow all the details – I can’t hold enough things in my head at
    the same time. But on a quick glance, I don’t see how one can do much better
    than the approaches that have been made. I’m gutted – I can’t recall the
    super-slick way that (I’m now only 80% confident) Cam did previously.

  15. 15. subhash Said:

    11,47,71

Post a reply




PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0