-2
$\begingroup$

I need to know how to get the summation of a constant (c) from i=0 to log(n) of a constant

  • 4
    $\;\log n-1\;$ won't usually be a natural number, so what do you *exactly* mean?2017-02-12
  • 0
    Maybe there's a ceiling or flooring operation on $\log(n) - 1$, for $n>0$?2017-02-12
  • 0
    Your question is not enough clear !2017-02-12
  • 0
    Welcome to MSE! It's important that posts are clearly written in TeX and explained so users can help as much as possible!2017-02-12
  • 0
    sorry its a typo, it is without -1 @DonAntonio2017-02-12
  • 0
    $C\log(n)$ when $\log(n)$ is natural, otherwise it is sometimes considered abuse of notation unless rigorously defined; where it still equals $C\log(n)$.2017-02-12
  • 1
    @Alexandralopez That doesn't matter: the number's still not a natural one.2017-02-12

1 Answers 1

2

$$\sum_{i = 0}^{\ln(n)} C = C \sum_{i = 0}^{\ln(n)} 1 = C\cdot (\ln(n)+1) = C\ln(n) + C $$

"More rigorously"

$$\lim_{N\to \ln(n)} \sum_{i = 0}^{N} C = C\cdot (N+1) = C\ln(n) + C$$

  • 1
    there are $\log(n) + 1$ indices when starting from zero. So it's $C(\log(n)+1)$. The sum is $\sum_{j=0}^{\log(n)-1} C = C\log(n)$.2017-02-12
  • 0
    @james.nixon Whoops, thank you!2017-02-12