Forum Discussion
Patrick2788
May 12, 2023Silver Contributor
Create a 'Triforce' array (Sierpiński Triangle) with a formula
I've been studying 'pyramid' arrays lately and with a new Zelda title out, I was inspired to generate a left-justified 'Triforce' array with a formula. Sierpiński triangle - Wikipedia Triforce - Wi...
mtarler
May 12, 2023Silver Contributor
On another note I complicated the formula a bit for aesthetic improvements:
=MAKEARRAY(K2,K2,LAMBDA(r,c, IF(AND(r = 1, c = 1), "\", IF(c = r,"\",IF(c<r, IF(ISODD(INT(COMBIN(r - 1, c - 1)) ), IF(ISODD(INT(COMBIN(r - 2, c-1 )*COMBIN(r-1, c ))),"X","\"), ""), "")))))
or using characters I found in the Cambria Math font I could get:
Patrick2788
May 12, 2023Silver Contributor
The left justified one is straightforward and maybe too easy! This one below (Image) would take some work to add spaces where needed for the sake of appearance in Excel:
1
1 1
1 1 1