I'm trying to define $\pi$ in terms of $4$ by placing a unit circle inside a square, and subtracting the corners of the square.
I'm attempting to use summation to define the area of a corner, then multiplying that by four and subtracting from four (the area of the square)
I thought I figured it out, and I created a program to check. The answer came out to $\approx 3.4$
I'm not sure if it was a program fault, or if I'm simply making a math error. Can someone please lead me in the right direction? This is what I have right now:
$$\pi \approx 4 \times \left(1-\sum\limits_{n=1}^{\infty}\frac{\left(\frac{2-\sqrt 2}{2}\right)^2}{2^{n-1}}\right)$$
Where $\left(\frac{2-\sqrt2}{2}\right)^2$ is the area of the largest corner square and $2^{n-1}$ is the number of squares.
EDIT
After reading the comments I realized I wasn't very clear with what I was trying to achieve, so I created a sketch that should illustrate what I want.


Your way of filling the corners will only (as far as I can see) a triangular part of them.
It's going to be hard to fill them with squares.
Chris says the same in his comment except that he actually tries to tell you what you might do (and he caught you miscounting on the number of smaller squares in each step).