Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enigma 1741 - Four square

18 views
Skip to first unread message

Chappy

unread,
May 2, 2013, 3:45:32 AM5/2/13
to
Enigma 1741 - Four square
New Scientist magazine, 23 March 2013.
By Ian Kay.

I have before me five two-digit numbers, with
no leading zeros. All the digits are different
and none of the numbers is prime. The sum of
the five numbers is a perfect square. If I
remove one of the numbers, the sum of the
remaining four is also a perfect square. If I
remove another number, the sum of the remaining
three is again a perfect square, and if I remove
a third number, the sum of the last two is again
a perfect square.

What are my five numbers?

Ciao,
Chappy.

Dave Baker

unread,
May 2, 2013, 6:39:22 AM5/2/13
to

"Chappy" <petergreg...@hotmail.com> wrote in message
news:fd378d27-a912-47e7...@googlegroups.com...
The largest square that can be summed from the five 2 digit numbers is 324.
The smallest is 169. Listing the squares between those limits out and
deducting the difference to other squares (eliminating primes) leads to a
fairly simple pencil and paper solution.

Starting total is 225 (15 squared)
Deduct 56 to leave 169 (13 squared)
Deduct 48 to leave 121 (11 squared)
Deduct 72 to leave 49 (7 squared)
The remaining unused digits are 1,3,9 and 0 which give 10 and 39 summing to
49.

The five numbers are 56, 48, 72, 39 and 10.

Not very challenging.
--
Dave Baker

John Jones

unread,
May 2, 2013, 8:09:01 AM5/2/13
to
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




0 new messages