aspose file tools*
The moose likes General Computing and the fly likes Harmonic Progression computing problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Harmonic Progression computing problem" Watch "Harmonic Progression computing problem" New topic
Author

Harmonic Progression computing problem

sadanand munswamy
Ranch Hand

Joined: Apr 10, 2012
Posts: 39
Hi All,
I want to calculate simple HP series like 1^2 + 2^3 + 3^3....
where the raised to index can be any
e.g 1 ^4 + 2^4 + 3^4 .....

Please help me with the correct formula to do it...

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42266
    
  64
What do you have so far? Where are you stuck making progress?


Ping & DNS - my free Android networking tools app
sadanand munswamy
Ranch Hand

Joined: Apr 10, 2012
Posts: 39
How do I calculate the HP if it say: 1^11 + 2^11 + 3^11 + 4^11 + ......n^11
or if it is say: 1^21 + 2^21 + 3^21 + ......... + n^21
The question is the raised to index can be any natural No.


HELP !!!
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11402
    
  16

You are going to get to some pretty big numbers pretty fast. Further, you are going to have a fairly slow program if you do it by brute force. I'd suggest finding a math textbook and see if there is some easier way to compute these values. I didn't get that far in math, so I have no idea, but there is probably something out there.

research would be your best bet at this point.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Harmonic Progression computing problem