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 are the three perfect squares?
Source:
a math puzzle posted to the SAS Discussion Forum (from New Scientist magazine).
Ady, thank you
1. With your permission, I will publish your excellent
presentation as an official solution.
Sure - thanks. A minute later, Charlie would have posted as
well, and he would have shown us his code too boot.
So, I am a bit sorry I posted first.
2. I will only replace your “just look” by “think”.
Write as you wish. The reason I used "look" is this:
Having coded-in a "digit count" column alongside
the 504 trios, my next decision was this:
I have a column of 504 5 digit numbers and I am looking
for the ones with exactly one 1, one 2, one 3, one 4,
and one 5. Simply put: no repeats. How long will it
me take me to write code to look for these: (10 min), and
how long will it take me to run down the list with my
eyes, culling all but the OK ones: 8 min. Little thought
goes into differentiating 11541 from 12543. The thought
went into knowing these two times, so as to move forward best.
3. Please specify the total runtime of your routines.
Essentially instantaneous. For the record, I made a list
of the 504 trios, along with a 'digit count" column
trio1 trio1 trio3 digcnt
------------------------
.
.
.
34225 52441 55225 15135
35344 44521 52441 22263
35344 44521 55225 13245 *
35344 52441 55225 13245 *
44521 52441 55225 24045
total time sec 5.09999692E-04
(The *'s were inserted by eye. Total time: half a millisecond.
4. If you like the puzzle, why not rate it?
OK - but, I never said I liked it. I will be blunt - this was
more of a contrived scavenger hunt than math.
(It would be a good college programming exercise). I would
rate it only 3 since, from it, I learned little.
I still wonder why we don't also rate answers. I have posted stuff in
the forums - but have had little response. Please see my forum posts.
Links available on request.
Bottom lines: thanks for your feedback Ady - more true "Comments"
like this will make the site more interesting to others.
PS
I am dismayed Levik has not addressed this site's spam problem.
The site feels stagnant. With attention it could gain a wider following.
We suffer neglect. :-) Best - Steve