[SOUND] Okay, now we need to show that the cardinalities of these two sets. Namely the set of diagrams with n boxes and an even number of rows of distinct length and the set of diagrams with the same number of boxes and an odd number of rows of distinct length, that these two sets either have the same cardinality or their cardinalities differ by one. Okay, to show this we will construct a map between these two sets, which will be, in some cases a bijection and if these cardinalities of these two sets differ by one, then [COUGH] there will be only one element which will be not in the image of this map. Okay, let's consider a diagram. With rows of distinct length. Let's draw an example. So each row is shorter than the previous ones. This will important for us. And denote by k the number of rows of this diagram. Okay, let us also denote the length of the last row by L. So these are the boxes in the last row. We'll also need the so-called right diagonal. It will be formed by the right-most box of this diagram and all boxes to the left and down two. So we form a diagonal going southwest from the rightmost box. In this case, it will be formed by three boxes. So the number of boxes in this diagonal will be denoted by d. So, And this will be d. Okay, and having such a diagram, let's, Form another diagram from this one with the number of rows different by one from k. It will be either k + 1 or k- 1. So, now we will produce another diagram from this one according to the following rules. If, l is less than d. So if the last row is shorter than the diagonal, we cut the last row and glue it from the right of the diagonal. Cut the last row and glue it to the right of the diagonal. If, The last row and the diagonal have the same length as in this example. If l is equal to d and if these numbers are less than k. Well, d is always less than or equal to k. But if d is strictly less than k, do the same. Okay, if, l is greater than d, and, The number of rows is greater than l. We do the opposite. We remove the diagonal and glue it onto the last row. Okay, and if none of these three cases holds. Then our diagram is called exceptional and we do nothing. Okay, consider this example. So in this case we'll have l equal to d equal to 3 and k is equal to 5, so we have the second alternative. So we need to remove the last row of this diagram and glue it to the right of the diagonal. So, let's see. So here are the first four rows of this diagram with the diagonal marked by yellow dots. And what we do is we remove the last row and glue it to the right of the diagonal. So we have another three boxes here, and these are the boxes marked by yellow crosses. Okay, so we have obtained another diagram with the number of rows equal to k minus 1 and the same number of boxes. While you can see that this map, if it is defined and if the diagram is not exceptional. This map is my objective. Namely, if you apply it twice, you get the initial diagram again. Okay, and if you remove the diagonal and glue it on the last rule you increase the number of rules by one. So the parity of the number of rules is changed. So if there are no exceptional diagrams within boxes, these are two sets that have the same cardinality because the reason bijection between these two sets. Okay, and now we need to find out what are the exceptional diagrams. The last thing we need to find out is what do the exceptional diagrams look like? If none of these three alternatives hold. There can be only two possible situations. And the first one, l is equal to d is equal to k. Let me give you an example. Say in this case, all these numbers are equal to 3. And the diagram looks like this. So the last row has length three. And then, all these, The second row has the length, 3 + 1, that is 4. And the top row has five boxes. So the diagonal has length three and last row also has three boxes. Okay, and in this case the rows have length k + 1. K + 2 etc., up to 2k- 1. And this is n, total number of boxes in the diagram. And you see that this sum is equal to, 3k squared minus k over 2 and this is the kth pentagonal number. Or there is another possible situation where d is equal to k and l is equal to k plus 1. In this case, we also can't apply this math is bijection, and well, here's an example of such a diagram. So, in this case, the last row is longer by one than the diagonal. And in this case, the rows have lengths k + 1, k + 2, etc., up to 2k. And the total number of boxes is equal to 3k squared plus k over 2. And so you see that for each n, there is a unique essential diagram if n has such a form 3k squared plus or minus k over 2. And otherwise there are no exceptional diagrams with n boxes. And in this case, the last case these two sets have the same cardinality. And if there is an exceptional diagram with n boxes, it gives us the term, Of the form q to the power 3k squared plus or minus k. Over 2. Counted with the sum equal to negative 1 to the power k. And this exactly what we have in Euler's pentagonal theorem. The pentagonal theorem is proved. [MUSIC] [BLANK AUDIO]