Last week's challenge involved an empirical search for extreme values of determinants,

which required to either own an HP calc with built-in matrix operations, or else to

remember just how a 3x3 or 4x4 determinant could be calculated, which made it necessary

for some of you to reach for that dusty math book on the shelf.

This time we have a new S&S Math Challenge requiring an empirical search, but the

underlying concepts are much simpler, no "Matrix Calculus for Dummies" needed. I'll

introduce the challenge with an example of what we are going to find out with the help

of our precious, museum-quality HP calcs [if you don't use them, they'll dissecate and die,

you know]:

Have a look at the number 153. Does it have any interesting peculiarity ? Well, it does have several,

the most remarkable one being that:

153 = 1^3 + 5^3 + 3^3i.e.: 153 is a 3-digit number equal to the sum of the 3rd powers of its own digits.

Likewise, have a look at 1634, and you'll see that:

1634 = 1^4 + 6^4 + 3^4 + 4^4this is, 1634 is a 4-digit number equal to the sum of the 4th powers of its digits.

Let's generalize this to N-digit numbers and so we have the following challenge:

- Pick up your favorite HP calculator. Almost any will do for the task at hand, as it does

not involve anything but arithmetic functions on integer numbers, and negligible memory

requirements. Do *not* use any computer for this, the challenge is tailored for the speed and

capabilities of HP calculators and using a computer just misses the point by a light-year or more. - Find *all* numbers of N digits that are equal to the sum of the N-th powers of their digits.

You must find the numbers themselves, as well as just how many there are for each N. The

digit 0 *won't* be accepted as first digit, so for instance 153 may be a solution for N=3

but 032 wouldn't even be tested. - You should determine all solutions for N=1,2,..., 10. The lower values of N, say up to N=4

are easy and feasible for any HP calculator, from the HP-25 upwards, even using a

straightforward programming approach.

- However, for N=5 to N=10, you'll need to refine your approach significantly

if you intend to get results in a reasonable amount of time.

- For test purposes, this is what you should get:

N # Solutions Solutions Comments

----------------------------------------------------------------

1 9 1,2,3,4,5,6,7,8,9 0 is not acceptable

2 0 none 00 and 01 not acceptable

3 4 153, 370, 371, 407 easy

4 3 1634, ?, ? easy

5 3 ?,?,? still easy

6 1 ? less easy

7 4 ?,?,?,? medium

8 3 ?,?,? hard

9 4 ?,?,?,? very hard

10 ? ? very, very hard

That's all. May I repeat once more: do *not* use your computer, use your HP calculator. It is much more

difficult, but hey, that's where the challenge is. At least see if you can find the ONLY,

unique solution for N=6 !

Of course, the real 48/49 nuts among you should try up to N=10, using Saturn Assembler if

necessary.