Fog Creek Software
Discussion Board

Sum of numbers from 1 to 1000

This is far from a tricky question. It is the simplest math:

Sum(n) = n(n+1)/2

That is it. Schoolbook formula.


Dmitry Shulga
Wednesday, January 15, 2003

Heh.  Euler was a pretty cool. 

Basically, i would think that being able to answer this questions proves that you were paying attention in pre-calc or calculas I.  :-)

And yes, a math problem solving background (pure math or physics or engineering) really helps a developer IMHO ...

Matt H.
Monday, February 17, 2003

But the formula is n(n-1)/2, not n+1.

Wednesday, February 19, 2003

OMG n00bed!!

it IS n(n+1)/2

j00 g0t r0x0red by 0wnage..

Friday, February 21, 2003

*  Recent Topics

*  Fog Creek Home