Same five digits

Back in 2011, a magazine offered £15 for anyone who solved this puzzle first. It goes as follows:

I have written down three different 5-digit perfect squares, which between them use five different digits. Each of the five digits is used a different number of times, the five numbers of times being the same as the five digits of the perfect squares. No digit is used its own number of times. If you knew which digit I have used just once you could deduce my three squares with certainty.

What is the sum of my three perfect squares?


The answer is 79670.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Chew-Seong Cheong
Jul 28, 2014

The conditions: "Each of the five digits is used a different number of times, the five numbers of times being the same as the five digits of the perfect squares" indicates that the possible digit integers can only be 1, 2, 3, 4 and 5. Because the sum of the numbers of times the five digits are used is 15 = 3 × \times 5 digits = 1 + 2 + 3 + 4 + 5. A program as the one below (Python) can be written to find the valid 5-digit perfect squares. And they are 12321, 12544, 13225, 33124, 34225, 35344, 44521, and 52441. By try-and-error (I am no good in writing program), it is found that The three 5-digit perfect squares that meet the condition: "No digit is used its own number of times" are 12321, 33124 and 34225, where digits appear 1, 2, 3, 4, and 5 times are 5, 4, 1, 3 and 2 respectively. The answer is therefore 12321 + 33124 + 34225 = 79670 12321+33124+34225=\boxed{79670} .

squares = []
 OK = "N"
 for i in range(100,236):
     s = i*i
     ss = str(s)
     if OK=="Y":
    squares.append((i-1)*(i-1))
OK="Y"
for j in range(len(ss)):
    for k in [0, 6, 7, 8, 9]:
        if int(ss[j])==k:
            OK = "N"
            break
    if OK=="N":
        break

I found more solutions than you. For example, in numbers 12321, 12544 and 55225, digits 1, 2, 3, 4, and 5 appear 3, 5, 1, 2 and 4 times respectively. So, I think this should be a solution too. My code found many trios of 5-digit perfect squares that satisfy the conditions. I think that the key of the problem is in the last sentence.

Ra Cast - 6 years, 9 months ago

2 is used 2 time in two of these number which is against the condition: No digit is used its own number of times

Edward Brooke - 6 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...