View Full Version : Help with nth partial sum?
m84uily
Dec22-11, 03:29 PM
Given some natural number n find the nth partial sum for:
\displaystyle\sum_{k=0}^{\lfloor log(n) \rfloor} \lfloor \frac{n}{10^k} \rfloor
I find this question really difficult! If anyone could help, it would be greatly appreciated. Thanks in advance!
micromass
Dec22-11, 03:40 PM
Perhaps try a few examples of n to see what it actually is that you're doing??
I take that 'log' here means the base-10 logarithm. Is that so?
m84uily
Dec22-11, 04:39 PM
It is indeed the base 10 logarithm.
For n = 1: \displaystyle\sum_{k=0}^{0} \lfloor \frac{1}{10^k} \rfloor = \lfloor 1/1 \rfloor = 1
For n = 21: \displaystyle\sum_{k=0}^{1} \lfloor \frac{21}{10^k} \rfloor = \lfloor 21/1 \rfloor + \lfloor 21/10 \rfloor= 21 + 2 = 23
micromass
Dec22-11, 09:31 PM
What about a general number
n=a_1a_2...a_k
?? Can you find it for that??
m84uily
Dec23-11, 02:08 AM
n=a_1a_2...a_k
I think it would be:
a_1a_2...a_k + a_1a_2...a_{k-1} + ... + a_1a_2 + a_1
m84uily
Dec23-11, 03:38 AM
Something else that could possibly be used is:
\displaystyle\sum_{k=0}^{\lfloor log(n) \rfloor} \lfloor \frac{n}{10^k} \rfloor = \displaystyle\sum_{k=0}^{\lfloor log(n) \rfloor} \frac{n}{10^k} - \displaystyle\sum_{k=0}^{\lfloor log(n) \rfloor} \frac{n}{10^k} mod 1
Where mod represents the remainder operator. Here the first sum is quite easy to figure out, however the summation involving mod is equally as difficult as the original, to me.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.