Tuesday, October 22, 2013

Q13/106) 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.



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)
so the 7 prime numbers are a, a + 6n, a+ 12n, a+12m, a+ 6(n+m), a +6m, a + 4(m+n)
not necessarily in increasing order
a=11, n= 3, m= 5 gives the solution 11,29,47,71, 59, 41, 43.

No comments: