Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with nth partial sum?

  1. Dec 22, 2011 #1
    Given some natural number n find the nth partial sum for:

    [tex]\displaystyle\sum_{k=0}^{\lfloor log(n) \rfloor} \lfloor \frac{n}{10^k} \rfloor[/tex]

    I find this question really difficult! If anyone could help, it would be greatly appreciated. Thanks in advance!
     
  2. jcsd
  3. Dec 22, 2011 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Perhaps try a few examples of n to see what it actually is that you're doing??
     
  4. Dec 22, 2011 #3
    I take that 'log' here means the base-10 logarithm. Is that so?
     
  5. Dec 22, 2011 #4
    It is indeed the base 10 logarithm.

    For n = 1: [tex]\displaystyle\sum_{k=0}^{0} \lfloor \frac{1}{10^k} \rfloor = \lfloor 1/1 \rfloor = 1[/tex]

    For n = 21: [tex]\displaystyle\sum_{k=0}^{1} \lfloor \frac{21}{10^k} \rfloor = \lfloor 21/1 \rfloor + \lfloor 21/10 \rfloor= 21 + 2 = 23[/tex]
     
  6. Dec 22, 2011 #5

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    What about a general number

    [tex]n=a_1a_2...a_k[/tex]

    ?? Can you find it for that??
     
  7. Dec 23, 2011 #6
    [tex]n=a_1a_2...a_k[/tex]

    I think it would be:

    [tex]a_1a_2...a_k + a_1a_2...a_{k-1} + ... + a_1a_2 + a_1[/tex]
     
  8. Dec 23, 2011 #7
    Something else that could possibly be used is:

    [tex]\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 [/tex]

    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.
     
    Last edited: Dec 23, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Help with nth partial sum?
  1. Nth term (Replies: 1)

  2. Partial sum (Replies: 1)

Loading...