#summation

22 messages · Page 1 of 1 (latest)

gaunt sphinxBOT
normal wigeon
#

So because we're just summing 1, all we're really doing is counting the number of iterations of the interior loop

#

so since i is 1 during the first iteration it's like counting how many numbers there are from 2 to n

#

which is n-1 (if I'm not mistaken)

#

the second iteration is the same just starting at 3

#

and so on until you're using i = n-2

#

which means you're countin how many numbers there are from n-1 to n

#

which is just 2

#

so in truth this sum is just the sum of integers from 2 to n-1

#

and there's a formula for the sum of integers from 1 to some number m

#

all we have to do is use n-1 in place of m and then subtrace 1 since we're missing that term

#

the formula is (m^2 + m)/2

hidden prairie
#

it says i=1

#

r8?

normal wigeon
#

Yeah the first iteration is i = 1, j =2

but the second iteration which is what I was referring to is i = 2, j = 3

hidden prairie
#

ohh

#

ok thanks

normal wigeon
#

np

fickle crow
#

this dose not make any saens

normal wigeon
#

Plugging n-1 in for m we get (n^2 - n)/2
Which we then subtract 1 from
Giving us
(n^2 - n - 2)/2 which factors into the form the final answer is presented in

gaunt sphinxBOT
#
Solved

Post marked as solved by @honest notch.

Use .unsolved if this was a mistake.