Each of P, Q, R, S and (P+S), with P < Q < R < S, is a non leading zero 10digit base ten positive integer containing each of the digits from 0 to 9 exactly once. It is known that R is the arithmetic mean of P and S, and Q is the geometric mean of P and S.
Determine the minimum value of P and the maximum value of S.
(In reply to
re: Solution (I think) by brianjn)
It took about 15 minutes to run!
However, having now looked at the 27 possible quintuplets in more detail, there is an unexpected pattern: All values of P, Q and S are even, and I begin to think there's some more maths we can do to shorten the programming time.
I had realised that R can only be an integer if S and P have the same parity (since R = (S + P)/2 ), and that means that Q must also have that same parity (since Q^2 = PS), but I expected P,Q and S to be all odd as often as all even.
I checked whether the initial constraint of R and 2R both being pandigital was eliminating the possibility of P, Q and S being odd, but it isn't.
In fact, if you leave out that initial constraint, you still only get the same 27 quintuplets. So the later constraints eliminate all cases that the early constraint eliminates, but of course the run time is much longer without it (more than an hour!).
Now, with simple numbers, P, Q and S can be odd, e.g. {1,3,5,9,10}, so we need to look at the properites of pandigitals to explain the pattern....

Posted by Harry
on 20090725 00:26:53 