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

Lots of adding

  1. May 10, 2005 #1
    is there a formula to solve a long series of addition of say 18 through 10748
    instead of doing the tedious summing of 18+19+20+...+10748
    there probably is but i found a formula yesterday and I want see if it is the same

    how about multiplication - is there an easy way of computing 97! (factorial)
    instead of using a computer or multiplying 1*2*3*4...*97
  2. jcsd
  3. May 10, 2005 #2


    User Avatar
    Science Advisor
    Homework Helper

    There's the old standby [itex]\sum_{i=1}^{n}i=\frac{n(n+1)}{2}[/itex] that will handle your sum problem with little difficulty.

    You could use Stirling's series to approximate a factorial.
  4. May 11, 2005 #3


    User Avatar
    Science Advisor

    So that, of course, 18+19+20+...+10748= (1+ 2+ ...+ 10748)- (1+ 2+ ...+ 17)= (10749)(10748)/2- (18)(17)/2= (10749)(5374)- (9)17= 57764973.
  5. May 14, 2005 #4

    will also do
  6. May 14, 2005 #5


    User Avatar
    Science Advisor
    Homework Helper

    Thats the same thing, only slightly simplified.
  7. May 15, 2005 #6
    I prefer to think of it in this way:

    Please follow my thinking, it is the same as that of Gauss with his SUM(1:100) problem. To solve it you pair off each number, starting with the largest (LA) and smallest (s) andsathen take (L-1) and (S+1) sand so on. With an even number as the largest number, there is always one number that cannot be paired up, once this is found, one subtracts the smallest number from it, to give the number of complete pairs, and multiplies by the sum of L and S. Tsa give the final answer, one then adds the number that cannot be paired.

    Take the largest numebr in numberoup (10748) and the smallest (18).

    Add them together (10766) , and divide by two (5383). This gives the number that does not have a pair.

    Now, subtract 18 from this number (5365). Multiply 5365 by 10766 to give 57759590. Now add on to this 5383, and one gets 57764973

    AlgebraiclAlgebraicallyr no miktex but i have never known how to use it in forums).

    ( { ( (L+S) / 2 ) - S } {L+S}) + { ( L + S ) / 2 } = answer

    If one take L+s = T

    Then it is much easier to say,
    T{(T^2)/2) - ST} + {T/2}

    I hope somebody could put that mess into MiXTeX or LaTeX - but i hope my logic comes through.


    Last edited by a moderator: May 16, 2005
  8. May 15, 2005 #7


    User Avatar
    Science Advisor
    Homework Helper

    Halls answer is correct. Do you not believe the formula in my post?

    "Take the largest numebr in numberoup (10478) and the smallest (18)."

    You've transposed the digits 4 and 7, the sum he calculated was from 18 to 10748.
  9. May 16, 2005 #8
    Post corrected

  10. May 17, 2005 #9
    its not possible simplify factorials is it? it tried but i just end up with long polynomials :confused:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook