1. Member
Join Date
Dec 2012
Posts
32
Rep Power
0

## Help with Program

A googol (10^100) is a massive number: one followed by one-hundred zeros; 100^100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1.

Considering natural numbers of the form, a^b, where a, b < 100, what is the maximum digital sum?
Can anyone help me with the above program implemented in Java. I am not understanding a bit. Please help me with the code.

Thank you,
Sincerely,
Psycho_Coder
Last edited by CodeX Pro; 06-05-2013 at 12:24 PM.

2. ## Re: Help with Program

I don't understand your notation, e.g. what does 'a, b 100' mean?

kind regards,

Jos

3. ## Re: Help with Program

We would love to help you with the code, but there is none. What do you have so far? Which part do you have problems with? If you have nothing yet, I suggest you slide away your keyboard and start with pen and paper. Write down what you think are the steps needed to solve your problem.

4. Member
Join Date
Dec 2012
Posts
32
Rep Power
0

## Re: Help with Program

Originally Posted by JosAH
I don't understand your notation, e.g. what does 'a, b 100' mean?

kind regards,

Jos

5. ## Re: Help with Program

Originally Posted by CodeX Pro
Let ds(x) be the digital sum of x; ds(a^b) == ds(ds(a)^b); the maxmum value for ds(x) is 9 and ds(9^n) == 9, so for any value of a where ds(a) == 9 and ds(a^b) also equals 9.

kind regards,

Jos

6. ## Re: Help with Program

Originally Posted by JosAH
Let ds(x) be the digital sum of x; ds(a^b) == ds(ds(a)^b); the maxmum value for ds(x) is 9 and ds(9^n) == 9, so for any value of a where ds(a) == 9 and ds(a^b) also equals 9.

kind regards,

Jos
Just... wow... :)

7. ## Re: Help with Program

Originally Posted by SurfMan
Just... wow... :)
There's nothing wow about it; it's just bean counter logic and it saves you from writing tedious program code ;-)

kind regarrds,

Jos

8. Senior Member
Join Date
Jan 2013
Location
Northern Virginia, United States
Posts
6,226
Rep Power
14

## Re: Help with Program

Considering natural numbers of the form, a^b, where a, b < 100, what is the maximum digital sum?
First some clarity. A digit sum is a one time sum of the digits of a number. So the digital sum of 12345 = 15. The repeated digital sum or digital root of the same is 6 because the procedure is recursive.

Perhaps I missed something here but it seems to me the maximum of a digital root is 9 is obvious. You can always recursively sum up the resulting digits until you are left with a single digit. And since 3^2 fits the description you got 9.

Regards,
Jim

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•