1 00:00:00,025 --> 00:00:07,615 [music] Since I know about triangular numbers and I know how to sum constants, I 2 00:00:07,615 --> 00:00:14,169 can combine those two facts to some more complicated expressions. 3 00:00:14,169 --> 00:00:22,087 For example, let's do the sum as n goes from 1 to k of 2n minus 1. 4 00:00:22,088 --> 00:00:24,156 All right? And what this notation mean is that I plug 5 00:00:24,156 --> 00:00:27,064 in these numbers from 1 to k into this expression and add them up. 6 00:00:27,064 --> 00:00:34,088 So, I plug in n equals 1, I get 1. I plug in n equals 2, I get 3. 7 00:00:34,088 --> 00:00:37,052 I plug in n equals 3, I get 5. I plug in n equals 4, I get 7. 8 00:00:37,052 --> 00:00:41,218 All right. And I'm going to keep going until I end 9 00:00:41,218 --> 00:00:46,544 with 2k minus 1. In words, right, what is this asking me to 10 00:00:46,544 --> 00:00:48,996 do? Well, 1, 3, 5, this is adding up odd 11 00:00:48,996 --> 00:00:55,274 numbers, right? So, I could say in words that this is the 12 00:00:55,274 --> 00:01:00,403 sum of the first k odd numbers. Right? 13 00:01:00,404 --> 00:01:06,509 I'm going to add up the first k odd numbers, 1 plus 3 plus 5, until I get to 14 00:01:06,509 --> 00:01:12,033 the k 5 number, which is 2k minus 1. Let's first work this out algebraically. 15 00:01:12,033 --> 00:01:18,934 So, algebraically, I've got the sum of 2n minus 1 as n goes from 1 to K. 16 00:01:18,935 --> 00:01:26,272 And this is summing this difference, so I could write this as the difference of two 17 00:01:26,272 --> 00:01:30,308 sums. So, both of these are sums as n goes from 18 00:01:30,308 --> 00:01:34,954 1 to k, but now I'm adding up 2n, I'm just adding up 1. 19 00:01:34,954 --> 00:01:37,707 Now, I can pull out this factor of 2 by distributivity. 20 00:01:37,707 --> 00:01:48,023 So, this is 2 times the sum of n as n goes from 1 to k, minus just the sum of 1. 21 00:01:48,023 --> 00:01:52,074 N goes from 1 to k. I have a bit of a formula for the sum of 22 00:01:52,074 --> 00:01:58,636 just the first k whole numbers, right. And if you remember back to that formula 23 00:01:58,636 --> 00:02:03,985 that's k plus 1 times k over 2. And what's just the sum of 1 as n goes 24 00:02:03,985 --> 00:02:07,972 from 1 to k? Well, this is 1 plus 1 plus 1 plus 1 k 25 00:02:07,972 --> 00:02:10,997 times. That's just minus k. 26 00:02:10,998 --> 00:02:17,282 Now, this is 2 times something divided by 2, so this is k plus 1 times k and then, 27 00:02:17,282 --> 00:02:21,814 minus k. Well, if I expand this out, I've got k 28 00:02:21,814 --> 00:02:27,267 plus 1 times k minus 1 times k. This is k squared. 29 00:02:27,268 --> 00:02:32,699 So, the sum of the first k odd numbers is k squared. 30 00:02:32,700 --> 00:02:37,750 But I can also see this fact that the sum of odd numbers gives me perfect squares. 31 00:02:37,750 --> 00:02:43,559 I can see this fact geometrically. So, I'll draw, say one dot, and then I'll 32 00:02:43,559 --> 00:02:46,220 draw three more dots. All right. 33 00:02:46,220 --> 00:02:51,720 This is 1 plus 3, it's 2 squared. Then, I'll draw five more dots. 34 00:02:51,721 --> 00:02:58,943 1 plus 3 plus 5, that's 3 squared. Then, I'll draw seven more dots. 35 00:02:58,944 --> 00:03:05,412 All right, and that's 1 plus 3 plus 5 plus 7, that's 4 squared. 36 00:03:05,412 --> 00:03:10,685 And then, I'll draw nine dots, one, two, three, four, five, six, seven, eight, 37 00:03:10,685 --> 00:03:12,693 nine. And that's five squared. 38 00:03:12,694 --> 00:03:17,215 1 plus 3 plus 5 plus 7 plus 9 is 5 squared, 25. 39 00:03:17,215 --> 00:03:24,805 And I'll add 11 dots, one, two, three, four, five, six, seven, eight, nine, ten, 40 00:03:24,805 --> 00:03:29,552 11. And 1 plus 3 plus 5 plus 7 plus 9 plus 11, 41 00:03:29,552 --> 00:03:34,630 right? The sum of the first 1, 2, 3, 4, 5, 6 odd 42 00:03:34,630 --> 00:03:39,483 numbers is 1, 2, 3, 4, 5, 6 squared, it's 36. 43 00:03:39,483 --> 00:03:44,152 So, the upshot here is that if you sum odd numbers, you end up getting perfect 44 00:03:44,152 --> 00:03:46,276 squares. And, and that's cool independent of 45 00:03:46,276 --> 00:03:48,900 everything else right, you can see that fact geometrically. 46 00:03:48,900 --> 00:03:56,720 But the real take away here is to remember you can actually do summation problems, 47 00:03:56,720 --> 00:04:01,418 right? If somebody gives you a complicated sum, 48 00:04:01,418 --> 00:04:08,842 by using facts like the sum of just n, and the sum of constants, you can combine 49 00:04:08,842 --> 00:04:15,103 those facts to evaluate more complicated summation problems.