New To Ubuntu

Monday, December 11, 2006

Problem 4.8 of A Concise Introduction to Pure Mathmatics

An n-digit positive integer is a Smallbrain number if it is equal to the sum of the nth power of its digits. So for example, 371 is a Smallbrain number, since 371 = 3^3 + 7^3 + 1 ^3
Prove that there are no Smallbrain numbers with 1000 digits (i.e. there is no 1000-digit number that is equal to the sum of 1000th powers of its digits)

This turns out much trivial than I thought:

For a 1000 digit number, the greatest sum we can have for:
a1^1000 + a2^1000 + ...a1000^100
is a1 = a2 = .... = a1000 = 9, so the sum is
1000*9^1000

The smallest 1000 digit number we can have is

1*10^999

The ratio of the two numbers is:

1000*9^1000/10^999 =
9^1000/10^996

Use log to make calculation easier, this will change the ratio but will not change which one is bigger

log(9^1000)/log(10^996) =
1000*log(9)/996 = 0.958 (with a calculator of course)

So for any 1000 digit number, it is always true that

a1^1000 + a2^1000 + .... + a1000^1000 < a1*10^999 + a2*10^998....

Therefore, there is no Smallbrain number with 1000 digit.

It turns out, there are quite a few Smallbrain numbers:

3 digits: 153, 370, 371, 407

4 digits: 1634, 8208, 9474

5 digits: 5 4748, 92727, 93084

This is the C++ code to find Smallbrain numbers:

http://www.box.net/public/zf9114ujjr

Labels:

1 Comments:

Post a Comment

<< Home