in reply to Re^2: Powers of three
in thread Powers of three

Nice code.

Logically the state of any point is an XOR of its two parents taking a missing parent to be 0. (and seeding with a 1 at the point)