Each of P, Q, R, S and (P+S), with P < Q < R < S, is a non leading zero 10-digit 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.
There are two values here on which I want to focus, P and S.IF
I make the assumption that P
must have the lowest PD value and (P+S
) is allowed the highest then the following results:
In the above P, R and (P+S) are pandigital.
To run a computer program on my computer (and QuickBasic) does not seem feasible.
I could set up two For/If..EndIf/Next loops, one to generate incrementing PD values for P and the other to generate decrementing values of S which start at the value in my above table.
Since P and S would be PD, one would, as one option, convert Q, R and (P+S) to Strings and test for duplication.
The difficulty with this process however is that every P value generated (up to that time) needs to be tested against every S value generated (up to that time) until all conditions are met.
If those conditions are met very early I see no comfortable computer resolution from my resources.
That leads me to believe that there is a more direct, analytical method to achieving the goal.
Posted by brianjn
on 2009-07-22 01:35:42