0
$\begingroup$

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?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.