All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
5th powers (Posted on 2012-08-30) Difficulty: 3 of 5
There are only three numbers that can be written as the sum of fourth powers of their digits: 1634, 8208 ,9474 (the trivial case of number 1 excluded).
The sum of these numbers is 1634 + 8208 + 9474 = 19316.

Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.

No Solution Yet Submitted by Ady TZIDON    
Rating: 3.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 4 |

DEFDBL A-Z

FOR n = 1 TO 354294
  s$ = LTRIM$(STR$(n))
  tot = 0
  FOR i = 1 TO LEN(s$)
    d = VAL(MID$(s$, i, 1))
    tot = tot + d * d * d * d * d
  NEXT
  IF tot = n THEN PRINT n
NEXT

finds

1
4150
4151
54748
92727
93084
194979

The sum of these numbers is 443,840, and is in fact what is asked for. However, if we're to follow the 4th power example, we should subtract the trivial 1 to get 443,839, though the final, instructional, paragraph does not tell us explicitly to do this.

BTW, the 354294 in the program is 6*9^5 as the largest sum of fifth powers of six digits could be this. All sets of digits with more than six digits add up to a number with fewer than whatever number the fifth power total comes to.


  Posted by Charlie on 2012-08-30 14:31:37
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information