On Thu, 2 May 2013 00:45:32 -0700 (PDT), "Chappy"
<
petergreg...@hotmail.com> wrote in article <fd378d27-a912-47e7-
8b12-ad7...@googlegroups.com>...
10! being what it is makes this unsuitable for really brute force.
If the five numbers are a, b, c, d, e
we have
a + b + c + d + e = s^2 (some s in 13..18 - see later)
a + b + c + d = t^2 t in 11..17
a + b + c = u^2 u in 9..15
a + b = v^2 v in 7..13
we can deduce min and max ranges for s^2 as
sum(10,29,38,47,56) to sum(91,82,73,64,50) (digit order doesnt matter)
ie 180 to 360 so s is in range 13 to 18
The same logic allows the other ranges shown above.
subtracting the equations:
c = u^2 - v^2
d = t^2 - u^2
e = s^2 - t^2
t^2 = s^2 - e
u^2 = s^2 - e - d
v^2 = s^2 - e - d - c
So we need a table of differences of squares ranging from 7 to 18
and from which duplicated digits, 3-digit numbers, and primes are
removed.
This takes a little time to do, and there are 30 possible differences.
these 30 must contain c, d and e.
36 49 64 81 100 121 144 169 196 225
256 289 324
36
49
64 28 15
81 45 32
100 64 51 36
121 85 72 57 40 21
144 95 80 63
169 69 48 25
196 96 75 52 27
225 81 56
256 87 60
289 93 64
324
68 35
( ... serving suggestion. Yes I did use Excel plus manual inspection)
In fact examining the table shows that there are only 20 differences
in 9..15 (u) to 7..13 (v) so this narrows c down to those 20.
similarly d has 17 and e 13.
This is still nearly 5000 potential choices.
brute force could do this.
But let us continue.
Consider modulo 9. We know that the five numbers exhaust all the digits.
And the mod 9 of any number is the sum of its digits.
So a + b + c + d + e must equal sum(0 1 2 ..9) = 45 = 0 mod 9
IE s is 0 or 3 or 6 mod 9, and in the range 13..18 this leaves 15 or 18.
now e = s^2 - t^2 mod 9 and the differences in my table for s^2=15 or 18
are just 81, 56, 68, or 35.
So e is one of those.
Suppose we choose e = 81.
Then t^2 = s^2 - e = 0 mod 9 and d = t^2 - u^2
so looking in the table for differences in the range 11..17 to 9..15
where t^2 = 0 mod 9 and not using digits 1 or 8 results in finding
63 or 56.
if d = 63, u^2 = s^2 - e - d = 0 mod 9
so now looking for differences in range 9..15 to 7..13
where u^2 = 0 mod 9 and removing those which double up previous digits
we are left with c = 95.
so a + b = 0 - c - d - e mod 9 = 0 - 95 - 63 - 81 = 4 mod 9
so a + b must be 49 or 121
but neither 49 + 95 + 63 + 81 or 121 + 95 + 63 + 81 is a square - so not
that one then.
Arguing in this way we produce the following table
e d c a+b ok?
81 63 95 49/121 NO
81 56 27 169 NO
56 48 72 49/121 mebbe 49
..stop there
So the last line is interesting. the digits for a and b which are left
after 56 48 and 72 are taken are 0, 1, 3, 9.
If we can jiggle these to add to 49 we are home.
Not too difficult. 10 + 39 = 49 (also 19 + 30 but 19 is prime)
So an answer is 10 39 72 48 56.
check:
10 10
39 49 7^2
72 121 11^2
48 169 13^2
56 225 15^2
And I have no doubt it is unique, since I also did the brute force
search of 5000 possibles and the candidates include also
3 97 21 48 56
7 93 21 48 56
both of which which have primes and leading zeroes.
How did Ian come up with this enigma? v tricky.
HTH
JJ