1. ## Evaluate the sum

Evaluate the sum

$[log_21]+[log_22]+[log_23]+...+[log_22002]$.

2. using the well known rule:

loga + logb = log(ab)

we get:

$[log_21]+[log_22]+[log_23]+...+[log_22002] = log_21*2*3*...*2001*2002 = log_22002!$

3. Originally Posted by Peritus
using the well known rule:

loga + logb = log(ab)

we get:

$[log_21]+[log_22]+[log_23]+...+[log_22002] = log_21*2*3*...*2001*2002 = log_22002!$
i thought so too. but i figured that was too easy. isn't there a way to get an answer without logs? of course it would be a huge number (my calculator can't do log 2002! and i doubt anyone's calculator can), but perhaps we can get it in standard form

4. Originally Posted by Jhevon
i thought so too. but i figured that was too easy. isn't there a way to get an answer without logs? of course it would be a huge number (my calculator can't do log 2002! and i doubt anyone's calculator can), but perhaps we can get it in standard form
Stirling's approximation says that, for large n:

$n! \approx \sqrt{2 \pi n} \frac{n^n}{e^n}$

So
$ln(n!) \approx \frac{1}{2}ln(n) + n~ln(n) - n$
(ignoring the relatively small constant term.)

So using the change of base formula:
$log_2(2002!) \approx \frac{ \frac{1}{2}ln(2002) + 2002 \cdot ln(2002) - 2002}{ln(2)} \approx 19073.6$

-Dan

5. Originally Posted by topsquark
Stirling's approximation says that, for large n:

$n! \approx \sqrt{2 \pi n} \frac{n^n}{e^n}$

So
$ln(n!) \approx \frac{1}{2}ln(n) + n~ln(n) - n$
(ignoring the relatively small constant term.)

So using the change of base formula:
$log_2(2002!) \approx \frac{ \frac{1}{2}ln(2002) + 2002 \cdot ln(2002) - 2002}{ln(2)} \approx 19073.6$

-Dan
thanks.

you know what the sad thing is? i learned Stirling's approximation in class just the other day, i should have thought of that. (it was in a probability class, i hate probability by the way)

that number seems a LOT smaller than i thought it would be. why does my calculator have problems spitting that answer out, or anything close to it

6. Originally Posted by Jhevon
thanks.

you know what the sad thing is? i learned Stirling's approximation in class just the other day, i should have thought of that. (it was in a probability class, i hate probability by the way)

that number seems a LOT smaller than i thought it would be. why does my calculator have problems spitting that answer out, or anything close to it
If you ever take a Statistical Mechanics course you will forever think of the Stirling approximation. Trust me!

Recall that you are looking at the logarithm of a number. So if $log_x \approx 20000$ then we are talking of an x around $2^{20000}$, a not insignificant number. This is why they invented logs in the first place: early Mathematicians had the TI - 1, which vaguely looks like an abacus with a plug. They couldn't handle multiplication of big numbers. Logarithms reduce the size of the number you are working with, so you can tabulate them easier. (Then they had the HP - 1, thus losing the ability to even count, and we entered the Dark Ages.)

-Dan

7. I was wondering whether $[x]$ denotes floor function or something like that, because it's a bit strange that perash used it for each term.

It is more interesting if it is the floor function

If it really denotes floor function, to calculate the sum, we should consider
$\sum_{k=1}^{n}{k\cdot{2^k}}$

$\sum_{k=1}^{n}{k\cdot{x^k}}=x\cdot{\left(\sum_{k=0 }^{n}{x^k}\right)'}$

$\sum_{k=1}^{n}{k\cdot{x^k}}=x\cdot{\left(\frac{x^{ n+1}-1}{x-1}\right)'}=x\cdot{\left(\frac{(n+1)x^{n}(x-1)-x^{n+1}+1}{(x-1)^2}\right)}$

$\sum_{k=1}^{n}{k\cdot{2^k}}=(n+1)\cdot{2^{n+1}}-2^{n+2}+2$

Because our sum is: $S=\sum_{k=1}^{10}{k\cdot{2^k}}-(2047-2002)\cdot{10}$

In general
$\sum_{k=1}^{n}{[\log_2(k)]}=\sum_{k=1}^{[\log_2(n)]}{k\cdot{2^k}}-(2^{[\log_2(n)]+1}-1-n)\cdot{[\log_2(n)]}$

Then: $\sum_{k=1}^{n}{[\log_2(k)]}=([\log_2(n)]+1)\cdot{2^{[\log_2(n)]+1}}-2^{[\log_2(n)]+2}+2-(2^{[\log_2(n)]+1}-1-n)\cdot{[\log_2(n)]}$
Which is:
$\sum_{k=1}^{n}{[\log_2(k)]}=-2^{[\log_2(n)]+1}+2+(n+1)\cdot{[\log_2(n)]}$