the pythagoras tree is a fractal generated by squares. for each square, two new smaller squares are constructed and connected by their corners to the original square.
how do i create an exponential function to find out how many squares will be in the next sequence? since every iteration, the previous amount of squares added is doubled, how can i phrase this in function form? for example:
iteration 1: 0 + 1 = 1 square,
iteration 2: 1 + 1(2) = 3 squares,
iteration 3: 3 + 2(2) = 7 squares,
and so forth. sorry if this is a really easy question, but ive looked everywhere and tried a lot and cant find anything.
You are adding $2^n$ squares in each iteration - this means that the next term ($n + 1$) has $2^{n + 1} - 1$ squares, as you have $2^{n} - 1$ squares till then, and $2^n + 2^{n} - 1 = 2^n \times 2 - 1 = 2^{n + 1} - 1$.
Wikipedia has a nice diagram showing this process.