# How to calculate sum of digit of a power

Find the sum of the digits of:

$$\left\lfloor\frac{k^{h+1}-1}{h-1}\right\rfloor$$

I need to calculate sum of digits in answer. Note as $k$ and $h$ can be a very big value, answer is getting overflow.

What is a better way to calculate this?

• Could you re-write "answer"? There seems to be an extra parenthesis. – user142299 May 17 '14 at 17:14
• The answer is syntax error at this stage ... Could you match brackets and explain you notation in a little more detail? – String May 17 '14 at 17:14
• @NotNotLogical Done. – Vivek Goel May 17 '14 at 17:15
• @String corrected the mistake. – Vivek Goel May 17 '14 at 17:16
• @Amzoti Lets take 100000 as h and k as 100. – Vivek Goel May 17 '14 at 17:17