I need advice. Is there a quick way to get the sum of a series?

for example.

p + p-1 + p-2 + p-3 ...

and so on?

  • 1
    If this list is p-0 + p-1 + ... + p-p, yes, you can.
    It is the same as the sum of 0+1+...p.
  • 3

    P + p-1 + p-2 + ... +1
    1 + 2 + ... + P

    Add the two, and divide by two so you have:

    P+1 + p+1 + ... + P+1 (exactly p times)

    So it's p×(p+1) and then divide by two (cuz you have two series) so it's (p×(p+1))/2
  • 4
    This was in middle school math problems, btw.
  • 6
    Look up "arithmetic progressions (or series)" and "sum of arithmetic progressions (or series)". Also note when said formulae are valid. Validity conditions are super important when dealing with number series.

    While you're at it, also look up "geometric progressions (or series)" and "sum of geometric progressions (or series)".

    For even more fun, try harmonic series.

    This particular sum diverges to -infinity if the series goes on to infinity, so you need to be *very* careful about what conclusions you draw when you use it. Series summation and infinities are tricky. Look up the whole "sum of natural numbers is -1/12" thing for a glimpse of why divergent series can be confusing.

    It's even more fun if p is complex.
  • 0
    @RememberMe not entirely. If it goes to infinity, them the sum itself goes to the same infinity too. (Easy answer) It probably has an end limit tho, which is why the normal summation should work. (the one I mentioned above)
  • 1
    I remember in advanced and engineering maths we have some fugly series tho, which were a pain to solve for.... Oh the memories.
  • 0
    herpaderp, just realized for the trivial case I can do p*(floor(p/2)+1)

    good answer though.
  • 2
    @NoMad I meant that the series has infinite terms(goes *on* to infinity). Bad terminology, my bad.

    Also no, not really. If the terms flip flop between positive and negative, it can be even more fun characterizing the series.
  • 1
    @RememberMe 🤔 that is true...
  • 1
    It’s weird that you deal with algorithms for fast prime factorization but didn’t know about this sum series 😄

    There is a story where the teacher gives the students the task to calculate that sum starting from 100 and one of the students gives the answer immediately by using this shortcut. Was it Newton or Gauss? I don’t remember.
  • 2
    @Lensflare hail Gauss
  • 0
    @Lensflare I've forgotten more than I remember.
Add Comment