巴斯卡三角形
Author: 藍邦偉  老師

巴斯卡三角形

x+y

(x+y)²=x²+2xy+y²

(x+y)³=x³+3x²y+3xy²+y³

a = 90 (slider from 0 to 100, step 1)
r_1: floor((-1.0 + sqrt(8.0 * a + 1.0)) / 2.0)
L_1 = Sequence(Sequence[Binomial[n, k], k, 0.0, n], n, 0.0, r_1)
L_2 = Join(Sequence[Element[L_1, i], i, 1.0, r_1 + 1.0])
L_3 = Sequence(Sequence[(r_1 + j) * i / i, i, 1.0, r_1 + j + 1.0], j, -(r_1), 0.0)
L_4 = Join(Sequence[Element[L_3, i], i, 1.0, r_1 + 1.0])
L_5 = Sequence(Sequence[i, i, 0.0, r_1 + j], j, -(r_1), 0.0)
L_6 = Join(Sequence[Element[L_5, i], i, 1.0, r_1 + 1.0])
Pascal'sTriangle = Sequence(Text[Element[L_2, i], (-1.0 / 2.0 * Element[L_4, i] + Element[L_6, i], -1.0 * Element[L_4, i]), true], i, 1.0, a + 1.0)