Finding the nth Partial Sum for a Series Involving Floor and Mod Operators

In summary, the given expression calculates the sum of the first n digits of a natural number n, where n is represented as a string of digits. This can be determined by taking the base-10 logarithm of n, and then using the floor function to find the largest integer less than or equal to the logarithm. The sum is then calculated by adding the digits from each place value, starting from the ones place and working up to the highest place value. Another approach is to use the remainder operator to determine the sum, but this may be more difficult.
  • #1
m84uily
33
0
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!
 
Physics news on Phys.org
  • #2
Perhaps try a few examples of n to see what it actually is that you're doing??
 
  • #3
I take that 'log' here means the base-10 logarithm. Is that so?
 
  • #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]
 
  • #5
What about a general number

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

?? Can you find it for that??
 
  • #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]
 
  • #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:

Related to Finding the nth Partial Sum for a Series Involving Floor and Mod Operators

1. What is an nth partial sum?

An nth partial sum is the sum of the first n terms in a sequence or series.

2. How do I find the nth partial sum?

To find the nth partial sum, you can use the formula Sn = a1 + a2 + ... + an, where a1, a2, ..., an are the terms in the sequence or series.

3. Can the nth partial sum be negative?

Yes, the nth partial sum can be negative if the terms in the sequence or series are negative. It is important to pay attention to the sign of each term when finding the nth partial sum.

4. What is the difference between nth partial sum and total sum?

The nth partial sum is the sum of the first n terms in a sequence or series, while the total sum is the sum of all terms in the sequence or series. The nth partial sum is a smaller sum that can help in finding the total sum.

5. Can the nth partial sum be used to find the limit of a series?

Yes, the nth partial sum can be used to approximate the limit of a series. As n gets larger, the nth partial sum will get closer to the actual sum of the series.

Similar threads

  • General Math
Replies
4
Views
1K
  • Advanced Physics Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
2K
Replies
2
Views
826
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
Replies
6
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
Back
Top