Hi Professor
Thanks!. I think from mathematical viewpoint your solution is better, because it can be used for triangles with other sizes. Also I have learned, thanks to you, that
1+2+.....+n-2+n-1+n can be calculated by the formula: n(n+1)/2
But I do not quite understand everything about your formulas. Perhaps if I see on a picture what's n,m,s, and k exactly means....