Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

The function (x-y/2)&y = 0 can be used to plot a sierpinski triangle. For example:


Why does this happen?

share|improve this question
See this link –  Babak S. Nov 16 '13 at 15:20

1 Answer 1

The function computes the parity of the values in the Pascal Triangle. To prove that the output resembles a Sierpinski triangle (of course it's just a finite representation of this...) you may just show that the parity structure for rows $1$ to $2^k$ is repeated at the left and the right side for rows $2^k+1$ to $2^{k+1}$, and that the middle part always has even values. It's just some manipulation of $C(k,n)$ :-)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.