[net.puzzle] Solution to DSR Contest Announced

mtj@ncvet.UUCP (Michael Jones) (10/31/84)

The first Data Systems Research, Inc. contest has been won by Fred Helenius
of Boston, MA.	His winning entry was postmarked October 17, 1984.  Quite a
few entrants failed to find the proper solution, and none appeared aware of
the name for this sequence.

The information given in the contest announcement was:

   1. The following four numbers are part of a much longer sequence.

		     54748

		     92727

		     93084

		    548834

   2. They appear in this longer sequence consecutively.

   3. They appear in this longer sequence in the order given (top to bottom).

   4. Each number appears only once in the longer sequence.

   5. The longer sequence consists of numbers with a special property.

   6. The longer sequence is finite.

The questions asked were:

   1. What two numbers (if any) preceed 54748 in the longer sequence ?

   2. What two numbers (if any) succeed 548834 in the longer sequence ?

   3. What special property do these numbers possess ?

The answers are:

   1. 8208 and 9474 preceed 54748 in the longer sequence.

   2. 1741725 and 4210818 succeed 548834 in the longer sequence.

   3. These numbers are n-digit numbers which are equal to the sum
      of the n-th powers of their digits.

Some numbers in this sequence are:

       153 = 1^3 + 5^3 + 3^3
      8208 = 8^4 + 2^4 + 0^4 + 8^4
     54748 = 5^5 + 4^5 + 7^5 + 4^5 + 8^5
    548834 = 5^6 + 4^6 + 8^6 + 8^6 + 3^6 + 4^6
   4210818 = 4^7 + 2^7 + 1^7 + 0^7 + 8^7 + 1^7 + 8^7

A very large number with this property is:

   128468643043731391252 = 1^21 + 2^21 + 8^21 + ... + 5^21 + 2^21

This first Data Systems Research, Inc. contest has been fun for us,  and
for the many of you who entered.  The second contest will begin soon. It
will be announced on the net, as well as on personal RBBS systems.

dik@turing.UUCP (11/17/84)

Well some time ago the referenced article appeared, and many among us will
have pondered about the generation of the complete set of solutions to
the problem.  Here it follows.  The solutions were generated in slightly less
than 2000 seconds on a CDC Cyber 170-750 (about 15.5 times as fast as a
DEC Vax 11/750).

(In summary the problem is to find n digit numbers were the number is the
sum of the n-th powers of its digits.)

First a table displaying for a number of digits the number of solutions.
There are no solutions of 40 or more digits.

# digs	# sols		# digs	#sols		# digs	# sols
    1	   9		   14	   1		   27	   5
    2	   -		   15	   -		   28	   -
    3	   4		   16	   2		   29	   4
    4	   3		   17	   3		   30	   -
    5	   3		   18	   -		   31	   3
    6	   1		   19	   4		   32	   1
    7	   4		   20	   1		   33	   2
    8	   3		   21	   2		   34	   1
    9	   4		   22	   -		   35	   2
   10	   1		   23	   5		   36	   -
   11	   8		   24	   3		   37	   1
   12	   -		   25	   5		   38	   1
   13	   -		   26	   -		   39	   2

So there are 88 solutions.  It may be seen that the majority of the
solutions has an odd number of digits (70 odd, 18 even) even if we
ignore the (trivial) one-digit solutions.  This appears not to be
accidental, because the same holds if we pose the problem for other
bases than base 10.  Is there someone who has an explanation for this?

The largest solution is the 39-digit number:
 115132219018763992565095597973971522401

The complete list of solutions:

n = 1
 1
 2
 3
 4
 5
 6
 7
 8
 9
n = 3
 153
 370
 371
 407
n = 4
 1634
 8208
 9474
n = 5
 54748
 92727
 93084
n = 6
 548834
n = 7
 1741725
 4210818
 9800817
 9926315
n = 8
 24678050
 24678051
 88593477
n = 9
 146511208
 472335975
 534494836
 912985153
n = 10
 4679307774
n = 11
 32164049650
 32164049651
 40028394225
 42678290603
 44708635679
 49388550606
 82693916578
 94204591914
n = 14
 28116440335967
n = 16
 4338281769391370
 4338281769391371
n = 17
 21897142587612075
 35641594208964132
 35875699062250035
n = 19
 1517841543307505039
 3289582984443187032
 4498128791164624869
 4929273885928088826
n = 20
 63105425988599693916
n = 21
 128468643043731391252
 449177399146038697307
n = 23
 21887696841122916288858
 27879694893054074471405
 27907865009977052567814
 28361281321319229463398
 35452590104031691935943
n = 24
 174088005938065293023722
 188451485447897896036875
 239313664430041569350093
n = 25
 1550475334214501539088894
 1553242162893771850669378
 3706907995955475988644380
 3706907995955475988644381
 4422095118095899619457938
n = 27
 121204998563613372405438066
 121270696006801314328439376
 128851796696487777842012787
 174650464499531377631639254
 177265453171792792366489765
n = 29
 14607640612971980372614873089
 19008174136254279995012734740
 19008174136254279995012734741
 23866716435523975980390369295
n = 31
 1145037275765491025924292050346
 1927890457142960697580636236639
 2309092682616190307509695338915
n = 32
 17333509997782249308725103962772
n = 33
 186709961001538790100634132976990
 186709961001538790100634132976991
n = 34
 1122763285329372541592822900204593
n = 35
 12639369517103790328947807201478392
 12679937780272278566303885594196922
n = 37
 1219167219625434121569735803609966019
n = 38
 12815792078366059955099770545296129367
n = 39
 115132219018763992565095597973971522400
 115132219018763992565095597973971522401
-- 
dik t. winter
centrum voor wiskunde en informatica
postbus 4079
1009 AB  amsterdam
nederland
+31 20 592 4102 (polish your dutch)
UUCP: decvax!mcvax!turing!dik